|
WebObjects 5.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.webobjects.directtoweb.Assignment | +--com.webobjects.directtoweb.DefaultAssignment
The DefaultAssignment
class methods provide default values for the
right-hand sides of rules. Many of these default values depend on the current entity or
property in the Direct to Web context that is active when the rule fires.
This is a good class to extend if you want to add your own assignment methods. Any rule that uses the method must have its right-hand side value set to the name of the method. Use the _context variable to access the Direct to Web context that is active when the rule fires.
For more information about subclassing DefaultAssignment, see the "Customizing a Direct to Web Application" chapter of Developing WebObjects Applications with Direct to Web.
Inner classes inherited from class com.webobjects.eocontrol.EOKeyValueArchiving |
EOKeyValueArchiving.Awaking, EOKeyValueArchiving.FinishInitialization, EOKeyValueArchiving.Support |
Fields inherited from class com.webobjects.directtoweb.Assignment |
KeyPathKey, ValueKey |
Constructor Summary | |
DefaultAssignment(EOKeyValueUnarchiver unarchiver)
Constructs a new DefaultAssignment based on an EOKeyValueUnarchiver. |
|
DefaultAssignment(String keyPath,
String value)
Constructs a new DefaultAssignment with the specified key path and value. |
Method Summary | |
int |
attributeWidth()
Returns the attribute width. |
D2WContext |
d2wContext()
|
static Object |
decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver unarchiver)
This method is intentionally undocumented. |
String |
defaultDisplayNameForProperty()
Returns a String containing a user-presentable version of the current property key in the Direct to Web context in which the receiver's rule fires. |
String |
defaultEntityName()
Returns the first entity name in the NSArray returned by the smartDefaultEntityNames method. |
NSArray |
defaultPropertyKeysFromEntity()
Returns a sorted NSArray containing the property keys for the current entity excluding primary and foreign keys. |
NSArray |
defaultPropertyKeysFromEntityWithoutRelationships()
Returns a sorted NSArray containing the property keys for the current entity excluding relationships, primary keys, and foreign keys. |
Object |
fire(D2WContext context)
This method is invoked when a rule fires. |
Integer |
isEntityReadOnly()
Returns whether the current entity in the Direct to Web context in which the receiver's rule fires cannot be modified. |
String |
smartDefaultAttributeWidth()
Returns the result of smartDefaultAttributeWidthAsInt as a String. |
int |
smartDefaultAttributeWidthAsInt()
Returns the width of the current attribute in the Direct to Web context in which the receiver's rule fires. |
NSArray |
smartDefaultEntityNames()
Returns a sorted NSArray of the names of the entities in the application. |
String |
smartDefaultKey()
Returns the key for the default property of the current entity in the Direct to Web context in which the receiver's rule fires. |
String |
smartDefaultKeyWhenRelationship()
Returns a key for the default property of the current relationship's destination object. |
String |
smartDefaultRows()
Returns a String containing an estimate of the number of rows that a WOText element would need to display the current attribute. |
String |
valueString()
|
Methods inherited from class com.webobjects.directtoweb.Assignment |
encodeWithKeyValueArchiver, keyPath, toString, value, value |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DefaultAssignment(String keyPath, String value)
keyPath
- - the key path.value
- - the value.public DefaultAssignment(EOKeyValueUnarchiver unarchiver)
unarchiver
- - the unarchiver.Method Detail |
public int attributeWidth()
public D2WContext d2wContext()
public static Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver unarchiver)
Assignment
public String defaultDisplayNameForProperty()
public String defaultEntityName()
smartDefaultEntityNames
method.smartDefaultEntityNames()
public NSArray defaultPropertyKeysFromEntity()
public NSArray defaultPropertyKeysFromEntityWithoutRelationships()
public Object fire(D2WContext context)
Assignment
fire
in class Assignment
com.webobjects.directtoweb.Assignment
context
- - the Direct to Web context.public Integer isEntityReadOnly()
You can override this method to provide your own criteria for whether or not a entity can be modified.
public final String smartDefaultAttributeWidth()
smartDefaultAttributeWidthAsInt
as a String.smartDefaultAttributeWidthAsInt()
public int smartDefaultAttributeWidthAsInt()
public final NSArray smartDefaultEntityNames()
public String smartDefaultKey()
public String smartDefaultKeyWhenRelationship()
public final String smartDefaultRows()
public String valueString()
|
Last updated Fri Feb 21 13:15:00 PST 2003. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |