Package org.alfresco.repo.action
Class ParameterizedItemAbstractBase
- java.lang.Object
-
- org.alfresco.repo.action.CommonResourceAbstractBase
-
- org.alfresco.repo.action.ParameterizedItemAbstractBase
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware
- Direct Known Subclasses:
ActionConditionEvaluatorAbstractBase,ActionExecuterAbstractBase
public abstract class ParameterizedItemAbstractBase extends CommonResourceAbstractBase
Rule item abstract base.Helper base class used by the action exector and condition evaluator implementations.
- Author:
- Roy Wetherall
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanadhocPropertiesAllowedIndicates whether or not ad-hoc properties can be provided.protected static java.lang.StringDISPLAY_LABELprotected RuntimeActionServiceruntimeActionServiceAction service-
Fields inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
name
-
-
Constructor Summary
Constructors Constructor Description ParameterizedItemAbstractBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidaddParameterDefinitions(java.util.List<ParameterDefinition> paramList)Adds the parameter definitions to the listprotected voidcheckMandatoryProperties(ParameterizedItem ruleItem, ParameterizedItemDefinition ruleItemDefinition)Checked whether all the mandatory parameters for the rule item have been assigned.protected booleangetAdhocPropertiesAllowed()Indicates whether adhoc property definitions are allowed or notprotected java.lang.StringgetDescriptionKey()Gets the description I18N keyprotected java.util.Map<java.util.Locale,java.util.List<ParameterDefinition>>getLocalizedParameterDefinitions()Gets a list containing the parameter definitions for this rule item.protected java.lang.StringgetParamDisplayLabel(java.lang.String paramName)Gets the parameter definition display label from the properties file.protected java.lang.StringgetParamDisplayLabel(java.lang.String paramName, java.util.Locale locale)Gets the parameter definition display label from the properties file.protected java.util.List<ParameterDefinition>getParameterDefintions()Gets a list containing the parameter definitions for this rule item.protected java.lang.StringgetTitleKey()Gets the title I18N keyvoidsetAdhocPropertiesAllowed(boolean allowed)Setter for Spring injection of adhocPropertiesAllowed propertyvoidsetLocales(java.util.Set<java.util.Locale> locales)voidsetRuntimeActionService(RuntimeActionService runtimeActionService)Sets the action servicejava.lang.StringtoString()-
Methods inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
setBeanName
-
-
-
-
Field Detail
-
DISPLAY_LABEL
protected static final java.lang.String DISPLAY_LABEL
- See Also:
- Constant Field Values
-
adhocPropertiesAllowed
protected boolean adhocPropertiesAllowed
Indicates whether or not ad-hoc properties can be provided. Default so false.
-
runtimeActionService
protected RuntimeActionService runtimeActionService
Action service
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- Returns:
- Return a short title and description string
-
setLocales
public void setLocales(java.util.Set<java.util.Locale> locales)
-
getParameterDefintions
protected java.util.List<ParameterDefinition> getParameterDefintions()
Gets a list containing the parameter definitions for this rule item.- Returns:
- the list of parameter definitions
-
addParameterDefinitions
protected abstract void addParameterDefinitions(java.util.List<ParameterDefinition> paramList)
Adds the parameter definitions to the list- Parameters:
paramList- the parameter definitions list
-
getLocalizedParameterDefinitions
protected java.util.Map<java.util.Locale,java.util.List<ParameterDefinition>> getLocalizedParameterDefinitions()
Gets a list containing the parameter definitions for this rule item.- Returns:
- the map of parameter definitions with locales
-
setRuntimeActionService
public void setRuntimeActionService(RuntimeActionService runtimeActionService)
Sets the action service- Parameters:
runtimeActionService- the action service
-
getTitleKey
protected java.lang.String getTitleKey()
Gets the title I18N key- Returns:
- the title key
-
getDescriptionKey
protected java.lang.String getDescriptionKey()
Gets the description I18N key- Returns:
- the description key
-
setAdhocPropertiesAllowed
public void setAdhocPropertiesAllowed(boolean allowed)
Setter for Spring injection of adhocPropertiesAllowed property- Parameters:
allowed- boolean
-
getAdhocPropertiesAllowed
protected boolean getAdhocPropertiesAllowed()
Indicates whether adhoc property definitions are allowed or not- Returns:
- true if they are, by default false
-
getParamDisplayLabel
protected java.lang.String getParamDisplayLabel(java.lang.String paramName)
Gets the parameter definition display label from the properties file.- Parameters:
paramName- the name of the parameter- Returns:
- the diaplay label of the parameter
-
getParamDisplayLabel
protected java.lang.String getParamDisplayLabel(java.lang.String paramName, java.util.Locale locale)Gets the parameter definition display label from the properties file.- Parameters:
paramName- the name of the parameterlocale- the name of the locale- Returns:
- the display label of the parameter
-
checkMandatoryProperties
protected void checkMandatoryProperties(ParameterizedItem ruleItem, ParameterizedItemDefinition ruleItemDefinition)
Checked whether all the mandatory parameters for the rule item have been assigned.- Parameters:
ruleItem- the rule itemruleItemDefinition- the rule item definition
-
-