|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sakaiproject.entitybroker.entityprovider.extension.EntityData
public class EntityData
This is an object to hold entity data (e.g. from a search which would normally return entity references), This is basically a POJO which allows us to return a few results instead of only the reference, it helps us get the entity data back more efficiently and makes it easier on developers who need to search for entities
| Nested Class Summary | |
|---|---|
static class |
EntityData.ReferenceComparator
|
static class |
EntityData.TitleComparator
|
| Constructor Summary | |
|---|---|
EntityData(EntityReference ref,
String displayTitle)
Minimal constructor - used for most basic cases Use the setters to add in properties or the entity data if desired |
|
EntityData(EntityReference ref,
String displayTitle,
Object entity)
Basic constructor Use this to construct a search result using the typical minimal amount of information, Use the setters to add in properties or the entity data if desired |
|
EntityData(EntityReference ref,
String displayTitle,
Object entity,
Map<String,Object> entityProperties)
Full constructor Use this if you want to return the entity itself along with the key meta data and properties |
|
EntityData(Object data)
Using this as a data wrapper only |
|
EntityData(Object data,
Map<String,Object> entityProperties)
Using this as a data wrapper only |
|
EntityData(String reference,
String displayTitle)
Minimal constructor - used for most basic cases Use the setters to add in properties or the entity if desired |
|
EntityData(String reference,
String displayTitle,
Object entity)
Basic constructor Use this to construct a search result using the typical minimal amount of information, Use the setters to add in properties or the entity if desired |
|
EntityData(String reference,
String displayTitle,
Object entity,
Map<String,Object> entityProperties)
Full constructor Use this if you want to return the entity itself along with the key meta data and properties |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
Object |
getData()
(OPTIONAL - may be null) This is the entity data object itself (if there is one), this is included at the discretion of the entity provider author, if this is null then the entity data is not available or would be prohibitively large (i.e. typically left out for efficiency) |
String |
getDisplayTitle()
A string which is suitable for display and provides a short summary of the entity, typically 100 chars or less, this may be the name or title of the data represented by an entity |
String |
getEntityId()
|
Map<String,Object> |
getEntityProperties()
A set of properties to return along with the entity information, this may be presented and used for filtering, this will be empty if it is not used |
EntityReference |
getEntityRef()
The entity reference object which makes it easy to get to the prefix or id of this entity if needed |
String |
getEntityReference()
The entity reference - a globally unique reference to an entity, consists of the entity prefix and optional segments (normally the id at least) |
String |
getEntityURL()
The entityURL to the entity represented by this reference, should be an absolute entityURL (server name optional) |
int |
hashCode()
|
boolean |
isDataOnly()
|
boolean |
isDisplayTitleSet()
|
boolean |
isPopulated()
|
void |
setData(Object entity)
|
void |
setDataOnly(boolean dataOnly)
FOR INTERNAL USE ONLY - do not use |
void |
setDisplayTitle(String displayTitle)
A string which is suitable for display and provides a short summary of the entity, typically 100 chars or less, this may be the name or title of the data represented by an entity |
void |
setEntityProperties(Map<String,Object> entityProperties)
(OPTIONAL - may be null) A set of properties to return along with the entity information, this may be presented and used for filtering, should be null or empty if not used |
void |
setEntityURL(String url)
WARNING: for internal use only |
void |
setPopulated(boolean populated)
FOR INTERNAL USE ONLY - do not use |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EntityData(String reference,
String displayTitle)
reference - a globally unique reference to an entity,
consists of the entity prefix and id (e.g. /prefix/id)entityDisplayTitle - a string which is suitable for display and provides a short summary of the entity,
typically 100 chars or less, this may be the name or title of the entity represented by an entity
public EntityData(String reference,
String displayTitle,
Object entity)
reference - a globally unique reference to an entity,
consists of the entity prefix and id (e.g. /prefix/id)entityDisplayTitle - a string which is suitable for display and provides a short summary of the entity,
typically 100 chars or less, this may be the name or title of the entity represented by an entitydata - an entity data object, see Resolvable
public EntityData(String reference,
String displayTitle,
Object entity,
Map<String,Object> entityProperties)
reference - a globally unique reference to an entity,
consists of the entity prefix and id (e.g. /prefix/id)entityDisplayTitle - a string which is suitable for display and provides a short summary of the entity,
typically 100 chars or less, this may be the name or title of the entity represented by an entitydata - an entity data object, see ResolvableentityProperties - a set of properties to return along with the entity information,
this may be presented and used for filtering,
public EntityData(EntityReference ref,
String displayTitle)
ref - an object which represents a globally unique reference to an entity,
consists of the entity prefix and identityDisplayTitle - a string which is suitable for display and provides a short summary of the entity,
typically 100 chars or less, this may be the name or title of the entity represented by an entity
public EntityData(EntityReference ref,
String displayTitle,
Object entity)
ref - an object which represents a globally unique reference to an entity,
consists of the entity prefix and identityDisplayTitle - a string which is suitable for display and provides a short summary of the entity,
typically 100 chars or less, this may be the name or title of the entity represented by an entitydata - an entity data object, see Resolvable
public EntityData(EntityReference ref,
String displayTitle,
Object entity,
Map<String,Object> entityProperties)
ref - an object which represents a globally unique reference to an entity,
consists of the entity prefix and identityDisplayTitle - a string which is suitable for display and provides a short summary of the entity,
typically 100 chars or less, this may be the name or title of the entity represented by an entitydata - an entity data object, see ResolvableentityProperties - a set of properties to return along with the entity information,
this may be presented and used for filtering,public EntityData(Object data)
data - any data to wrap this in
public EntityData(Object data,
Map<String,Object> entityProperties)
data - any data to wrap this inentityProperties - a set of properties to return along with the entity information,
this may be presented and used for filtering,| Method Detail |
|---|
public void setData(Object entity)
public Object getData()
public String getEntityId()
public String getEntityReference()
public EntityReference getEntityRef()
public void setDisplayTitle(String displayTitle)
public String getDisplayTitle()
public boolean isDisplayTitleSet()
public void setEntityURL(String url)
url - the url to access this entitypublic String getEntityURL()
public void setEntityProperties(Map<String,Object> entityProperties)
entityProperties - a map of property name => valuepublic Map<String,Object> getEntityProperties()
public void setPopulated(boolean populated)
public boolean isPopulated()
public void setDataOnly(boolean dataOnly)
public boolean isDataOnly()
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||