Class BrowseEntity
- java.lang.Object
-
- org.sakaiproject.entitybroker.entityprovider.extension.BrowseEntity
-
public class BrowseEntity extends Object
This is an object to hold data about a browseable entity type- Author:
- Aaron Zeckoski (azeckoski @ gmail.com)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBrowseEntity.PrefixComparatorstatic classBrowseEntity.TitleComparator
-
Constructor Summary
Constructors Constructor Description BrowseEntity(String prefix)Minimal constructorBrowseEntity(String prefix, String title, String description)Constructor for types with no children or access providerBrowseEntity(String prefix, String title, String description, String[] nestedPrefixes, String[] entityViewKeys)Constructor for complete types with most optional information, all optionals can be null
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEntityViewKeys(String entityViewKey)Adds a view key which is known to be supported by this entity types access providervoidaddNestedPrefix(String prefix)Adds a nested prefix which is a child of this entity typebooleanequals(Object obj)StringgetDescription()List<String>getEntityAccessViews()Get the list of entity access views (e.g.List<String>getNestedPrefixes()Gets all the nested children prefixes for this entity type (if there are any)StringgetParentPrefix()StringgetPrefix()StringgetTitle()inthashCode()voidsetEntityViewKeys(String[] entityViewKeys)voidsetNestedPrefixes(String[] nestedPrefixes)voidsetParentPrefix(String parentPrefix)voidsetTitleDesc(String title, String description)StringtoString()
-
-
-
Constructor Detail
-
BrowseEntity
public BrowseEntity(String prefix)
Minimal constructor- Parameters:
prefix- an entity prefix
-
BrowseEntity
public BrowseEntity(String prefix, String title, String description)
Constructor for types with no children or access provider- Parameters:
prefix- an entity prefixtitle- a display titledescription- (optional) display description
-
BrowseEntity
public BrowseEntity(String prefix, String title, String description, String[] nestedPrefixes, String[] entityViewKeys)
Constructor for complete types with most optional information, all optionals can be null- Parameters:
prefix- an entity prefixtitle- a display titledescription- (optional) display descriptionnestedPrefixes- (optional) the list of nested (children) prefixesentityViewKeys- (optional) the list of handled views for the access provider
-
-
Method Detail
-
setNestedPrefixes
public void setNestedPrefixes(String[] nestedPrefixes)
-
setEntityViewKeys
public void setEntityViewKeys(String[] entityViewKeys)
-
addNestedPrefix
public void addNestedPrefix(String prefix)
Adds a nested prefix which is a child of this entity type- Parameters:
prefix- an entity prefix
-
addEntityViewKeys
public void addEntityViewKeys(String entityViewKey)
Adds a view key which is known to be supported by this entity types access provider- Parameters:
entityViewKey- an entity view key (e.g.EntityView.VIEW_NEW)
-
setParentPrefix
public void setParentPrefix(String parentPrefix)
-
getPrefix
public String getPrefix()
- Returns:
- the entity prefix for this browseable entity type
-
getTitle
public String getTitle()
- Returns:
- the display title for this entity type (will not be null, may just be the prefix)
-
getDescription
public String getDescription()
- Returns:
- the optional description of this type of entity (may be null)
-
getParentPrefix
public String getParentPrefix()
- Returns:
- the prefix for the parent entity type for this type of entity OR null if this is a root type
-
getNestedPrefixes
public List<String> getNestedPrefixes()
Gets all the nested children prefixes for this entity type (if there are any)- Returns:
- the list of nested (children) prefixes for this entity type OR null if there are none (will not be empty list)
-
getEntityAccessViews
public List<String> getEntityAccessViews()
Get the list of entity access views (e.g.EntityView.VIEW_NEW) that are known to be handled by this entity type- Returns:
- the list of view keys OR empty if none handled OR null if the handled views are unknown
-
-