Interface Sampleable
-
- All Superinterfaces:
EntityProvider
- All Known Subinterfaces:
Createable,CRUDable,Inputable,InputTranslatable,RESTful,Saveable
public interface Sampleable extends EntityProvider
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, aMap, etc.
This is one of the capability extensions for theEntityProviderinterface- Author:
- Aaron Zeckoski (aaron@caret.cam.ac.uk)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectgetSampleEntity()Provides a sample entity object which can be populated with data and then passed to methods likeCreateable.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 theEntityBroker(currently this means deployed into shared)-
Methods inherited from interface org.sakaiproject.entitybroker.entityprovider.EntityProvider
getEntityPrefix
-
-
-
-
Method Detail
-
getSampleEntity
Object getSampleEntity()
Provides a sample entity object which can be populated with data and then passed to methods likeCreateable.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 theEntityBroker(currently this means deployed into shared)- Returns:
- a sample entity object for entities of the type represented by this provider
- Throws:
IllegalStateException- if the sample object cannot be obtained for some reason
-
-