Interface EntityProviderMethodStore
-
public interface EntityProviderMethodStoreThis 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddCustomAction(String prefix, CustomAction customAction)Add a custom action for a prefixvoidaddURLRedirects(String prefix, URLRedirect[] redirects)Add all URL redirects to the following prefix, maintains any existing onesCustomAction[]findCustomActions(EntityProvider entityProvider, boolean ignoreFailures)Get all the custom actions that can be foundURLRedirect[]findURLRedirectMethods(EntityProvider entityProvider)Looks for redirect methods in the given entity providerCustomActiongetCustomAction(String prefix, String action)Get theCustomActionfor a prefix and action if it existsList<CustomAction>getCustomActions(String prefix)Gets the list of all custom actions for a prefixList<URLRedirect>getURLRedirects(String prefix)Get the list of all redirects for this prefixvoidremoveCustomActions(String prefix)Remove any custom actions that are set for this prefixvoidremoveURLRedirects(String prefix)Remove any and all redirects for this prefixvoidsetCustomActions(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 actionsignoreFailures- 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 prefixactions- a map of action ->CustomAction
-
addCustomAction
void addCustomAction(String prefix, CustomAction customAction)
Add a custom action for a prefix- Parameters:
prefix- an entity prefixcustomAction- 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 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
-
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 prefixredirects- 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
-
-