Class BrowseEntity


  • public class BrowseEntity
    extends Object
    This is an object to hold data about a browseable entity type
    Author:
    Aaron Zeckoski (azeckoski @ gmail.com)
    • 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 prefix
        title - a display title
        description - (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 prefix
        title - a display title
        description - (optional) display description
        nestedPrefixes - (optional) the list of nested (children) prefixes
        entityViewKeys - (optional) the list of handled views for the access provider
    • Method Detail

      • setTitleDesc

        public void setTitleDesc​(String title,
                                 String description)
      • 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object