PATH |
D2WContext
Package: com.webobjects.directtowebInherits from:java.lang.Object
Implements:
- com.webobjects.foundation.NSKeyValueCoding
Class Description
Direct to Web contexts are objects of the D2WContext class. When a Direct to Web template renders, it does so with the help of a Direct to Web context which provides values for bindings in the template and maintains state information about the rendering process. See the "Direct to Web Architecture" chapter of Developing WebObjects Applications With Direct to Web for more information about the Direct to Web context.
The primary function of the Direct to Web context is to implement the EOKeyValueCoding interface (defined in the EOControl framework) by implementing valueForKey
and takeValueForKey
. It resolves the keys with the help of the rule system. entity.name
. These are valueForKeyPath
and takeValueForKeyPath
. When you use the d2wContext
key in a Direct to Web template's bindings (.wod
) file, you indirectly use one of these methods.
For a list of the keys implemented by the D2WContext, see Direct To Web Context Keys.
The D2WContext class also provides convenience methods to access keys in Java.
Method Types
Constructors
- public D2WContext()
- public D2WContext(D2WContext d2wContext)
- D2WContext(Settings settings)
- public D2WContext(WOSession session)
Static Constants
Convenience Methods
- attribute
- componentName
- displayNameForProperty
- entity
- pageName
- propertyKey
- propertyType
- relationship
- setPropertyKey
- startupEntityName
- startupTask
- task
Key-Value Coding
Private Methods
- attribute
- clearDerivedValues
- componentClassPresentInRuntime
- componentsAvailable
- computeDerivedValues
- distantAttribute
- distantRelationship
- dynamicPage
- frame
- inferAllPossibleValuesForKey
- inferSystemValueForKey
- inferValueForKey
- isGenerating
- model
- nullOutDerivedValues
- pagesAvailable
- propertyKeyIsKeyPath
- propertyTypeForUnknownKeyPath
- rawPageName
- rawSystemPageName
- relationship
- sessionDidTimeOut
- setDynamicPage
- setEntity
- setTask
- takeValueForInferrableKey
- toString
- valueForKeyNoInference
- valueForKeyPathNoInference
Resolving Keys
Constructors
D2WContext
public D2WContext()
Standard Java no-argument constructor.
D2WContext
public D2WContext(D2WContext d2wContext)
This method is intentionally undocumented. You should never have to invoke or customize it.
D2WContext
D2WContext(Settings settings)
This method is intentionally undocumented. You should never have to invoke or customize it.
D2WContext
public D2WContext(WOSession session)
This method is intentionally undocumented. You should never have to invoke or customize it.
Static Constants
NULL_VALUE
java.lang.Object
This constant is intentionally undocumented.
VALUE_TO_BE_DERIVED
java.lang.Object
This constant is intentionally undocumented.
Methods
attribute
public EOAttribute attribute()
Returns the attribute (an
null
if the property is not an attribute.
The
attribute
protected EOAttribute attribute(String aString)
This method is intentionally undocumented. You should never have to invoke or customize it.
clearDerivedValues
public void clearDerivedValues()
This method is intentionally undocumented. You should never have to invoke or customize it.
componentClassPresentInRuntime
public boolean componentClassPresentInRuntime(String aString)
This method is intentionally undocumented. You should never have to invoke or customize it.
componentName
public String componentName()
Returns the name of the property-level component to display based on the receiver's current property. The value is resolved using the rule system.
componentsAvailable
public Vector componentsAvailable()
This method is intentionally undocumented. You should never have to invoke or customize it.
computeDerivedValues
public void computeDerivedValues()
This method is intentionally undocumented. You should never have to invoke or customize it.
displayNameForProperty
public String displayNameForProperty()
Returns a
distantAttribute
public EOAttribute distantAttribute(String aString, EOEntity anEntity)
This method is intentionally undocumented. You should never have to invoke or customize it.
distantRelationship
public EORelationship distantRelationship(String aString, EOEntity anEntity)
This method is intentionally undocumented. You should never have to invoke or customize it.
dynamicPage
public String dynamicPage()
This method is intentionally undocumented. You should never have to invoke or customize it.
entity
public EOEntity entity()
Returns the receiver's current entity.
frame
public boolean frame()
This method is intentionally undocumented. You should never have to invoke or customize it.
inferAllPossibleValuesForKey
public Vector inferAllPossibleValuesForKey(String aString)
This method is intentionally undocumented. You should never have to invoke or customize it.
inferSystemValueForKey
public Object inferSystemValueForKey(String aString)
This method is intentionally undocumented. You should never have to invoke or customize it.
inferValueForKey
public Object inferValueForKey(String aString)
This method is intentionally undocumented. You should never have to invoke or customize it.
isGenerating
public boolean isGenerating()
This method is intentionally undocumented. You should never have to invoke or customize it.
keyWhenRelationship
public String keyWhenRelationship()
When the receiver's current property is a relationship, returns the key for a property of the destination entity that identifies the entity. For example, if the receiver's current entity is
Movie
and the current property is the toStudio
relationship (and thus the destination entity is Studio
), an appropriate value for keyWhenRelationship
is name
since the name
property identifies the studio.
model
public D2WModel model()
This method is intentionally undocumented. You should never have to invoke or customize it.
nullOutDerivedValues
public void nullOutDerivedValues()
This method is intentionally undocumented. You should never have to invoke or customize it.
pageName
public String pageName()
Returns the name of the Direct to Web template based on the receiver's current task and entity. This value is resolved using the rule system.
pagesAvailable
public Vector pagesAvailable()
This method is intentionally undocumented. You should never have to invoke or customize it.
propertyKey
public String propertyKey()
Returns the key corresponding to the receiver's current property.
propertyKeyIsKeyPath
public boolean propertyKeyIsKeyPath()
This method is intentionally undocumented. You should never have to invoke or customize it.
propertyType
public int propertyType()
Returns a
propertyTypeForUnknownKeyPath
static public String propertyTypeForUnknownKeyPath(String aString, EOEntity anEntity)
This method is intentionally undocumented. You should never have to invoke or customize it.
rawPageName
public String rawPageName()
This method is intentionally undocumented. You should never have to invoke or customize it.
rawSystemPageName
public String rawSystemPageName()
This method is intentionally undocumented. You should never have to invoke or customize it.
relationship
public EORelationship relationship()
Returns a relationship (an
null
if the property is not a relationship.
The
relationship
protected EORelationship relationship(String aString)
This method is intentionally undocumented. You should never have to invoke or customize it.
sessionDidTimeOut
public void sessionDidTimeOut(NSNotification notification)
This method is intentionally undocumented. You should never have to invoke or customize it.
setDynamicPage
public void setDynamicPage(String aString)
This method is intentionally undocumented. You should never have to invoke or customize it.
setEntity
public void setEntity(EOEntity entity)
This method is intentionally undocumented. You should never have to invoke or customize it.
setPropertyKey
public void setPropertyKey(String newPropertyKey)
Sets the property key in the receiver's dictionary to
newPropertyKey
. This method is usually invoked by a Direct to Web template. See the "Direct to Web Architecture" chapter of Developing WebObjects Applications With Direct To Web for more information.
setTask
public void setTask(String newTask)
This method is intentionally undocumented. You should never have to invoke or customize it.
startupEntityName
public String startupEntityName()
Returns a
defaultPage
method and is the first page displayed after the user logs into an application generated by the Direct to Web wizard.This key is resolved using the rule engine. With the default set of rules, this method returns an empty string because the query-all page does not work with any particular entity.
See Also:
defaultPage (D2W)
startupTask
public String startupTask()
Returns a
defaultPage
method and is the first page displayed after the user logs into an application generated by the Direct to Web wizard.This key is resolved using the rule engine.
See Also:
defaultPage (D2W)
takeValueForInferrableKey
public void takeValueForInferrableKey(Object anObject, String aString)
This method is intentionally undocumented. You should never have to invoke or customize it.
takeValueForKey
public void takeValueForKey(Object newValue, String key)
Sets the receiver's value for
key
to be newValue
. For a list of the keys implemented by takeValueForKeyPath
public void takeValueForKeyPath(Object newValue, String keyPath)
Sets the receiver's value for the key path
keyPath
to newValue
. For a list of the keys implemented by task
public String task()
Returns a
toString
public String toString()
This method is intentionally undocumented. You should never have to invoke or customize it.
valueForKey
public Object valueForKey(String key)
Returns the receiver's value (an
key
. This method may resolve the key using the rule system. For an explanation of how you use this method and a list of the keys implemented by valueForKeyNoInference
public Object valueForKeyNoInference(String aString)
This method is intentionally undocumented. You should never have to invoke or customize it.
valueForKeyPath
public Object valueForKeyPath(String keyPath)
Returns the receiver's value (an
keyPath
. This method enables you to access Direct to Web context keys paths such as entity.name
. For an explanation of how you use this method, how the method resolves the key, and a list of the keys implemented by See Also:
valueForKey
valueForKeyPathNoInference
public Object valueForKeyPathNoInference(String aString)
This method is intentionally undocumented. You should never have to invoke or customize it.
© 2001 Apple Computer, Inc.