org.sakaiproject.entitybroker.entityprovider
Interface EntityProviderMethodStore


public interface EntityProviderMethodStore

This is the interface for handling storage of methods (related to custom actions and the like), this is for internal usage only and should not be accessed or used by other developers

Author:
Aaron Zeckoski (azeckoski @ gmail.com)

Method Summary
 void addCustomAction(String prefix, CustomAction customAction)
          Add a custom action for a prefix
 void addURLRedirects(String prefix, URLRedirect[] redirects)
          Add all URL redirects to the following prefix, maintains any existing ones
 CustomAction[] findCustomActions(EntityProvider entityProvider, boolean ignoreFailures)
          Get all the custom actions that can be found
 URLRedirect[] findURLRedirectMethods(EntityProvider entityProvider)
          Looks for redirect methods in the given entity provider
 CustomAction getCustomAction(String prefix, String action)
          Get the CustomAction for a prefix and action if it exists
 List<CustomAction> getCustomActions(String prefix)
          Gets the list of all custom actions for a prefix
 List<URLRedirect> getURLRedirects(String prefix)
          Get the list of all redirects for this prefix
 void removeCustomActions(String prefix)
          Remove any custom actions that are set for this prefix
 void removeURLRedirects(String prefix)
          Remove any and all redirects for this prefix
 void setCustomActions(String prefix, Map<String,CustomAction> actions)
          Set the custom actions for this prefix
 

Method Detail

findCustomActions

CustomAction[] findCustomActions(EntityProvider entityProvider,
                                 boolean ignoreFailures)
Get all the custom actions that can be found

Parameters:
entityProvider - the provider to search for custom actions
ignoreFailures - if true then will not throw exceptions if methods are not found
Returns:
the array of CustomAction objects which are found

setCustomActions

void setCustomActions(String prefix,
                      Map<String,CustomAction> actions)
Set the custom actions for this prefix

Parameters:
prefix - an entity prefix
actions - a map of action -> CustomAction

addCustomAction

void addCustomAction(String prefix,
                     CustomAction customAction)
Add a custom action for a prefix

Parameters:
prefix - an entity prefix
customAction - the custom action to add

removeCustomActions

void removeCustomActions(String prefix)
Remove any custom actions that are set for this prefix

Parameters:
prefix - an entity prefix

getCustomActions

List<CustomAction> getCustomActions(String prefix)
Gets the list of all custom actions for a prefix

Parameters:
prefix - an entity prefix
Returns:
a list of CustomActions for this prefix, empty if there are none

getCustomAction

CustomAction getCustomAction(String prefix,
                             String action)
Get the CustomAction for a prefix and action if it exists

Parameters:
prefix - an entity prefix
action - an action key
Returns:
the custom action OR null if none found

findURLRedirectMethods

URLRedirect[] findURLRedirectMethods(EntityProvider entityProvider)
Looks for redirect methods in the given entity provider

Parameters:
entityProvider - an entity provider
Returns:
an array of redirect objects
Throws:
IllegalArgumentException - if the methods are setup incorrectly

addURLRedirects

void addURLRedirects(String prefix,
                     URLRedirect[] redirects)
Add all URL redirects to the following prefix, maintains any existing ones

Parameters:
prefix - an entity prefix
redirects - an array of redirects
Throws:
IllegalArgumentException - if any of the URL redirects are invalid

removeURLRedirects

void removeURLRedirects(String prefix)
Remove any and all redirects for this prefix

Parameters:
prefix - an entity prefix

getURLRedirects

List<URLRedirect> getURLRedirects(String prefix)
Get the list of all redirects for this prefix

Parameters:
prefix - the entity prefix
Returns:
a list of url redirects, may be empty if there are none


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