com.netscape.cms.profile.constraint
Class NoConstraint

java.lang.Object
  extended by com.netscape.cms.profile.constraint.NoConstraint
All Implemented Interfaces:
IPolicyConstraint, IConfigTemplate

public class NoConstraint
extends java.lang.Object
implements IPolicyConstraint

This class implements no constraint.

Version:
$Revision: 1211 $, $Date: 2010-08-18 10:15:37 -0700 (Wed, 18 Aug 2010) $

Field Summary
static java.lang.String CONFIG_NAME
           
 
Constructor Summary
NoConstraint()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_NAME

public static final java.lang.String CONFIG_NAME
See Also:
Constant Field Values
Constructor Detail

NoConstraint

public NoConstraint()
Method Detail

getConfigNames

public java.util.Enumeration getConfigNames()
Description copied from interface: IConfigTemplate
Returns a list of configuration parameter names.

Specified by:
getConfigNames in interface IConfigTemplate
Returns:
parameter names

getConfigDescriptor

public IDescriptor getConfigDescriptor(java.util.Locale locale,
                                       java.lang.String name)
Description copied from interface: IConfigTemplate
Returns the descriptors of configuration parameter.

Specified by:
getConfigDescriptor in interface IConfigTemplate
Parameters:
locale - user locale
name - configuration parameter name
Returns:
descriptor

setConfig

public void setConfig(java.lang.String name,
                      java.lang.String value)
               throws EPropertyException
Description copied from interface: IConfigTemplate
Sets configuration parameter.

Specified by:
setConfig in interface IConfigTemplate
Parameters:
name - parameter name
value - parameter value
Throws:
EPropertyException - failed to set parameter

getConfig

public java.lang.String getConfig(java.lang.String name)
Description copied from interface: IConfigTemplate
Retrieves configuration parameter by name.

Specified by:
getConfig in interface IConfigTemplate
Returns:
parameter

getDefaultConfig

public java.lang.String getDefaultConfig(java.lang.String name)

init

public void init(IProfile profile,
                 IConfigStore config)
          throws EProfileException
Description copied from interface: IPolicyConstraint
Initializes this constraint policy.

Specified by:
init in interface IPolicyConstraint
Parameters:
profile - owner of this policy
config - configuration store for this constraint
Throws:
EProfileException - failed to initialize

getConfigStore

public IConfigStore getConfigStore()
Description copied from interface: IPolicyConstraint
Returns the corresponding configuration store of this constraint policy.

Specified by:
getConfigStore in interface IPolicyConstraint
Returns:
config store of this constraint

validate

public void validate(IRequest request)
              throws ERejectException
Validates the request. The request is not modified during the validation.

Specified by:
validate in interface IPolicyConstraint
Parameters:
request - request to be validated
Throws:
ERejectException - reject the given request

getText

public java.lang.String getText(java.util.Locale locale)
Description copied from interface: IPolicyConstraint
Returns localized description of this constraint.

Specified by:
getText in interface IPolicyConstraint
Parameters:
locale - locale of the end-user
Returns:
localized description of this constraint

getName

public java.lang.String getName(java.util.Locale locale)
Description copied from interface: IPolicyConstraint
Returns localized name of this constraint.

Specified by:
getName in interface IPolicyConstraint
Parameters:
locale - locale of the end-user
Returns:
localized name of this constraint

isApplicable

public boolean isApplicable(IPolicyDefault def)
Description copied from interface: IPolicyConstraint
Checks if this constraint is applicable to the given default policy.

Specified by:
isApplicable in interface IPolicyConstraint
Parameters:
def - default policy to be checked
Returns:
true if this constraint can be applied to the given default policy