GSVAttribute Class Reference

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

Collaboration diagram for GSVAttribute:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void addRule (GSVRule newRule)
Class classForCoder ()
void encodeWithWOXMLCoder (WOXMLCoder coder)
GSVEntity entity ()
 GSVAttribute (WOXMLDecoder decoder)
 GSVAttribute (GSVEntity anEntity, String aName) throws IllegalArgumentException
String name ()
void removeRule (GSVRule oldRule)
GSVRule ruleNamed (String name)
NSArray rules ()
void setEntity (GSVEntity parentEntity)
void setName (String newName)

Private Member Functions

boolean validateAttributeForName (GSVEntity anEntity, String aName)

Private Attributes

GSVEntity entity
String name
NSMutableArray rules


Detailed Description

This structure maps validation rules to a specific attribute of an entity. For instance, we might wish to map a 'Provided text is > 5 characters' to the 'username' attribute of the 'user' entity.

Author:
GammaStream Technologies, Inc.

Constructor & Destructor Documentation

GSVAttribute ( GSVEntity  anEntity,
String  aName 
) throws IllegalArgumentException

Creates a new GSVAttribute with the provided information.

Parameters:
anEntity The entity this attribute belongs to.
aName The name of this attribute.
Exceptions:
java.lang.IllegalArgumentException Thrown if the selected EOModel does not contain an attribute of the specified name in the provided entity.

GSVAttribute ( WOXMLDecoder  decoder  ) 

WOXMLCoding Impl

Parameters:
decoder WOXMLDecoder
See also:
encodeWithWOXMLCoder


Member Function Documentation

void addRule ( GSVRule  newRule  ) 

Adds the rule to this attribute.

Parameters:
newRule The rule to add.
See also:
removeRule

rules

Class classForCoder (  ) 

WOXMLCoding Impl

void encodeWithWOXMLCoder ( WOXMLCoder  coder  ) 

WOXMLCoding Impl

Parameters:
coder WOXMLCoder
See also:
GSVAttribute

GSVEntity entity (  ) 

Returns the parent entity for this attribute.

Returns:
parent entity for this attribute.
See also:
setEntity

String name (  ) 

Returns the name of this attribute.

Returns:
The name of the attribute.
See also:
setName

void removeRule ( GSVRule  oldRule  ) 

Remove the rule from this attribute.

Parameters:
oldRule The rule to remove.
See also:
addRule

rules

GSVRule ruleNamed ( String  name  ) 

Returns the rule with the provided name.

Parameters:
name The name of the rule you wish to fetch.
Returns:
Returns the rule with the provided name or null if one was not found.

NSArray rules (  ) 

The list of rules assigned to this attribute.

Returns:
An NSArray of rules.
See also:
removeRule

addRule

void setEntity ( GSVEntity  parentEntity  ) 

Sets the parent entity for this attribute to the provided entity.

Parameters:
parentEntity The parent entity for this attribute.
See also:
entity

void setName ( String  newName  ) 

Sets the name of the attribute.

Parameters:
newName The new name for the attribute.
See also:
name

boolean validateAttributeForName ( GSVEntity  anEntity,
String  aName 
) [private]

Private validation for checking for valid attributes.


Member Data Documentation

GSVEntity entity [private]

String name [private]

NSMutableArray rules [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