GSVRule Class Reference

Inherits com::webobjects::appserver::xml::WOXMLCoding.

Collaboration diagram for GSVRule:

Collaboration graph
base refererrect $struct___string.html 13,31 77,55
[legend]

List of all members.

Public Member Functions

Class classForCoder ()
String cName ()
boolean continueIfNULL ()
String documentation ()
void encodeWithWOXMLCoder (WOXMLCoder coder)
String errorMessage ()
boolean failIfNULL ()
 GSVRule (WOXMLDecoder decoder)
 GSVRule (String rName, String cName2, String mName2, String eMessage, String doc) throws IllegalArgumentException
String mName ()
boolean negate ()
boolean onDelete ()
boolean onInsert ()
boolean onSave ()
boolean onUpdate ()
NSMutableDictionary parameters ()
String ruleName ()
void setCName (String newClass) throws IllegalArgumentException
void setContinueIfNULL (boolean z)
void setDocumentation (String doc)
void setErrorMessage (String newMessage)
void setFailIfNULL (boolean z)
void setMName (String newMethod) throws IllegalArgumentException
void setNegate (boolean z)
void setOnDelete (boolean z)
void setOnInsert (boolean z)
void setOnSave (boolean z)
void setOnUpdate (boolean z)
void setParameters (NSMutableDictionary newParameters)
void setRuleName (String newRule) throws IllegalArgumentException
void setStopIfFails (boolean z)
boolean stopIfFails ()

Private Member Functions

boolean validateClassName (String cName)
boolean validateMethodName (String mName)

Private Attributes

String cName = null
boolean continueIfNULL = false
String documentation = null
String errorMessage = null
boolean failIfNULL = true
String mName = null
boolean negate = false
boolean onDelete = true
boolean onInsert = true
boolean onSave = true
boolean onUpdate = true
NSMutableDictionary parameters = null
String ruleName = null
boolean stopIfFails = false


Detailed Description

This structure stores the various information which defines each rule. Information like the name, where the rule is located, error messages, when to execute, etc.

Author:
GammaStream Technologies, Inc.

Constructor & Destructor Documentation

GSVRule ( String  rName,
String  cName2,
String  mName2,
String  eMessage,
String  doc 
) throws IllegalArgumentException

Creates a new GSVRule with the provided parameters.

Parameters:
rName The name you wish to give the rule.
cName2 The fully qualified class name in which the rule's method is located.
mName2 The name of the method to be executed.
eMessage An error message to provide the user in the event the rule fails.
doc Optional documentation as to the rules function.
Exceptions:
java.lang.IllegalArgumentException Thrown should the class name or method name appear to be invalid.

GSVRule ( WOXMLDecoder  decoder  ) 

WOXMLCoding Impl

Parameters:
decoder WOXMLDecoder
See also:
encodeWithWOXMLCoder


Member Function Documentation

Class classForCoder (  ) 

WOXMLCoding Impl

String cName (  ) 

Returns the fully qualified class name of the class in which the method used in this rule is located. :-)

Returns:
The name of the rule.
See also:
setCName

boolean continueIfNULL (  ) 

Returns the documentation for this rule.

Returns:
The documentation.
See also:
setDocumentation

void encodeWithWOXMLCoder ( WOXMLCoder  coder  ) 

WOXMLCoding Impl

Parameters:
coder WOXMLCoder
See also:
GSVRule

Returns the error message that should be displayed to the user when this rule fails to be validated.

Returns:
The error message.
See also:
setErrorMessage

boolean failIfNULL (  ) 

String mName (  ) 

Returns the method name used for this rule.

Returns:
The method name.
See also:
setMName

boolean negate (  ) 

Should the outcome of this rule be negated (reversed). This might be useful if you have a method which returns true if you have a String which is empty or null. Your rule might indicate that you want this attribute to be required. If the method returns true if it is, you will want to reverse the outcome. Did that make any sense?

Returns:
Whether the initial return value should be negated (reversed).
See also:
setNegate

boolean onDelete (  ) 

boolean onInsert (  ) 

boolean onSave (  ) 

boolean onUpdate (  ) 

Returns a dictionary of key-value pairs used for providing parameters to the validation rule's method. This parameter dictionary is passed to the method defined by mName().

Returns:
The key-values pairs.
See also:
setParameters

String ruleName (  ) 

Returns the name of this rule.

Returns:
The name of the rule.
See also:
setRuleName

void setCName ( String  newClass  )  throws IllegalArgumentException

Set the class name for this rule.

Parameters:
newClass fully qualified name of the class.
Exceptions:
java.lang.IllegalArgumentException Thrown should the class name appear to be invalid. Currently the validation logic here always returns true.
See also:
cName

void setContinueIfNULL ( boolean  z  ) 

void setDocumentation ( String  doc  ) 

Set the documentation to the provided String.

Parameters:
doc the documentation.
See also:
documentation

void setErrorMessage ( String  newMessage  ) 

Set the error message.

Parameters:
newMessage the error message
See also:
errorMessage

void setFailIfNULL ( boolean  z  ) 

void setMName ( String  newMethod  )  throws IllegalArgumentException

Set the method name for this rule.

Parameters:
newMethod name for the method.
Exceptions:
java.lang.IllegalArgumentException Thrown should the method name appear to be invalid. Currently the validation logic here always returns true.
See also:
mName

void setNegate ( boolean  z  ) 

Assigns a key-value pair dictionary to this rule.

Parameters:
z A dictionary of key-value pairs.
See also:
parameters

void setOnDelete ( boolean  z  ) 

void setOnInsert ( boolean  z  ) 

void setOnSave ( boolean  z  ) 

void setOnUpdate ( boolean  z  ) 

void setParameters ( NSMutableDictionary  newParameters  ) 

Assigns a key-value pair dictionary to this rule.

Parameters:
newParameters A dictionary of key-value pairs.
See also:
parameters

void setRuleName ( String  newRule  )  throws IllegalArgumentException

Sets the name of this rule.

See also:
ruleName

void setStopIfFails ( boolean  z  ) 

boolean stopIfFails (  ) 

boolean validateClassName ( String  cName  )  [private]

Private Determines whether the provided class name appears to be valid.

boolean validateMethodName ( String  mName  )  [private]

Private Determines whether the provided method name appears to be valid.


Member Data Documentation

String cName = null [private]

boolean continueIfNULL = false [private]

String documentation = null [private]

String errorMessage = null [private]

boolean failIfNULL = true [private]

String mName = null [private]

boolean negate = false [private]

boolean onDelete = true [private]

boolean onInsert = true [private]

boolean onSave = true [private]

boolean onUpdate = true [private]

String ruleName = null [private]

boolean stopIfFails = false [private]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:42:30 2012 for Project Wonder by  doxygen 1.5.8