|
Project Wonder 2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.gammastream.validity.GSVRule
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.
Constructor Summary | |
GSVRule(String rName,
String cName2,
String mName2,
String eMessage,
String doc)
Creates a new GSVRule with the provided parameters. |
|
GSVRule(WOXMLDecoder decoder)
WOXMLCoding Impl |
Method Summary | |
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. :-) |
boolean |
continueIfNULL()
|
String |
documentation()
Returns the documentation for this rule. |
void |
encodeWithWOXMLCoder(WOXMLCoder coder)
WOXMLCoding Impl |
String |
errorMessage()
Returns the error message that should be displayed to the user when this rule fails to be validated. |
boolean |
failIfNULL()
|
String |
mName()
Returns the method name used for this rule. |
boolean |
negate()
Should the outcome of this rule be negated (reversed). |
boolean |
onDelete()
|
boolean |
onInsert()
|
boolean |
onSave()
|
boolean |
onUpdate()
|
NSMutableDictionary |
parameters()
Returns a dictionary of key-value pairs used for providing parameters to the validation rule's method. |
String |
ruleName()
Returns the name of this rule. |
void |
setCName(String newClass)
Set the class name for this rule. |
void |
setContinueIfNULL(boolean z)
|
void |
setDocumentation(String doc)
Set the documentation to the provided String . |
void |
setErrorMessage(String newMessage)
Set the error message. |
void |
setFailIfNULL(boolean z)
|
void |
setMName(String newMethod)
Set the method name for this rule. |
void |
setNegate(boolean z)
Assigns a key-value pair dictionary to this rule. |
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. |
void |
setRuleName(String newRule)
Sets the name of this rule. |
void |
setStopIfFails(boolean z)
|
boolean |
stopIfFails()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GSVRule(String rName, String cName2, String mName2, String eMessage, String doc) throws IllegalArgumentException
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.
IllegalArgumentException
- Thrown should the class name or method name appear to be invalid.public GSVRule(WOXMLDecoder decoder)
decoder
- WOXMLDecoderencodeWithWOXMLCoder(com.webobjects.appserver.xml.WOXMLCoder)
Method Detail |
public String ruleName()
setRuleName(java.lang.String)
public void setRuleName(String newRule) throws IllegalArgumentException
IllegalArgumentException
ruleName()
public String cName()
setCName(java.lang.String)
public void setCName(String newClass) throws IllegalArgumentException
IllegalArgumentException
- Thrown should the class name appear to be invalid.
Currently the validation logic here always returns true.cName()
public String mName()
setMName(java.lang.String)
public void setMName(String newMethod) throws IllegalArgumentException
IllegalArgumentException
- Thrown should the method name appear to be invalid.
Currently the validation logic here always returns true.mName()
public String errorMessage()
setErrorMessage(java.lang.String)
public void setErrorMessage(String newMessage)
errorMessage()
public String documentation()
setDocumentation(java.lang.String)
public void setDocumentation(String doc)
String
.
documentation()
public NSMutableDictionary parameters()
mName()
.
setParameters(com.webobjects.foundation.NSMutableDictionary)
public void setParameters(NSMutableDictionary newParameters)
parameters()
public boolean negate()
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?
setNegate(boolean)
public void setNegate(boolean z)
parameters()
public boolean failIfNULL()
public void setFailIfNULL(boolean z)
public boolean continueIfNULL()
public void setContinueIfNULL(boolean z)
public boolean stopIfFails()
public void setStopIfFails(boolean z)
public boolean onSave()
public void setOnSave(boolean z)
public boolean onUpdate()
public void setOnUpdate(boolean z)
public boolean onInsert()
public void setOnInsert(boolean z)
public boolean onDelete()
public void setOnDelete(boolean z)
public void encodeWithWOXMLCoder(WOXMLCoder coder)
encodeWithWOXMLCoder
in interface WOXMLCoding
coder
- WOXMLCoderGSVRule(com.webobjects.appserver.xml.WOXMLDecoder)
public Class classForCoder()
classForCoder
in interface WOXMLCoding
|
Last updated: Do, Dez 9, 2004 12:46 PM CET | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |