|
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.D2W
The D2W
class is responsible for creating Direct to Web pages.
In each Direct to Web application, one instance of D2W creates all of the
pages. This instance is called the Direct to Web factory and is accessed
using the factory
static method.
D2W defines several methods to create Direct to Web pages, for example,
listPageForEntityNamed
, errorPage
, pageForConfigurationNamed
, and
pageForTaskAndEntityNamed
. Invoke these methods on the Direct to Web factory.
For example, to create a list page for Movies, use
ListPageInterface lpi = D2W.factory().listPageForEntityNamed("Movie", session());
If you want to customize the Direct to Web factory, you need to subclass D2W,
create an instance of your subclass, and register it with Direct to Web using
the setFactory method
. See the "Customizing a Direct to Web Application"
chapter in Developing WebObjects Applications With Direct to Web
for more information.
The D2W class provides the setWebAssistantEnabled
and isWebAssistantEnabled
methods to manage the Web Assistant. You can also change the keys with which
Direct to Web caches rule firing results using newSignificantKey
. See the
"Direct to Web Architecture" chapter of
Developing WebObjects Applications With Direct to Web for more
information about rule firing caching.
Constructor Summary | |
D2W()
|
Method Summary | |
void |
activateWebAssistantServer()
This method is intentionally undocumented. |
void |
checkMultithreading(NSNotification n)
This method is intentionally undocumented. |
ConfirmPageInterface |
confirmPageForEntityNamed(String entityName,
WOSession session)
Returns a confirm page (a WOComponent object implementing the ConfirmPageInterface) for the entity identified by entityName . |
WOComponent |
defaultPage(WOSession session)
Returns a default startup page as a WOComponent, which is a query-all page unless you override the rule for the startupTask key. |
EditPageInterface |
editPageForEntityNamed(String entityName,
WOSession session)
Returns an edit page (a WOComponent object implementing the EditPageInterface) for the entity identified by entityName . |
EditPageInterface |
editPageForNewObjectWithConfigurationNamed(String configurationName,
WOSession session)
Creates a new object and returns an edit page as a WOComponent implementing the EditPageInterface. |
EditPageInterface |
editPageForNewObjectWithEntityNamed(String entityName,
WOSession session)
Creates a new object and returns an edit page as a WOComponent implementing the EditPageInterface. |
EditRelationshipPageInterface |
editRelationshipPageForEntityNamed(String entityName,
WOSession session)
Returns an edit-relationship page as a WOComponent implementing the EditRelationshipPageInterface for the entity identified by entityName . |
static String |
entityNameFromPage(WOComponent page)
Returns the name of the entity that the D2WPage manipulates. |
ErrorPageInterface |
errorPage(WOContext context)
Returns an error page as a WOComponent implementing the ErrorPageInterface. |
ErrorPageInterface |
errorPage(WOSession session)
Returns an error page as a WOComponent implementing the ErrorPageInterface. |
static D2W |
factory()
Gets the Direct to Web factory, an instance of D2W that creates all of the Direct to Web pages in the application. |
String |
homeHrefInContext(WOContext context)
Returns the URL of the login page for the session contained in the specified context. |
protected void |
init()
This method is intentionally undocumented. |
InspectPageInterface |
inspectPageForEntityNamed(String entityName,
WOSession session)
Returns an inspect page as a WOComponent implementing the InspectPageInterface for the entity identified by entityName . |
boolean |
isLiveAssistantEnabled()
Deprecated. |
boolean |
isWebAssistantEnabled()
Determines whether or not the Web Assistant is enabled. |
ListPageInterface |
listPageForEntityNamed(String entityName,
WOSession session)
Returns a list page as a WOComponent implementing the ListPageInterface for the entity identified by entityName . |
void |
newSignificantKey(String newKey)
Adds key to the list of keys that the rule engine uses to cache the results of rule firing. |
protected com.apple.client.directtoweb.common.AssistantPacket |
packetForPropertyAndSettingsWithPage(com.apple.client.directtoweb.common.Property p,
com.apple.client.directtoweb.common.Settings settings,
WOComponent lastPage)
This method is intentionally undocumented. |
protected com.apple.client.directtoweb.common.AssistantPacket |
packetForSettingsWithPage(com.apple.client.directtoweb.common.Settings settings,
WOComponent lastPage)
This method is intentionally undocumented. |
WOComponent |
pageForConfigurationNamed(String dynamicPageName,
WOSession session)
Returns a Direct to Web page as a WOComponent for a named configuration identified by the dynamicPageName argument. |
protected WOComponent |
pageForTaskAndEntityNamed(String task,
String entityName,
WOContext context)
Returns a Direct to Web page as a WOComponent for the task identified by task and
the entity identified by entityName . |
WOComponent |
pageForTaskAndEntityNamed(String task,
String entityName,
WOSession session)
Returns a Direct to Web page as a WOComponent for the task identified by task and
the entity identified by entityName . |
QueryAllPageInterface |
queryAllPage(WOSession session)
Returns a query-all page as a WOComponent implementing the QueryAllPageInterface. |
QueryPageInterface |
queryPageForEntityNamed(String entityName,
WOSession session)
Returns a query page as a WOComponent object implementing the QueryPageInterface for the entity identified by entityName . |
void |
requestWasHandled(WOContext c)
This method is intentionally undocumented. |
SelectPageInterface |
selectPageForEntityNamed(String entityName,
WOSession session)
Returns a select page as a WOComponent implementing the SelectPageInterface for the entity identified by entityName . |
static void |
setFactory(D2W newValue)
Sets the Direct to Web factory, an instance of D2W that is used to create all of the Direct to Web pages of an application. |
void |
setLiveAssistantEnabled(boolean newValue)
Deprecated. |
void |
setWebAssistantEnabled(boolean newValue)
Sets whether the Web Assistant is enabled or not. |
static boolean |
traceRuleFiringEnabled()
Deprecated. |
static boolean |
traceRuleModificationsEnabled()
Deprecated. |
NSArray |
visibleEntityNames()
Deprecated. |
NSArray |
visibleEntityNames(WOSession session)
|
WOComponent |
webAssistantInContext(WOContext context)
Is invoked when the user clicks Customize in the menu bar. |
void |
willCheckRules(NSNotification n)
This method is intentionally undocumented. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public D2W()
Method Detail |
public void activateWebAssistantServer()
public void checkMultithreading(NSNotification n)
public ConfirmPageInterface confirmPageForEntityNamed(String entityName, WOSession session)
entityName
.
The session
argument specifies the session in which the page should be created.-
- entityName - the name of the entity.-
- session - the WOSession in which the page should be created.public WOComponent defaultPage(WOSession session)
startupTask
key.
The session
argument specifies the session in which the page should be created.-
- session - the WOSession in which the page should be created.public EditPageInterface editPageForEntityNamed(String entityName, WOSession session)
entityName
.
The session
argument specifies the session in which the page should be created.-
- entityName - the name of the entity.-
- session - the WOSession in which the page should be created.public EditPageInterface editPageForNewObjectWithConfigurationNamed(String configurationName, WOSession session)
configurationName
.
The session
argument specifies the session in which the page should be created.-
- configurationName - the name of the configuration.-
- session - the WOSession in which the page should be created.public EditPageInterface editPageForNewObjectWithEntityNamed(String entityName, WOSession session)
entityName
.
The session
argument specifies the session in which the page should be created.
The EOEntity class is defined in the EOAccess Framework.-
- entityName - the name of the entity.-
- session - the WOSession in which the page should be created.public EditRelationshipPageInterface editRelationshipPageForEntityNamed(String entityName, WOSession session)
entityName
.
The session
argument specifies the session in which the page should be created.-
- entityName - the name of the entity.-
- session - the WOSession in which the page should be created.public static String entityNameFromPage(WOComponent page)
page
- - the WOComponent page with the entity.public ErrorPageInterface errorPage(WOSession session)
session
argument specifies the session in which the page should be created.-
- session - the WOSession in which the page should be created.public ErrorPageInterface errorPage(WOContext context)
context
argument specifies the WOContext containing the session in which the
page should be created.-
- context - the WOContext with the session in which to create the page.public static D2W factory()
public String homeHrefInContext(WOContext context)
context
- - the WOContext object.protected void init()
public InspectPageInterface inspectPageForEntityNamed(String entityName, WOSession session)
entityName
.
The session
argument specifies the session in which the page should be created.-
- entityName - the name of the entity.-
- session - the WOSession in which the page should be created.public boolean isLiveAssistantEnabled()
isWebAssistantEnabled
instead.isWebAssistantEnabled()
public boolean isWebAssistantEnabled()
public ListPageInterface listPageForEntityNamed(String entityName, WOSession session)
entityName
.
The session
argument specifies the session in which the page should be created.-
- entityName - the name of the entity.-
- session - the WOSession in which the page should be created.public void newSignificantKey(String newKey)
newKey
- - the key to add to the rule firing cache.protected com.apple.client.directtoweb.common.AssistantPacket packetForPropertyAndSettingsWithPage(com.apple.client.directtoweb.common.Property p, com.apple.client.directtoweb.common.Settings settings, WOComponent lastPage)
protected com.apple.client.directtoweb.common.AssistantPacket packetForSettingsWithPage(com.apple.client.directtoweb.common.Settings settings, WOComponent lastPage)
public WOComponent pageForConfigurationNamed(String dynamicPageName, WOSession session)
dynamicPageName
argument.
The session argument specifies the session in which the page should be created.
See the "Direct to Web" chapter of WebObjects Tools and Techniques for more
information about named configurations.-
- dynamicPageName - the name of the configuration.-
- session - the WOSession in which the page should be created.public WOComponent pageForTaskAndEntityNamed(String task, String entityName, WOSession session)
task
and
the entity identified by entityName
.
The session argument specifies the session in which the page should be created.-
- task - name of the task.-
- entityName - the name of the entity.-
- session - the WOSession in which the page should be created.protected WOComponent pageForTaskAndEntityNamed(String task, String entityName, WOContext context)
task
and
the entity identified by entityName
.
The context argument specifies the context containing the session in which the page
should be created.-
- task - name of the task.-
- entityName - the name of the entity.-
- context - the WOContext with the session in which to create the page.public QueryAllPageInterface queryAllPage(WOSession session)
session
argument specifies the session in which the page should be created.-
- session - the WOSession in which the page should be created.public QueryPageInterface queryPageForEntityNamed(String entityName, WOSession session)
entityName
.
The session
argument specifies the session in which the page should be created.-
- entityName - the name of the entity.-
- session - the WOSession in which the page should be created.public void requestWasHandled(WOContext c)
public SelectPageInterface selectPageForEntityNamed(String entityName, WOSession session)
entityName
.
The session
argument specifies the session in which the page should be created.-
- entityName - the name of the entity.-
- session - the WOSession in which the page should be created.public static void setFactory(D2W newValue)
newValue
- - the D2W instance.public void setLiveAssistantEnabled(boolean newValue)
setWebAssistantEnabled
instead.setWebAssistantEnabled(boolean)
public void setWebAssistantEnabled(boolean newValue)
newValue
- - whether or not to enable the Web Assistant.public static boolean traceRuleFiringEnabled()
public static boolean traceRuleModificationsEnabled()
public NSArray visibleEntityNames(WOSession session)
public NSArray visibleEntityNames()
public WOComponent webAssistantInContext(WOContext context)
context
- - the WebObjects context.public void willCheckRules(NSNotification n)
|
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 |