| Modifier and Type | Interface and Description |
|---|---|
interface |
CoreEntityProvider
This is the base unit for working with Sakai entities, by implementing this interface and
creating a spring bean you will tie your entities into Sakai, there are many other interfaces
which you can implement to extend the interaction of your entities with Sakai in this package
You (the implementor) will want to create one implementation of this interface for each type of entity you want to link to Sakai to track events, provide URL access, etc. |
| Modifier and Type | Method and Description |
|---|---|
<T extends EntityProvider> |
EntityProviderManager.getPrefixesByCapability(Class<T> capability)
Gets the prefixes which support a specific capability
|
<T extends EntityProvider> |
EntityProviderManager.getProviderByPrefixAndCapability(String prefix,
Class<T> capability)
Get the entity provider by the prefix which uniquely defines all entities of a type and also
handles a specific capability
NOTE: this returns the provider that handles this capability (it may handle many other things as well) |
<T extends EntityProvider> |
EntityProviderManager.getProvidersByCapability(Class<T> capability)
Get all the entity providers which support a specific capability,
this useful if you need to get the providers and call the capability methods on them directly
|
<T extends EntityProvider> |
EntityProviderManager.registerListener(EntityProviderListener<T> listener,
boolean includeExisting)
Registers a listener which is called whenever entity providers are registered depending on the
filters in the
EntityProviderListenerThis is particularly useful for capabilities which should/must be executed one time only and should not be called over and over OR will not do anything until they are triggered |
<T extends EntityProvider> |
EntityProviderManager.unregisterListener(EntityProviderListener<T> listener)
Unregisters the listener if it is registered or does nothing
|
| Modifier and Type | Method and Description |
|---|---|
EntityProvider |
EntityProviderManager.getProviderByPrefix(String prefix)
Get the entity provider by the prefix which uniquely defines all entities of a type,
NOTE: this returns the CoreEntityProvider that handles the exists check (it
may handle many other things as well), the basic EntityProvider if there is no
CoreEntityProvider, OR null if neither exists |
EntityProvider |
EntityProviderManager.getProviderByReference(String reference)
Deprecated.
this method is no longer functional or supported
|
| Modifier and Type | Method and Description |
|---|---|
List<Class<? extends EntityProvider>> |
EntityProviderManager.getPrefixCapabilities(String prefix)
Get all the capabilities for a given entity prefix,
WARNING: This is very inefficient so you should normally use
EntityProviderManager.getProviderByPrefixAndCapability(String, Class)
when trying to determine if a provider implements a specific capability |
Map<String,List<Class<? extends EntityProvider>>> |
EntityProviderManager.getRegisteredEntityCapabilities()
Get all registered prefixes and their capabilities,
WARNING: This is very inefficient so you should normally use
EntityProviderManager.getProviderByPrefixAndCapability(String, Class)
when trying to determine if a provider implements a specific capability |
| Modifier and Type | Method and Description |
|---|---|
CustomAction[] |
EntityProviderMethodStore.findCustomActions(EntityProvider entityProvider,
boolean ignoreFailures)
Get all the custom actions that can be found
|
URLRedirect[] |
EntityProviderMethodStore.findURLRedirectMethods(EntityProvider entityProvider)
Looks for redirect methods in the given entity provider
|
void |
EntityProviderManager.registerEntityProvider(EntityProvider entityProvider)
Registers an entity provider with the manager, this allows registration to happen
programatically but the preferred method is to use the
AutoRegisterEntityProvider
instead (see the EntityProvider interface), replaces an existing entity provider which
uses the same prefix and handles the same capabilities if one is already registered, does not
affect other providers which handle the same prefix but handle other capabilitiesNOTE: This allows developers to register providers from all over the code base without requiring all capabilities to live in the same project (i.e. allows for a large reduction in dependencies and conflicts) |
void |
EntityProviderManager.unregisterEntityProvider(EntityProvider entityProvider)
Unregisters an entity provider with the manager, this will remove a registered entity broker
from the manager registration, if the entity provider supplied is not registered then no error
is thrown
|
| Modifier and Type | Method and Description |
|---|---|
void |
EntityProviderManager.unregisterCapability(String prefix,
Class<? extends EntityProvider> capability)
Unregisters an entity provider with the manager based on a prefix and capability, this will
remove a registered entity broker from the manager registration, if the prefix and capability
are not registered then no error is thrown
NOTE: Attempting to unregister the base EntityProvider will cause an exception, if you want to completely unregister a
type of entity you must use the EntityProviderManager.unregisterEntityProviderByPrefix(String) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
ActionsDefineable
This entity supports custom actions (as defined by RoR and REST microformat:
http://microformats.org/wiki/rest/urls)
This is the more controllable version, use ActionsExecutable if you
want to use the conventions and allow the system to detect your custom actions based
on method names and annotationsThis means that there are custom actions which can be invoked on entities or entity spaces, custom actions can augment the current entity operation or they can completely change the behavior and skip the current operation entirely You can create methods in your entity provider which either end with or use the EntityCustomAction suffix to define the custom actionsYou can describe the actions using the Describeable key: |
interface |
ActionsExecutable
This entity supports custom actions (as defined by RoR and REST microformat:
http://microformats.org/wiki/rest/urls)
This means that there are custom actions which can be invoked on entities or entity spaces, custom actions can augment the current entity operation or they can completely change the behavior and skip the current operation entirely You can create methods in your entity provider which either end with "CustomAction" or use the EntityCustomAction suffix to define the custom actionsYou can describe the actions using the Describeable key: |
interface |
ActionsExecutionControllable
This entity supports custom actions (as defined by RoR and REST microformat:
http://microformats.org/wiki/rest/urls)
This is the most complex interface for implementing custom actions but allows the most control also, use ActionsExecutable or ActionsDefineable in most circumstanceThis means that there are custom actions which can be invoked on entities or entity spaces, custom actions can augment the current entity operation or they can completely change the behavior and skip the current operation entirely You can describe the actions using the Describeable key: |
interface |
AutoRegisterEntityProvider
By implementing this interface you are telling the
EntityProviderManager to register this
entity broker as soon as spring creates it, to be exposed as part of the EntityBroker
This is one of the capability extensions for the EntityProvider interface |
interface |
Browseable
This indicates that this entity will participate in browse functionality for entities,
For example, it will provide lists of entities which are visible to users in locations
which can be looked through and selected
This is the root interface for browsing entities and does not do anything by itself, you must add at least BrowseableCollection or BrowseSearchable interface to this If your entities are nested then the nested ones will need to implement BrowseNestable Entities which do not implement this will not appear in lists of entities which are being browsed Internationalization keys: {prefix}.browse = the name to show in the browse list for this entity {prefix}.browse.description = the optional description that is viable to show in the browse list for this entity This is one of the capability extensions for the EntityProvider interface |
interface |
BrowseableCollection
This indicates that this entity will participate in browse functionality for entities,
For example, it will provide lists of entities which are visible to users in locations
which can be looked through and selected
Entities which do not implement this will not appear in lists of entities which are being browsed This is the convention interface and simply uses the results of calls to CollectionResolvable to
provide lists of entities for browsing, the implementor should be sure that ordering and limiting are supported
for the provided search object in their implementation of
CollectionResolvable.getEntities(org.sakaiproject.entitybroker.EntityReference, org.sakaiproject.entitybroker.entityprovider.search.Search)This is one of the capability extensions for the EntityProvider interfaceSee Browseable for the i18n keys This extends CollectionResolvable, use the BrowseSearchable interface if you require more control |
interface |
BrowseNestable
This indicates that this entity will participate in browse functionality for entities
and it is nested within another entity: Example:
A blog (parent) contains blog entries (children). |
interface |
BrowseSearchable
This indicates that this entity will participate in browse functionality for entities,
For example, it will provide lists of entities which are visible to users in locations
which can be looked through and selected
This provides fine grained control over which entities will appear in a browse list, normally CollectionResolvable should show all entities, however, for the browse list
we will explicitly filter by users and/or locations and may not show all entities,
entities which do not implement this or BrowseableCollection will not appear in lists of entities which are being browsedThis is one of the capability extensions for the EntityProvider interfaceThis is the configuration interface for BrowseableCollection (the convention interface) |
interface |
CollectionResolvable
|
interface |
Createable
This entity type can be created (this is the C in CRUD),
the current user id should be used for permissions checking in most cases
This is one of the capability extensions for the EntityProvider interface |
interface |
CRUDable
A convenient interface to define that this entity type supports all CRUD operations
This is one of the capability extensions for the EntityProvider interface |
interface |
Deleteable
This entity type can be deleted (this is the D in CRUD),
the current user id should be used for permissions checking in most cases
This is one of the capability extensions for the EntityProvider interface |
interface |
DepthLimitable
This entity type can specify its own recursion depth limit.
|
interface |
Describeable
This entity will describe itself,
this description can be accessed for display in interfaces,
the description should generally be targeted at developers
(in particular, those using REST or web services)
This is the convention interface, it will simply look for the properties file in the classloader which your EntityProvider is located in,
the file must be named <entity-prefix>.properties (e.g. myentity.properties)The keys inside the file must be as follows: <entity-prefix> = This is the main description of the entity, appears at the top <entity-prefix>.view. |
interface |
DescribeDefineable
Allows an entity to define the description of itself in code rather than using properties,
this will be called each time a description is needed so it should be efficient
This is the configuration interface This is one of the capability extensions for the EntityProvider interface |
interface |
DescribePropertiesable
This allows an entity to define the
Properties files/classes to be used
for looking up descriptions of the entity (Describeable)This is the configuration interface This is one of the capability extensions for the EntityProvider interface |
interface |
EntityViewUrlCustomizable
Indicates that the entity URLs for the types of entities handled by this provider
are customized by the set of entity templates returned
These will be used |
interface |
Exportable
Indicates an entity provider has the capability of exporting entity data which is related to
other entities, note that the decision about which data to export is left up to the implementor
based on the reference supplied
This is one of the capability extensions for the EntityProvider interface |
interface |
Importable
Indicates an entity provider has the capability of importing entity data that was previously
exported via the
Exportable capability which will be related to other entities, note that
the way to associate the data is left up to the implementor based on the reference supplied This is one of the capability extensions for the EntityProvider interface |
interface |
Inputable
These entities can be entered as certain input formats which are handled automatically
and translated into entity objects (of the type defined by
Sampleable)If you want to define the way the input is translated instead of using the internal methods then use InputTranslatableNOTE: By default all entity view requests go through to the available access providers: EntityViewAccessProvider or HttpServletAccessProvider |
interface |
InputTranslatable
Allows this entity to define the way to translate data for a reference
into an entity object depending on the format requested,
if you just want to use the internal methods to handle formatting the input
into an entity then simply use
InputableNOTE: throwing FormatUnsupportedException will pass control over to the internal
handlers for formatting, if you want to stop the request for this format type entirely then
throw an IllegalStateException and the processing will be halted |
interface |
LearningTrackable
This capability is for tracking learning events (LRS statements) related to this entity
If more advanced control is needed then use of the full LRS_Statement in then LearningResourceStoreService. |
interface |
Outputable
These entities can be returned as certain output formats which are handled automatically
If you want to define the data that is returned instead of using the internal methods then use OutputFormattableNOTE: By default all entity view requests go through to the available access providers: EntityViewAccessProvider or HttpServletAccessProvider
NOTE: there is no internal handling of HTML, it will always redirect to the the available access provider
if there is one (if there is not one then the entity will be toStringed) |
interface |
OutputFormattable
Allows this entity to define the output data format for a reference
or a list of entity objects depending on the format requested,
if you just want to use the internal methods to handle formatting the output
then simply use
OutputableNOTE: throwing FormatUnsupportedException will pass control over to the internal
handlers for formatting, if you want to stop the request for this format type entirely then
throw an IllegalStateException and the processing will be halted |
interface |
OutputSerializable
Allows this entity to better control the data that is going to be output by
allowing it to intercept the entities and return them as whatever objects
which should be serialized for output,
if you just want to use the internal methods to handle formatting the output
then simply use
Outputable |
interface |
Propertyable
Allows entities handled by the entity provider which implements this interface to have meta properties
attached to them, properties can be accessed via the
EntityBroker, properties will be
stored and retrieved using the internal entity property retrieval implementationFor our usage, meta properties are extra or additional properties that are attached to an entity at runtime but are persisted so they can be retrieved later WARNING: this should be used only for properties of entities which will be accessed very lightly, for production level access OR the ability to control how properties are stored on your own entities, you should use the PropertyProvideable instead This is one of the capability extensions for the EntityProvider interface |
interface |
PropertyProvideable
Allows entities handled by the entity provider which implements this interface to have meta properties
attached to them, these properties can be accessed via the
EntityBroker, properties will be
stored and retrieved via the methods which are implemented in this interfaceFor our usage, meta properties are extra or additional properties that are attached to an entity at runtime but are persisted so they can be retrieved later Allows the entity provider to define and control the way properties are stored on its own entities, if you would prefer to use the internal storage and only have lightweight property storage needs then use Propertyable insteadNOTE: the validity of references and parameters is checked in the broker before the call goes to the provider This is one of the capability extensions for the EntityProvider interface |
interface |
Redirectable
This entity type has the ability to define and handle configurable URLs,
URLs like this can be handled and supported:
/gradebook/7890/student/70987 to view all the grades for a student from a course /gradebook/6758/item/Quiz1 to view a particular item in a gradebook by it's human readable name /gradebook/item/6857657 to maybe just a view an item by its unique id. |
interface |
RedirectControllable
This entity type has the ability to define and handle configurable URLs
This adds the ability to control all redirects via a central method URLs like this can be handled and supported: /gradebook/7890/student/70987 to view all the grades for a student from a course /gradebook/6758/item/Quiz1 to view a particular item in a gradebook by it's human readable name /gradebook/item/6857657 to maybe just a view an item by its unique id. |
interface |
RedirectDefinable
This entity type has the ability to define and handle configurable URLs
This adds the ability to supply a large set of simple redirects URLs like this can be handled and supported: /gradebook/7890/student/70987 to view all the grades for a student from a course /gradebook/6758/item/Quiz1 to view a particular item in a gradebook by it's human readable name /gradebook/item/6857657 to maybe just a view an item by its unique id. |
interface |
ReferenceParseable
Indicates an entity provider has the capability of parsing its own reference string.
|
interface |
RequestAware
Indicates that this entity provider needs to be request aware,
this allows the entity provider to get hold of information from the request at any time
by directly accessing the request and response objects (if we are inside a request),
if there is no current request then this method will fail to return anything
This is primarily intended to provide access to request parameters while operating inside the entity provider |
interface |
RequestHandler
Indicates that this entity provider will handle its own entity view requests,
this would be very unusual but it allows the entity provider itself to redirect
requests to a tool and normally would be used if there is some special circumstance only
WARNING: This will be called before any other request handling and before the access provider is called and will cause all other processing to be skipped (includes REST calls, custom actions, formatting, etc.) |
interface |
RequestInterceptor
Allows actions to be taken before a direct request is handled or after it has been handled,
will only affect requests coming in via the direct servlet
|
interface |
RequestStorable
Indicates that this entity provider is aware of the requests and can get to
the stored values in the request or can store its own,
this allows the entity provider to get hold of information from the request at any time
This is primarily intended to provide access to request data while operating inside the entity provider without depending on servlet knowledge This provides access to the special indicator values which can be used to see what kind of request is operating and get information about it, see the RequestStorage object for more infoIf you need to get to the servlet data see RequestAware and RequestInterceptor |
interface |
Resolvable
Allows the entities handled by this provider to be accessed directly as objects,
this is also the interface for "reading" entities (this is the R in CRUD)
This is also used for resolving the type of entities This is one of the capability extensions for the EntityProvider interface |
interface |
RESTful
Indicates that entities handled by this provider are RESTful as defined by the REST microformat:
http://microformats.org/wiki/rest/urls Requires all CRUD functionality, Collection handling, HTML handling, and ability to support output formats This is mostly a convenience interface to make sure that everything needed to support REST has been implemented, it also includes the marker to indicate that RESTful URLs should work for entities of this type |
interface |
Sampleable
This entity type can be known and this allows access to a sample object which represents it,
the sample object can be of any type including a POJO, a
Map, etc. |
interface |
Saveable
Convenience interface to indicates that an entity is can be saved,
i.e. it is creatable and updateable
|
interface |
Searchable
Indicates an entity provider has the capability of allowing the entities associated with it to be searchable,
entities which implement this will be linked to the core search functionality
If you need to force an entity or entities to be added to the search indexes then you should use the SearchProvider.add(String, org.sakaiproject.entitybroker.entityprovider.extension.SearchContent)
method in the system core to cause immediate indexing
This is one of the capability extensions for the EntityProvider interface |
interface |
Statisticable
This capability is for tracking statistics of events for entities related to a tool,
it will be used by the site stats service for event tracking and reporting
Contact Nuno Fernandes (nuno@ufp.edu.pt) if you have questions This is one of the capability extensions for the EntityProvider interface |
interface |
Taggable
Allows an entity to have tags associated with it which can be searched for or simply used as a
way to link to this entity
This uses the internal tag storage mechanism or a central tag storage mechanism to store the tag applications This is one of the capability extensions for the EntityProvider interface |
interface |
TagProvideable
Allows an entity to control and provide tag storage and searching,
this overrides internal tag storage and any existing tag storage will
be ignored in favor of the provided tags
This is the provider interface for Taggable, inherits all methods from TagProviderThis is one of the capability extensions for the EntityProvider interface |
interface |
TagSearchable
Deprecated.
no longer functional, use
TagProvideable |
interface |
Updateable
This entity type can be updated (this is the U in CRUD),
the current user id should be used for permissions checking in most cases
This is one of the capability extensions for the EntityProvider interface |
| Modifier and Type | Interface and Description |
|---|---|
interface |
EntityProviderListener<T extends EntityProvider>
This allows a developer to be notified whenever a provider is registered,
it will also ensure that it calls the listener method for any providers that are already registered
when it is first registered if desired
Usage: Just implement this class and use EntityProviderManager#registerNotifier(EntityProviderNotifier) to
register it with the system. |
Copyright © 2003–2021 Sakai Project. All rights reserved.