org.sakaiproject.entitybroker.mocks
Class ActionsExecutionEntityProviderMock

java.lang.Object
  extended by org.sakaiproject.entitybroker.mocks.EntityProviderMock
      extended by org.sakaiproject.entitybroker.mocks.CRUDableEntityProviderMock
          extended by org.sakaiproject.entitybroker.mocks.ActionsExecutionEntityProviderMock
All Implemented Interfaces:
ActionsDefineable, ActionsExecutable, ActionsExecutionControllable, Createable, CRUDable, Deleteable, Resolvable, Sampleable, Saveable, Updateable, CoreEntityProvider, EntityProvider

public class ActionsExecutionEntityProviderMock
extends CRUDableEntityProviderMock
implements CoreEntityProvider, ActionsExecutionControllable

Stub class to make it possible to test the ActionsExecutable capabilities, will perform like the actual class so it can be reliably used for testing
Will perform all CRUDable operations as well as allowing for internal data output processing
Returns MyEntity objects
Allows for testing Resolvable and CollectionResolvable as well, returns 2 MyEntity objects 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 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
 
Constructor Summary
ActionsExecutionEntityProviderMock(String prefix, String[] ids)
           
 
Method Summary
 CustomAction[] defineActions()
           
 Object executeActions(EntityView entityView, String action, Map<String,Object> actionParams, OutputStream outputStream)
           
 
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.CoreEntityProvider
entityExists
 
Methods inherited from interface org.sakaiproject.entitybroker.entityprovider.EntityProvider
getEntityPrefix
 

Constructor Detail

ActionsExecutionEntityProviderMock

public ActionsExecutionEntityProviderMock(String prefix,
                                          String[] ids)
Method Detail

defineActions

public CustomAction[] defineActions()
Specified by:
defineActions in interface ActionsDefineable

executeActions

public Object executeActions(EntityView entityView,
                             String action,
                             Map<String,Object> actionParams,
                             OutputStream outputStream)
Specified by:
executeActions in interface ActionsExecutionControllable


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