Class RedirectDefineableEntityProviderMock
- java.lang.Object
-
- org.sakaiproject.entitybroker.mocks.EntityProviderMock
-
- org.sakaiproject.entitybroker.mocks.CRUDableEntityProviderMock
-
- org.sakaiproject.entitybroker.mocks.RESTfulEntityProviderMock
-
- org.sakaiproject.entitybroker.mocks.RedirectDefineableEntityProviderMock
-
- All Implemented Interfaces:
org.sakaiproject.entitybroker.entityprovider.capabilities.ActionsExecutable,org.sakaiproject.entitybroker.entityprovider.capabilities.CollectionResolvable,org.sakaiproject.entitybroker.entityprovider.capabilities.Createable,org.sakaiproject.entitybroker.entityprovider.capabilities.CRUDable,org.sakaiproject.entitybroker.entityprovider.capabilities.Deleteable,org.sakaiproject.entitybroker.entityprovider.capabilities.Describeable,org.sakaiproject.entitybroker.entityprovider.capabilities.Inputable,org.sakaiproject.entitybroker.entityprovider.capabilities.Outputable,org.sakaiproject.entitybroker.entityprovider.capabilities.Redirectable,org.sakaiproject.entitybroker.entityprovider.capabilities.RedirectDefinable,org.sakaiproject.entitybroker.entityprovider.capabilities.Resolvable,org.sakaiproject.entitybroker.entityprovider.capabilities.RESTful,org.sakaiproject.entitybroker.entityprovider.capabilities.Sampleable,org.sakaiproject.entitybroker.entityprovider.capabilities.Saveable,org.sakaiproject.entitybroker.entityprovider.capabilities.Updateable,org.sakaiproject.entitybroker.entityprovider.CoreEntityProvider,org.sakaiproject.entitybroker.entityprovider.EntityProvider,org.sakaiproject.entitybroker.entityprovider.extension.Formats
public class RedirectDefineableEntityProviderMock extends RESTfulEntityProviderMock implements org.sakaiproject.entitybroker.entityprovider.CoreEntityProvider, org.sakaiproject.entitybroker.entityprovider.capabilities.RESTful, org.sakaiproject.entitybroker.entityprovider.capabilities.RedirectDefinable
Stub class to make it possible to test theRedirectDefinablecapabilities, will perform like the actual class so it can be reliably used for testing
Will perform allCRUDableoperations as well as allowing for internal data output processing
ReturnsMyEntityobjects
Allows for testingResolvableandCollectionResolvableas well, returns 2MyEntityobjects if no search restrictions, 1 if "stuff" property is set, none if other properties are set- Author:
- Aaron Zeckoski (aaron@caret.cam.ac.uk)
-
-
Field Summary
Fields Modifier and Type Field Description String[]templates-
Fields inherited from class org.sakaiproject.entitybroker.mocks.CRUDableEntityProviderMock
myEntities
-
Fields inherited from class org.sakaiproject.entitybroker.mocks.EntityProviderMock
prefix
-
Fields inherited from interface org.sakaiproject.entitybroker.entityprovider.capabilities.ActionsExecutable
ACTION_METHOD_SUFFIX
-
Fields inherited from interface org.sakaiproject.entitybroker.entityprovider.capabilities.CollectionResolvable
SEARCH_LOCATION_REFERENCE, SEARCH_TAGS, SEARCH_USER_REFERENCE
-
Fields inherited from interface org.sakaiproject.entitybroker.entityprovider.extension.Formats
ALL_KNOWN_FORMATS, ATOM, ATOM_EXTENSIONS, ATOM_MIME_TYPE, FORM, FORM_EXTENSIONS, FORM_MIME_TYPE, HTML, HTML_EXTENSIONS, HTML_MIME_TYPE, JSON, JSON_EXTENSIONS, JSON_MIME_TYPE, JSONP, JSONP_EXTENSIONS, JSONP_MIME_TYPE, RSS, RSS_EXTENSIONS, RSS_MIME_TYPE, TXT, TXT_EXTENSIONS, TXT_MIME_TYPE, UTF_8, XML, XML_EXTENSIONS, XML_MIME_TYPE
-
-
Constructor Summary
Constructors Constructor Description RedirectDefineableEntityProviderMock(String prefix, String[] ids)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.sakaiproject.entitybroker.entityprovider.extension.TemplateMap[]defineURLMappings()StringneverRedirector(String incomingURL, Map<String,String> values)StringreturningRedirector(String incomingURL, Map<String,String> values)-
Methods inherited from class org.sakaiproject.entitybroker.mocks.RESTfulEntityProviderMock
getHandledInputFormats, getHandledOutputFormats
-
Methods inherited from class org.sakaiproject.entitybroker.mocks.CRUDableEntityProviderMock
createEntity, deleteEntity, entityExists, getEntities, getEntity, getSampleEntity, updateEntity
-
Methods inherited from class org.sakaiproject.entitybroker.mocks.EntityProviderMock
getEntityPrefix
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.sakaiproject.entitybroker.entityprovider.capabilities.CollectionResolvable
getEntities
-
Methods inherited from interface org.sakaiproject.entitybroker.entityprovider.CoreEntityProvider
entityExists
-
Methods inherited from interface org.sakaiproject.entitybroker.entityprovider.capabilities.Createable
createEntity
-
Methods inherited from interface org.sakaiproject.entitybroker.entityprovider.capabilities.Deleteable
deleteEntity
-
Methods inherited from interface org.sakaiproject.entitybroker.entityprovider.EntityProvider
getEntityPrefix
-
Methods inherited from interface org.sakaiproject.entitybroker.entityprovider.capabilities.Inputable
getHandledInputFormats
-
Methods inherited from interface org.sakaiproject.entitybroker.entityprovider.capabilities.Outputable
getHandledOutputFormats
-
Methods inherited from interface org.sakaiproject.entitybroker.entityprovider.capabilities.Resolvable
getEntity
-
-
-
-
Field Detail
-
templates
public String[] templates
-
-
Method Detail
-
defineURLMappings
public org.sakaiproject.entitybroker.entityprovider.extension.TemplateMap[] defineURLMappings()
- Specified by:
defineURLMappingsin interfaceorg.sakaiproject.entitybroker.entityprovider.capabilities.RedirectDefinable
-
returningRedirector
public String returningRedirector(String incomingURL, Map<String,String> values)
-
-