net.shibboleth.metadata
Class FirstItemIdItemIdentificationStrategy

java.lang.Object
  extended by net.shibboleth.metadata.FirstItemIdItemIdentificationStrategy
All Implemented Interfaces:
ItemIdentificationStrategy

public class FirstItemIdItemIdentificationStrategy
extends Object
implements ItemIdentificationStrategy

Strategy that returns the first ItemId associated with an Item or, if not ItemId is associated with the item, a generic identifier is returned.


Field Summary
private  String noItemIdIdentifier
          Identifier to use if an Item does have an ItemId.
 
Constructor Summary
FirstItemIdItemIdentificationStrategy()
           
 
Method Summary
 String getItemIdentifier(Item<?> item)
          Gets an identifier for the item.
 String getNoItemIdIdentifier()
          Gets the identifier to use if an Item does have an ItemId.
 void setNoItemIdIdentifier(String identifier)
          Sets the identifier to use if an Item does have an ItemId.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

noItemIdIdentifier

private String noItemIdIdentifier
Identifier to use if an Item does have an ItemId. Default value: unidentified

Constructor Detail

FirstItemIdItemIdentificationStrategy

public FirstItemIdItemIdentificationStrategy()
Method Detail

getNoItemIdIdentifier

public String getNoItemIdIdentifier()
Gets the identifier to use if an Item does have an ItemId.

Returns:
identifier to use if an Item does have an ItemId

setNoItemIdIdentifier

public void setNoItemIdIdentifier(String identifier)
Sets the identifier to use if an Item does have an ItemId.

Parameters:
identifier - identifier to use if an Item does have an ItemId

getItemIdentifier

public String getItemIdentifier(Item<?> item)
Gets an identifier for the item.

Specified by:
getItemIdentifier in interface ItemIdentificationStrategy
Parameters:
item - the item
Returns:
the identifier, never null


Copyright © 2009-2011. All Rights Reserved.