public class NoConstraint extends java.lang.Object implements IPolicyConstraint
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONFIG_NAME |
Constructor and Description |
---|
NoConstraint() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getConfig(java.lang.String name)
Retrieves configuration parameter by name.
|
IDescriptor |
getConfigDescriptor(java.util.Locale locale,
java.lang.String name)
Returns the descriptors of configuration parameter.
|
java.util.Enumeration |
getConfigNames()
Returns a list of configuration parameter names.
|
IConfigStore |
getConfigStore()
Returns the corresponding configuration store
of this constraint policy.
|
java.lang.String |
getDefaultConfig(java.lang.String name) |
java.lang.String |
getName(java.util.Locale locale)
Returns localized name of this constraint.
|
java.lang.String |
getText(java.util.Locale locale)
Returns localized description of this constraint.
|
void |
init(IProfile profile,
IConfigStore config)
Initializes this constraint policy.
|
boolean |
isApplicable(IPolicyDefault def)
Checks if this constraint is applicable to the
given default policy.
|
void |
setConfig(java.lang.String name,
java.lang.String value)
Sets configuration parameter.
|
void |
validate(IRequest request)
Validates the request.
|
public static final java.lang.String CONFIG_NAME
public java.util.Enumeration getConfigNames()
IConfigTemplate
getConfigNames
in interface IConfigTemplate
public IDescriptor getConfigDescriptor(java.util.Locale locale, java.lang.String name)
IConfigTemplate
getConfigDescriptor
in interface IConfigTemplate
locale
- user localename
- configuration parameter namepublic void setConfig(java.lang.String name, java.lang.String value) throws EPropertyException
IConfigTemplate
setConfig
in interface IConfigTemplate
name
- parameter namevalue
- parameter valueEPropertyException
- failed to set parameterpublic java.lang.String getConfig(java.lang.String name)
IConfigTemplate
getConfig
in interface IConfigTemplate
public java.lang.String getDefaultConfig(java.lang.String name)
public void init(IProfile profile, IConfigStore config) throws EProfileException
IPolicyConstraint
init
in interface IPolicyConstraint
profile
- owner of this policyconfig
- configuration store for this constraintEProfileException
- failed to initializepublic IConfigStore getConfigStore()
IPolicyConstraint
getConfigStore
in interface IPolicyConstraint
public void validate(IRequest request) throws ERejectException
validate
in interface IPolicyConstraint
request
- request to be validatedERejectException
- reject the given requestpublic java.lang.String getText(java.util.Locale locale)
IPolicyConstraint
getText
in interface IPolicyConstraint
locale
- locale of the end-userpublic java.lang.String getName(java.util.Locale locale)
IPolicyConstraint
getName
in interface IPolicyConstraint
locale
- locale of the end-userpublic boolean isApplicable(IPolicyDefault def)
IPolicyConstraint
isApplicable
in interface IPolicyConstraint
def
- default policy to be checked