|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||
EntityViewAccessProvider or HttpServletAccessProvider if nothing is specified here
or this interface is not implementedEntityViewAccessProvider or HttpServletAccessProvider if nothing is specified here
or this interface is not implementedEntityCustomAction annotation to indicate custom actions
for your entities
ActionsExecutable if you
want to use the conventions and allow the system to detect your custom actions based
on method names and annotationsEntityCustomAction suffix to define the custom actionsDescribeable key: EntityCustomAction suffix to define the custom actionsDescribeable key: ActionsExecutable or ActionsDefineable in most circumstanceDescribeable key: EntityProviderManager to register this
entity broker as soon as spring creates it, to be exposed as part of the EntityBroker
EntityProvider interfaceAutoRegister)AutoRegister)EntityException and include the type of response you would like to return in the exception
(this can be a success or failure response status)
BrowseableCollection or BrowseSearchable interface to this BrowseNestable EntityProvider interfaceCollectionResolvable 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)EntityProvider interfaceBrowseable for the i18n keys CollectionResolvable, use the BrowseSearchable interface if you require more controlBrowseable for the i18n keys 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 browsedEntityProvider interfaceBrowseableCollection (the convention interface)HttpServletAccessProvider
or EntityViewAccessProvider
and the implementations of those should also implement this interface
to be able to specify the classloaderObject, Map, whatever POJO, etc.)EntityProvider interfaceEntityProvider interfaceActionsDefineable
DeveloperHelperService.populate(Object, Map) if you want to convert it
into a known object type DeveloperHelperService.convert(Object, Class) method is recommended #populate(Object, Map) if you want to convert it
into a known object type #convert(Object, Class) method is recommended #handleRedirects(String, String[], Map)
NOTE: /{prefix}/ must be included as the start of the templateEntityProvider interfaceEntityProvider is located in,
the file must be named <entity-prefix>.properties (e.g. myentity.properties)EntityProvider interfaceProperties files/classes to be used
for looking up descriptions of the entity (Describeable)EntityProvider interfaceActionsExecutable,
this should not be placed on any methods defined by a capability but should be placed on methods
which you want to be exposed as custom actionsEntityView.VIEW_SHOW),
you can add in action and viewKey annotation params to change those settingsDate, Long, long, or String (will attempt to convert this to a long)EntityBrokerDate, Long, long, or String (will attempt to convert this to a long)CoreEntityProvider.EntityProviderManager#registerNotifier(EntityProviderNotifier) to
register it with the system.EntityProvider interface for
detailsEntityBroker.fireEntityRequest(String, String, String, Map, Object) methodTemplateParseUtil.TEMPLATE_PREFIX) String or voidString : incoming URL EntityView.Method : the submission method (GET,POST,etc) Map (String => String) : a map of the variable values in the {},
Example: pattern: /{prefix}/{thing}/apple, url: /myprefix/123/apple, would yield: {'thing' => '123','prefix' => 'mypreifx'} TemplateParseUtil.DOT_EXTENSION and TemplateParseUtil.EXTENSION values from the variable map
which will contain the extension that was passed in Redirectable capabilityEntityView,
this replaces the HttpServletAccessProvider as all entity URLs are now being parsed
so more information can be provided through the EntityViewEntityViewAccessProviderManager in a context loader listenerSecurityException during the course of this method, the
access will be directed to a login page or authentication method before being redirected back to
the implementation methodAccessFormatsEntityProvider interfaceCollectionResolvable 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
EntityBrokerResolvable capability if implemented by the responsible EntityProvider, or
else from the underlying legacy Sakai entity system
Resolvable capability if implemented by the responsible EntityProvider, or
else from the underlying legacy Sakai entity systemString or Map and does not have to be a POJO,
the type of object should be determined out of bandResolvable or available in the legacy entity system
String or Map and does not have to be a POJO,
the type of object should be determined out of bandRequestStorable request params for extra information
about the current user and location and other possible params when implementing thisTagProvideable and TagProvider instead
EntityBrokerUnsupportedOperationException
Formats) to return the entity data in if there is any,
if using an outputstream, use encoding and mimetype
EntityData objects include meta data and
the data they contain can be of any object type (though all data will come from
your provider so the types should not be surprising)
Properties file/class baseName which is used to find descriptions of an entity
as per the keys defined in Describeablemyentity - would match: myentity.properties, myentity_en.properties, myentity_en_GB.properties, etc.
Browseable, this provides the root entities when there is no parent prefix provided DeveloperHelperService.getCurrentUserReference() instead
CustomAction for a prefix and action if it exists
CollectionResolvable first if available or BrowseSearchable if not,
returns the entities wrapped in EntityData,
correctly handles references to single entities as well
Map, String, EntityData, etc.) to give to anyone calling this method.
EntityBrokerServerConfigurationService,
(e.g. http://server:8080/direct/entity/123/)org.sakaiproject.entitybroker.util.servlet.DirectServlet must be deployed there on this
server.
EntityView object which represents a specific view
of an entity or entity collection, this is similar to EntityBroker.getEntityURL(String, String, String)
but allows the developer to deal with the EntityView object if desired
EventReceiver.receiveEvent(String, String) will be called whenever an event occurs which has a name
which begins with any of the strings this method returns, simply return empty array if you do
not want to match events this wayEventReceiver.getResourcePrefix()
Formats.HTML in the return will stop all redirects to the access providers
and therefore will cause HTML requests for entities to go nowhere
EntityViewAccessProvider
if they are not handled
EntityReference
Describeable or a sub interface),
EntityView.toString() or EntityView.getEntityURL(String, String)
EntityReference.toString() or EntityReference.getReference()
EntityReference class that this
EntityProvider uses as its reference type.
TemplateParseUtil.PARSE_TEMPLATE_KEYS#SEPARATOR are special characters and must be used as indicated only#SEPARATOR, must not end with a #SEPARATOR#SEPARATOR and #PREFIX constants)TemplateParseUtil.VALID_VAR_CHARSTemplateParseUtil.VALID_TEMPLATE_CHARSTemplateParseUtil.PARSE_TEMPLATE_KEYS,
any that you do not include will simply use the default templates, be careful though,
since they will be parsed in order you have to be careful about the order you place your templates
in the list, check the default order as an example
EntityReference.EntityReference(String) and
the methods in EntityBroker to parse references
EntityProviderManager.getProviderByPrefixAndCapability(String, Class)
when trying to determine if a provider implements a specific capability
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
EntityReference.toString()
EntityProviderManager.getProviderByPrefixAndCapability(String, Class)
when trying to determine if a provider implements a specific capability
EntityProvider prefixes
EntityProviders
EventReceiver.receiveEvent(String, String) will be called whenever an event occurs which has a
resource which begins with the string this method returns, simply return empty string to match
no events this wayEventReceiver.getEventNamePrefixes()
Createable.createEntity(EntityReference, Object, java.util.Map),
this is necessary so that the type of the entity object is known and the right fields can
be pre-filled, it also allows us to support the case of different read and write objects
Note: The entity class type needs to be able to be resolved from the ClassLoader of the
EntityBroker (currently this means deployed into shared) TagProvider.getTagsForEntity(String)
Restriction.property (can be an array of items)
EntityException to specify why OR throw a general Exception,
both will kill the request entirely but the general exception will pass through the system
while the EntityException will produce a handled result
EntityViewAccessProvider instead
RedirectControllable.defineHandledTemplatePatterns()
do some processing to turn it into an outgoing URL OR just do some processing OR
indicate that a failure has occurredActionReturn.Header),
Example: EntityViewAccessProvider insteadEntityViewAccessProviderManager insteadEntityReference.getId() to get the id
EntityReference directly, this will be removed eventuallyEntityReference.EntityReference(String)
EntityReference.EntityReference(String, String)
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 EntityProvider interfaceSampleable)InputTranslatableEntityViewAccessProvider or HttpServletAccessProviderInputableFormatUnsupportedException 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 haltedRequestStorage (from RequestStorable capability) for more info
EntityView object
ClassLoader for this entity prefix
EntityReference.getId() method
EntityReference.getPrefix() method
EntityCustomAction or if the developer has defined this
explicitly
EntityCustomAction or if the developer has defined this
explicitly
Order ota = new Order("title"); // order by title ascendingOrder otd = new Order("title", false); // order by title descendingOutputFormattableEntityViewAccessProvider 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)OutputableFormatUnsupportedException 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 haltedOutputableEntityReference, or some
class derived from it, for example IdEntityReference or some other class of object
which is returned from ParseSpecParseable.
EntityProvider,
uniquely identifies an entity space or entity typeEntityReference.getPrefix() method rather than referring to this directly
PropertyProvideable for more informationEntityBroker, properties will be
stored and retrieved using the internal entity property retrieval implementationPropertyProvideable instead EntityProvider interfaceEntityBroker, properties will be
stored and retrieved via the methods which are implemented in this interfacePropertyable insteadEntityProvider interfaceAutoRegisterEntityProvider
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 capabilitiesEntityProviderListenerRequestStorage object for more infoRequestAware and RequestInterceptorLocale
_requestEntityReference : String
_requestActive : [true,false]
_requestOrigin : ['REST','EXTERNAL','INTERNAL']
RequestStorageLocale
_requestEntityReference : String
_requestActive : [true,false]
_requestOrigin : ['REST','EXTERNAL','INTERNAL']
EntityProvider interfaceHttpServletResponse
DeveloperHelperService.setCurrentUser(String) was called or
does nothing if there was no previous user stored
Restriction rteq = new Restriction("title", curTitle); // restrict search to title equals value of curTitleRestriction rtne = new Restriction("title", curTitle, Restriction.NOT_EQUALS); // restrict search to title not equals value of curTitleEntityProviderManager
like EntityProviderManager.getProviderByPrefix(String) and
EntityProviderManager.getProviderByPrefixAndCapability(String, Class) among others,
you can cache the prefix name and capabilities if you need to
Map, etc.Search s1 = new Search("title", curTitle); // search where title equals value of curTitleSearch s2 = new Search("title", curTitle, Restriction.NOT_EQUALS); // search where title not equals value of curTitleSearch s2 = new Search(
new Restriction("title", curTitle),
new Order("title")
); // search where title equals value of curTitle and order is by title ascendingSearchProvider.add(String, org.sakaiproject.entitybroker.entityprovider.extension.SearchContent)
method in the system core to cause immediate indexing
EntityProvider interfaceSearchContent.setSummary(String) or SearchContent.setSummaryReader(Reader)
TemplateParseUtil#parseTemplate(String, Map) method
and will be null otherwise
EntityBroker
system from a REST handler, the system will operate without this set but some methods will fail
Formats) to return the entity data in if there is any,
if using an outputstream, use encoding and mimetype
ActionReturn.Header),
Example: TagProvider.setTagsForEntity(String, String[])
EntityProvider interfaceEntityProvider interfaceTaggable, inherits all methods from TagProviderEntityProvider interfaceTagProvideableTagProvideable and TagProvider insteadTemplateParseUtil.PARSE_TEMPLATE_KEYS,
or make one up for your own templates, should be unique for this set of templates
RedirectDefinableTemplateParseUtil.PARSE_TEMPLATE_KEYSTemplateParseUtil.SEPARATOR are special characters and must be used as indicated only
2) Must begin with a TemplateParseUtil.SEPARATOR, must not end with a TemplateParseUtil.SEPARATOR
3) must begin with "/{prefix}" (use the TemplateParseUtil.SEPARATOR and TemplateParseUtil.PREFIX constants)
3) each {var} can only be used once in a template
4) {var} can never touch each other (i.e /{var1}{var2}/{id} is invalid)
5) each {var} can only have the chars from TemplateParseUtil.VALID_VAR_CHARS
6) parse templates can only have the chars from TemplateParseUtil.VALID_TEMPLATE_CHARS
7) Empty braces ({}) cannot appear in the templateEntityProvider will cause an exception, if you want to completely unregister a
type of entity you must use the EntityProviderManager.unregisterEntityProviderByPrefix(String)
EntityProvider interfaceResolvable.getEntity(EntityReference)
and the the fields will be updated and it will be passed into this method
IllegalArgumentException
Restriction.property (can be an array of items)
EntityView.Method.DELETE to a specific entity
EntityView.Method.PUT (or POST) to a specific entity,
also indicates an action related to writing a specific entity
EntityView.Method.GET to the entity space/collection,
also indicates an action related to reading a collection of entities
EntityView.Method.POST (or PUT) to the entity space/collection,
also indicates an action related to writing a collection of entities
EntityView.Method.GET to a specific entity,
also indicates an action related to reading a specific entity
EntityView
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||