net.shibboleth.metadata
Class AbstractItem<T>

java.lang.Object
  extended by net.shibboleth.metadata.AbstractItem<T>
Type Parameters:
T - type of data contained in the item
All Implemented Interfaces:
Serializable, Item<T>
Direct Known Subclasses:
DomElementItem

@ThreadSafe
public abstract class AbstractItem<T>
extends Object
implements Item<T>

Base implementation of an Item.

See Also:
Serialized Form

Field Summary
private  T data
          The actual data held by the item.
private  ClassToInstanceMultiMap<ItemMetadata> metadata
          Additional processing information associated with this Item.
private static long serialVersionUID
          Serial version UID.
 
Constructor Summary
protected AbstractItem()
          Constructor.
 
Method Summary
 ClassToInstanceMultiMap<ItemMetadata> getItemMetadata()
          Gets all of the metadata attached to this Item.
protected  void setData(T newData)
          Sets the data wrapped by this Item.
 T unwrap()
          Gets the wrapped item data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.shibboleth.metadata.Item
copy
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial version UID.

See Also:
Constant Field Values

data

private T data
The actual data held by the item.


metadata

private final ClassToInstanceMultiMap<ItemMetadata> metadata
Additional processing information associated with this Item.

Constructor Detail

AbstractItem

protected AbstractItem()
Constructor.

Method Detail

unwrap

public T unwrap()
Gets the wrapped item data.

Specified by:
unwrap in interface Item<T>
Returns:
the wrapped item data

setData

protected void setData(T newData)
Sets the data wrapped by this Item.

Parameters:
newData - the data

getItemMetadata

public ClassToInstanceMultiMap<ItemMetadata> getItemMetadata()
Gets all of the metadata attached to this Item.

Specified by:
getItemMetadata in interface Item<T>
Returns:
metadata attached to this Item


Copyright © 2009-2011. All Rights Reserved.