public abstract class BaseParameterConstraint extends java.lang.Object implements ParameterConstraint, org.springframework.beans.factory.BeanNameAware
| Modifier and Type | Field and Description |
|---|---|
protected RuntimeActionService |
actionService
Runtime action service
|
protected java.util.Map |
allowableValues
Map of allowable values
|
protected boolean |
cache
Flag to determine whether the allowable values should be cached
|
protected java.lang.String |
name
Constraint name
|
| Constructor and Description |
|---|
BaseParameterConstraint() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map |
getAllowableValues() |
protected abstract java.util.Map |
getAllowableValuesImpl()
Gets the list of allowable values, calculating them every time it is called.
|
protected java.lang.String |
getI18NLabel(java.lang.String key)
Get the I18N display label for a particular key
|
java.lang.String |
getName()
Gets the unique name of the constraint
|
java.lang.String |
getValueDisplayLabel(java.lang.String value) |
void |
init()
Init method
|
boolean |
isValidValue(java.lang.String value)
Indicates whether the provided value satisfies the constraint.
|
void |
setActionService(RuntimeActionService actionService)
Set the action service
|
void |
setBeanName(java.lang.String name) |
void |
setCacheAllowableValues(boolean cache)
Determines whether the allowable values should be cached, default is true.
|
protected java.lang.String name
protected RuntimeActionService actionService
protected boolean cache
protected java.util.Map allowableValues
public void init()
public void setActionService(RuntimeActionService actionService)
actionService - action servicepublic void setCacheAllowableValues(boolean cache)
cache - public java.lang.String getName()
ParameterConstraintgetName in interface ParameterConstraintParameterConstraint.getName()public void setBeanName(java.lang.String name)
setBeanName in interface org.springframework.beans.factory.BeanNameAwareBeanNameAware.setBeanName(java.lang.String)public java.util.Map getAllowableValues()
getAllowableValues in interface ParameterConstraintParameterConstraint.getAllowableValues()protected abstract java.util.Map getAllowableValuesImpl()
protected java.lang.String getI18NLabel(java.lang.String key)
key - public java.lang.String getValueDisplayLabel(java.lang.String value)
getValueDisplayLabel in interface ParameterConstraintorg.alfresco.service.cmr.action.ParameterConstraint#getValueDisplayLabel(java.io.Serializable)public boolean isValidValue(java.lang.String value)
ParameterConstraintisValidValue in interface ParameterConstraintorg.alfresco.service.cmr.action.ParameterConstraint#isValidValue(java.io.Serializable)Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.