public interface EntityBrokerManager
| Modifier and Type | Field and Description |
|---|---|
static String |
POST_METHOD |
| Modifier and Type | Method and Description |
|---|---|
List<EntityData> |
browseEntities(String prefix,
Search search,
String userReference,
String associatedReference,
EntityReference parentEntityRef,
Map<String,Object> params)
Fetches the browseable entities
|
List<EntityData> |
convertToEntityData(List<?> entities,
EntityReference ref)
Convert a list of objects to entity data objects (also populates them),
will preserve null (i.e. null in => null out)
|
EntityData |
convertToEntityData(Object entity,
EntityReference ref)
Convert a single object to an entity data object (also populates it),
will preserve null (i.e. null in => null out)
|
boolean |
entityExists(EntityReference ref)
Determines if an entity exists based on the reference
|
List<?> |
fetchEntities(EntityReference ref,
Search search,
Map<String,Object> params)
Get a list of entities from
CollectionResolvable first if available or BrowseSearchable if not,
returns the entities as actual entities (converts from EntityData if that was used),
correctly handles references to single entities as well |
Object |
fetchEntity(EntityReference ref)
Get an entity object of some kind for this reference if it has an id,
will simply return null if no id is available in this reference
|
List<BrowseEntity> |
getBrowseableEntities(String parentPrefix)
Get the meta data about browseable entities
|
List<EntityData> |
getEntitiesData(EntityReference ref,
Search search,
Map<String,Object> params)
Get a list of entities from
CollectionResolvable first if available or BrowseSearchable if not,
returns the entities wrapped in EntityData,
correctly handles references to single entities as well |
EntityData |
getEntityData(EntityReference ref)
Get the entity data for a reference if possible
|
EntityPropertiesService |
getEntityPropertiesService()
Allows access to the current EntityPropertiesService
|
EntityProviderManager |
getEntityProviderManager()
Allows access to the current EntityProviderManager service
|
EntityProviderMethodStore |
getEntityProviderMethodStore()
Allows access to the current EntityProviderMethodStore service
|
EntityRESTProvider |
getEntityRESTProvider()
Allows access to the registered REST provider if there is one
|
String |
getEntityURL(String reference,
String viewKey,
String extension)
Creates the full URL to an entity using the sakai
ServerConfigurationService,
(e.g. http://server:8080/direct/entity/123/)Note: the webapp name (relative URL path) of the direct servlet, of "/direct" is hardcoded into this method, and the org.sakaiproject.entitybroker.util.servlet.DirectServlet must be deployed there on this
server. |
EntityViewAccessProviderManager |
getEntityViewAccessProviderManager()
Allows access to the current EntityViewAccessProviderManager service
|
ExternalIntegrationProvider |
getExternalIntegrationProvider()
Allows access to any registered ExternalIntegrationProvider
|
int |
getMaxJSONLevel()
Returns the maximum depth of object graph allowed during transcoding to JSON
|
RequestGetterWrite |
getRequestGetter()
Allows access to the current RequestGetter service
|
RequestStorageWrite |
getRequestStorage()
Allows access to the current RequestStorageWrite service
|
Object |
getSampleEntityObject(String prefix,
String id)
Safely get the sample entity object which is defined for a prefix,
if there is not one then return null
|
String |
getServletContext()
FOR INTERNAL USE ONLY (do not mess with this in other words)
This gets the known REST servlet context if there is one, will return a default "/rest" if none is known, will not return "" or null
|
String |
getVersionInfo()
Used to get a version info string which can be output to see what version we are working with
|
EntityView |
makeEntityView(EntityReference ref,
String viewKey,
String extension)
Reduce code duplication and ensure custom templates are used
|
String |
makeFullURL(String pathURL)
Make a full entity URL (http://....) from just a path URL (/prefix/id.xml)
|
EntityView |
parseEntityURL(String entityURL)
Parses an entity URL into an entity view object,
handles custom parsing templates
|
EntityReference |
parseReference(String reference)
Parses an entity reference into the appropriate reference form
|
void |
populateEntityData(EntityData[] data)
Add in the extra meta data (URL, title, etc.) to all entity data objects,
handles it as efficiently as possible without remaking an entity view on every call,
this is fail safe (i.e. it should throw no exceptions)
|
void |
populateEntityData(List<EntityData> data)
Add in the extra meta data (URL, title, etc.) to all entity data objects,
handles it as efficiently as possible without remaking an entity view on every call,
this is fail safe (i.e. it should throw no exceptions)
|
void |
setEntityRESTProvider(EntityRESTProvider entityRESTProvider)
Allows the developer to set a REST provider to add functionality to the
EntityBroker
system from a REST handler, the system will operate without this set but some methods will fail |
void |
setExternalIntegrationProvider(ExternalIntegrationProvider externalIntegrationProvider)
Allows developers to setup providers to handle parts of the EB system which cannot
really be handled internally, the system will operate without this set
|
void |
setServletContext(String servletContext)
FOR INTERNAL USE ONLY (do not mess with this in other words)
|
static final String POST_METHOD
boolean entityExists(EntityReference ref)
reference - an entity reference objectString getEntityURL(String reference, String viewKey, String extension)
ServerConfigurationService,
(e.g. http://server:8080/direct/entity/123/)org.sakaiproject.entitybroker.util.servlet.DirectServlet must be deployed there on this
server.reference - a globally unique reference to an entity,
consists of the entity prefix and optionally the local idviewKey - the specific view type to get the URL for,
can be null to determine the key automaticallyextension - the optional extension to add to the end,
can be null to use no extensionEntityView makeEntityView(EntityReference ref, String viewKey, String extension)
EntityReference parseReference(String reference)
reference - a unique entity referenceIllegalArgumentException - if there is a failure during parsingEntityView parseEntityURL(String entityURL)
entityURL - an entity URLIllegalArgumentException - if there is a failure during parsingString makeFullURL(String pathURL)
pathURL - a path (like pathInfo from a request) (e.g. /prefix/id.xml)IllegalArgumentException - is the pathURL is nullObject fetchEntity(EntityReference ref)
ref - an entity referenceEntityData getEntityData(EntityReference ref)
ref - an entity referenceEntityData object for this reference if one can be found OR null if notList<?> fetchEntities(EntityReference ref, Search search, Map<String,Object> params)
CollectionResolvable first if available or BrowseSearchable if not,
returns the entities as actual entities (converts from EntityData if that was used),
correctly handles references to single entities as wellref - the referencesearch - a search (should not be null)params - List<EntityData> getEntitiesData(EntityReference ref, Search search, Map<String,Object> params)
CollectionResolvable first if available or BrowseSearchable if not,
returns the entities wrapped in EntityData,
correctly handles references to single entities as wellref - the referencesearch - a search (should not be null)params - List<EntityData> browseEntities(String prefix, Search search, String userReference, String associatedReference, EntityReference parentEntityRef, Map<String,Object> params)
prefix - search - userReference - associatedReference - parentEntityRef - params - List<BrowseEntity> getBrowseableEntities(String parentPrefix)
parentPrefix - the prefix of the parent type (null for the root types)List<EntityData> convertToEntityData(List<?> entities, EntityReference ref)
EntityData convertToEntityData(Object entity, EntityReference ref)
void populateEntityData(List<EntityData> data)
data - a list of entity datavoid populateEntityData(EntityData[] data)
data - a list of entity dataObject getSampleEntityObject(String prefix, String id)
prefix - the entity prefixid - (optional) will get the actual entity for this id as a sampleEntityProviderManager getEntityProviderManager()
EntityPropertiesService getEntityPropertiesService()
EntityViewAccessProviderManager getEntityViewAccessProviderManager()
EntityProviderMethodStore getEntityProviderMethodStore()
RequestGetterWrite getRequestGetter()
RequestStorageWrite getRequestStorage()
ExternalIntegrationProvider getExternalIntegrationProvider()
EntityRESTProvider getEntityRESTProvider()
void setExternalIntegrationProvider(ExternalIntegrationProvider externalIntegrationProvider)
externalIntegrationProvider - the external integration provider to use in the systemvoid setEntityRESTProvider(EntityRESTProvider entityRESTProvider)
EntityBroker
system from a REST handler, the system will operate without this set but some methods will failentityRESTProvider - a service to provide REST functionalityString getVersionInfo()
void setServletContext(String servletContext)
servletContext - sets the servlet context being used by the system (defaults to #DIRECT)String getServletContext()
int getMaxJSONLevel()
Copyright © 2003–2021 Sakai Project. All rights reserved.