- All Implemented Interfaces:
- Direct Known Subclasses:
public abstract class Item extends Object implements SerializableA context server tracked entity. All tracked entities need to extend this class so as to provide the minimal information the context server needs to be able to track such entities and operate on them. Items are persisted according to their type (structure) and identifier (identity). Of note, all Item subclasses must define a public String constant named
ITEM_TYPEthat is used to identify the type of a specific Item via
getItemType(java.lang.Class). It is therefore important that
ITEM_TYPEbe unique across all persisted type of Items. Similarly, since Items are persisted according to their type, an Item's identifier must be unique among Items of the same type.
Additionally, Items are also gathered by scope allowing the context server to group together related Items (usually pertaining to a given site being analyzed, though scopes could span across sites depending on the desired analysis granularity). Scopes allow clients accessing the context server to filter data. The context server defines a built-in scope (
Metadata.SYSTEM_SCOPE) that clients can use to share data across scopes.
- See Also:
- Serialized Form
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description
getItemId()Retrieves the Item's identifier used to uniquely identify this Item when persisted or when referred to.
getItemType()Retrieves the Item's type used to assert metadata and structure common to Items of this type, notably for persistence purposes.
getScope()Retrieves the Item's scope.
setSystemMetadata(String key, Object value)
public Item(String itemId)
public String getItemId()Retrieves the Item's identifier used to uniquely identify this Item when persisted or when referred to. An Item's identifier must be unique among Items with the same type.
- a String representation of the identifier, no particular format is prescribed as long as it is guaranteed unique for this particular Item.
public void setItemId(String itemId)
public String getItemType()Retrieves the Item's type used to assert metadata and structure common to Items of this type, notably for persistence purposes. The Item's type must match the value defined by the implementation's
- a String representation of this Item's type, must equal the
public void setItemType(String itemType)
public String getScope()Retrieves the Item's scope.
- the Item's scope name
public void setScope(String scope)
public Long getVersion()
public void setVersion(Long version)