org.sakaiproject.entitybroker.entityprovider.capabilities
Interface Createable

All Superinterfaces:
EntityProvider, Sampleable
All Known Subinterfaces:
CRUDable, RESTful, Saveable

public interface Createable
extends EntityProvider, Sampleable

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

Author:
Aaron Zeckoski (aaron@caret.cam.ac.uk)

Method Summary
 String createEntity(EntityReference ref, Object entity, Map<String,Object> params)
          Create a new entity and return the unique local id of the entity, the object should contain the data needed to create the entity or this will fail
 
Methods inherited from interface org.sakaiproject.entitybroker.entityprovider.capabilities.Sampleable
getSampleEntity
 
Methods inherited from interface org.sakaiproject.entitybroker.entityprovider.EntityProvider
getEntityPrefix
 

Method Detail

createEntity

String createEntity(EntityReference ref,
                    Object entity,
                    Map<String,Object> params)
Create a new entity and return the unique local id of the entity, the object should contain the data needed to create the entity or this will fail

Parameters:
ref - the parsed reference object which uniquely represents this entity
entity - an entity object
params - (optional) incoming set of parameters which may be used to send data specific to this request, may be null
Returns:
the locally unique id of the new object
Throws:
IllegalArgumentException - if the entity could not be created because of missing or invalid data
SecurityException - if permissions prevented this entity from being created
IllegalStateException - for all other failures


Copyright © 2007-2012 Sakai Project. All Rights Reserved.