nl.gx.webmanager.cms.form
Interface RuleModel


public interface RuleModel

Rule model describes are rule which can be added to a Form and customised (See #Rule). A rule model acts as a template for a rule. The user interface talks about validations, routers, and handlers. This interface is used for all three types.

Author:
simon

Method Summary
 Resource getConnectionResource()
          Returns resource which is used in the handler.
 MessageDefinition[] getDedicatedParameters()
          Returns the array of message definitions, describing the dedicated parameters.
 java.lang.String getDescription()
          Returns the description of this RuleModel.
 MessageDefinition[] getMessageDefinitions()
          Returns the array of message definitions.
 java.lang.String getName()
          Returns the name of this RuleModel.
 RuleParameterModel[] getParameterModels()
          Return the array of parameter models.
 java.lang.String getPrecondition()
          Returns precondition of the rulemodel.
 java.lang.String getRegularExpression()
          Return the form part validation regular expression.
 RuleClassDefinition getRuleClassDefinition()
          Returns the RuleClassDefinition which this RuleModel is based on.
 RuleModelType getType()
          Returns type of the rule: validator, form validator, handler or router.
 

Method Detail

getRuleClassDefinition

RuleClassDefinition getRuleClassDefinition()
Returns the RuleClassDefinition which this RuleModel is based on.

Returns:
the RuleClassDefinition

getDescription

java.lang.String getDescription()
Returns the description of this RuleModel.

Returns:
a human readable description of this RuleModel

getName

java.lang.String getName()
Returns the name of this RuleModel.

Returns:
a short human readable name for this RuleModel.

getParameterModels

RuleParameterModel[] getParameterModels()
Return the array of parameter models. The array of parameter models describe parameters which can be used to customise this rule when it is placed on a step, or is used as a validator.

Returns:
the array of parameter models.

getRegularExpression

java.lang.String getRegularExpression()
Return the form part validation regular expression. The regular expression is only used by some rule model which perform form part validation.

Returns:
regular expression or null if this rule model doesn't use one.

getMessageDefinitions

MessageDefinition[] getMessageDefinitions()
Returns the array of message definitions. The array of message definition which are used in handlers, validators or routers for giving feedback to the end user.

Returns:
MessageDefinition[] the array of messages.

getDedicatedParameters

MessageDefinition[] getDedicatedParameters()
Returns the array of message definitions, describing the dedicated parameters. The array of dedicated parameters which are used in handler, validators or routers

Returns:
MessageDefinition[] the array of dedicated parameters.

getConnectionResource

Resource getConnectionResource()
Returns resource which is used in the handler. Some handlers use for example database connection for storing or retrieving information. The connection resource is used to define this resource.

Returns:
Resource the connection resource.

getType

RuleModelType getType()
Returns type of the rule: validator, form validator, handler or router.

Returns:
RuleModelType type of the rule.

getPrecondition

java.lang.String getPrecondition()
Returns precondition of the rulemodel. For example to check if there has an error occurred.

Returns:
String holding the precondition.


Copyright © 2007-2011 GX Software BV. All Rights Reserved.