Class EntityActionsManager
- java.lang.Object
-
- org.sakaiproject.entitybroker.rest.EntityActionsManager
-
public class EntityActionsManager extends Object
Handles everything related to the custom actions registration and execution- Author:
- Aaron Zeckoski (azeckoski @ gmail.com)
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedEntityActionsManager()EntityActionsManager(org.sakaiproject.entitybroker.entityprovider.EntityProviderMethodStore entityProviderMethodStore)Full constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.sakaiproject.entitybroker.entityprovider.extension.CustomActiongetCustomAction(String prefix, String action)Get theCustomActionfor a prefix and action if it existsorg.sakaiproject.entitybroker.entityprovider.extension.ActionReturnhandleCustomActionExecution(org.sakaiproject.entitybroker.entityprovider.capabilities.ActionsExecutable actionProvider, org.sakaiproject.entitybroker.EntityReference ref, String action, Map<String,Object> actionParams, OutputStream outputStream, org.sakaiproject.entitybroker.EntityView view, Map<String,Object> searchParams)Handles the execution of custom actions based on a request for executionorg.sakaiproject.entitybroker.entityprovider.extension.ActionReturnhandleCustomActionRequest(org.sakaiproject.entitybroker.entityprovider.capabilities.ActionsExecutable actionProvider, org.sakaiproject.entitybroker.EntityView entityView, String action, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Map<String,Object> searchParams)Execute a custom action requestvoidsetEntityProviderMethodStore(org.sakaiproject.entitybroker.entityprovider.EntityProviderMethodStore entityProviderMethodStore)
-
-
-
Constructor Detail
-
EntityActionsManager
protected EntityActionsManager()
-
EntityActionsManager
public EntityActionsManager(org.sakaiproject.entitybroker.entityprovider.EntityProviderMethodStore entityProviderMethodStore)
Full constructor- Parameters:
entityProviderMethodStore- the provider method store service
-
-
Method Detail
-
setEntityProviderMethodStore
public void setEntityProviderMethodStore(org.sakaiproject.entitybroker.entityprovider.EntityProviderMethodStore entityProviderMethodStore)
-
handleCustomActionRequest
public org.sakaiproject.entitybroker.entityprovider.extension.ActionReturn handleCustomActionRequest(org.sakaiproject.entitybroker.entityprovider.capabilities.ActionsExecutable actionProvider, org.sakaiproject.entitybroker.EntityView entityView, String action, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Map<String,Object> searchParams)Execute a custom action request- Parameters:
actionProvider-entityView-action-request-response-- Returns:
- an action return (may be null)
- Throws:
IllegalArgumentException- if any args are invalidUnsupportedOperationException- if the action is not valid for this prefixIllegalStateException- if a failure occurs
-
handleCustomActionExecution
public org.sakaiproject.entitybroker.entityprovider.extension.ActionReturn handleCustomActionExecution(org.sakaiproject.entitybroker.entityprovider.capabilities.ActionsExecutable actionProvider, org.sakaiproject.entitybroker.EntityReference ref, String action, Map<String,Object> actionParams, OutputStream outputStream, org.sakaiproject.entitybroker.EntityView view, Map<String,Object> searchParams)Handles the execution of custom actions based on a request for execution- Throws:
IllegalArgumentException- if any args are invalidUnsupportedOperationException- if the action is not valid for this prefix
-
getCustomAction
public org.sakaiproject.entitybroker.entityprovider.extension.CustomAction getCustomAction(String prefix, String action)
Get theCustomActionfor a prefix and action if it exists- Parameters:
prefix- an entity prefixaction- an action key- Returns:
- the custom action OR null if none found
-
-