public class EntityProviderMethodStoreImpl extends Object implements EntityProviderMethodStore
| Modifier and Type | Field and Description |
|---|---|
protected static Class<?>[] |
validActionParamTypes |
protected static Class<?>[] |
validRedirectParamTypes |
| Constructor and Description |
|---|
EntityProviderMethodStoreImpl()
Full constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCustomAction(String prefix,
CustomAction customAction) |
void |
addURLRedirects(String prefix,
URLRedirect[] redirects) |
CustomAction[] |
findCustomActions(EntityProvider entityProvider,
boolean ignoreFailures) |
URLRedirect[] |
findURLRedirectMethods(EntityProvider entityProvider) |
CustomAction |
getCustomAction(String prefix,
String action) |
List<CustomAction> |
getCustomActions(String prefix) |
List<URLRedirect> |
getURLRedirects(String prefix) |
void |
removeCustomActions(String prefix) |
void |
removeURLRedirects(String prefix) |
void |
setCustomActions(String prefix,
Map<String,CustomAction> actions)
Set the custom actions for this prefix
|
protected static Class<?>[] |
validateActionParamTypes(Class<?>[] paramTypes,
String methodName)
Validates the parameter types on a method to make sure they are valid
|
static URLRedirect[] |
validateControllableTemplates(RedirectControllable configControllable)
Execute this validate and get the templates so they can be registered
|
static void |
validateCustomActionMethods(ActionsDefineable actionsDefineable)
Takes a set of custom actions and validates them
|
static URLRedirect[] |
validateDefineableTemplates(RedirectDefinable configDefinable)
Validates the provided URL templates in an entity provider and outputs the
URL redirect objects as an array
|
protected static Class<?>[] |
validateParamTypes(Class<?>[] paramTypes,
Class<?>[] validTypes)
Validates param types against a given list of valid types
|
protected static Class<?>[] |
validateRedirectParamTypes(Class<?>[] paramTypes,
String methodName)
Validates the parameter types on a method to make sure they are valid
|
protected static Class<?>[] validActionParamTypes
protected static Class<?>[] validRedirectParamTypes
public EntityProviderMethodStoreImpl()
public CustomAction[] findCustomActions(EntityProvider entityProvider, boolean ignoreFailures)
findCustomActions in interface EntityProviderMethodStorepublic void setCustomActions(String prefix, Map<String,CustomAction> actions)
setCustomActions in interface EntityProviderMethodStoreprefix - an entity prefixactions - a map of action -> CustomActionpublic void addCustomAction(String prefix, CustomAction customAction)
addCustomAction in interface EntityProviderMethodStorepublic CustomAction getCustomAction(String prefix, String action)
getCustomAction in interface EntityProviderMethodStorepublic void removeCustomActions(String prefix)
removeCustomActions in interface EntityProviderMethodStorepublic List<CustomAction> getCustomActions(String prefix)
getCustomActions in interface EntityProviderMethodStorepublic URLRedirect[] findURLRedirectMethods(EntityProvider entityProvider)
findURLRedirectMethods in interface EntityProviderMethodStorepublic void addURLRedirects(String prefix, URLRedirect[] redirects)
addURLRedirects in interface EntityProviderMethodStorepublic void removeURLRedirects(String prefix)
removeURLRedirects in interface EntityProviderMethodStorepublic List<URLRedirect> getURLRedirects(String prefix)
getURLRedirects in interface EntityProviderMethodStoreprotected static Class<?>[] validateActionParamTypes(Class<?>[] paramTypes, String methodName)
paramTypes - an array of parameter typesmethodName - the name of the method which is being validated (for debugging mostly)IllegalArgumentException - if the param types are invalidprotected static Class<?>[] validateRedirectParamTypes(Class<?>[] paramTypes, String methodName)
paramTypes - an array of parameter typesmethodName - the name of the method which is being validated (for debugging mostly)IllegalArgumentException - is the param types are invalidprotected static Class<?>[] validateParamTypes(Class<?>[] paramTypes, Class<?>[] validTypes)
paramTypes - an array of parameter typesvalidTypes - the types that are validIllegalArgumentException - is the param types are invalidpublic static void validateCustomActionMethods(ActionsDefineable actionsDefineable)
actionsDefineable - an entity provider which uses custom actionscustomActions - IllegalArgumentException - if the custom actions are invalidpublic static URLRedirect[] validateDefineableTemplates(RedirectDefinable configDefinable)
configDefinable - the entity providerpublic static URLRedirect[] validateControllableTemplates(RedirectControllable configControllable)
configControllable - the entity providerCopyright © 2007–2020 CARET, University of Cambridge. All rights reserved.