ERD2WDirectAction Class Reference

Inherits er::extensions::appserver::ERXDirectAction.

Inherited by DirectAction, DirectAction, DirectAction, DirectAction, DirectAction, and DirectAction.

Collaboration diagram for ERD2WDirectAction:

Collaboration graph
[legend]

List of all members.

Public Member Functions

WOActionResults dynamicPageForActionNamed (String anActionName)
 ERD2WDirectAction (WORequest r)
EOFetchSpecification fetchSpecificationFromRequest (String entityName)
WOActionResults forbiddenAction ()
String keyPathFromRequest ()
WOActionResults performActionNamed (String anActionName)
WOComponent previousPageFromRequest ()
NSDictionary primaryKeyFromRequest (EOEditingContext ec, String entityName)
Number primaryKeyFromRequest ()
EOArrayDataSource relationshipArrayFromRequest (EOEditingContext ec, EOClassDescription cd)
WOActionResults reportException (Exception ex)

Protected Member Functions

boolean allowPageConfiguration (String pageConfiguration)
EOEditingContext newEditingContext ()
void prepareEditPage (D2WContext context, EditPageInterface epi, String entityName)
WOActionResults prepareErrorPage (D2WContext d2wContext, ErrorPageInterface epi)
void prepareInspectPage (D2WContext context, InspectPageInterface ipi, String entityName)
void prepareListPage (D2WContext context, ListPageInterface lpi, String entityName)
void prepareQueryPage (D2WContext context, QueryPageInterface qpi, String entityName)
Object qualifierValueForAttribute (EOAttribute attribute, String stringValue)

Protected Attributes

final Logger actionLog = Logger.getLogger(ERD2WDirectAction.class.getName() + ".actions")

Static Protected Attributes

static final Logger log = Logger.getLogger(ERD2WDirectAction.class)

Static Package Attributes

static final String contextIDKey = "__cid"
static final String createPrefix = "Create"
static final String fetchLimitKey = "__fs_fetchLimit"
static final String fetchSpecificationKey = "__fs"
static final String keyPathKey = "__keypath"
static final String primaryKeyKey = "__key"
static final String usesDistinctKey = "__fs_usesDistinct"


Detailed Description

Automatically creates page configurations from URLs.
Examples: To provide some security, you should override allowPageConfiguration(String). Also, this class is abstract, so you need to subclass it.

Constructor & Destructor Documentation

ERD2WDirectAction ( WORequest  r  ) 

Public constructor

Parameters:
r current request


Member Function Documentation

boolean allowPageConfiguration ( String  pageConfiguration  )  [protected]

Checks if a page configuration is allowed to render. Override for a more intelligent access scheme as the default just returns true.

Parameters:
pageConfiguration 

Reimplemented in DirectAction, DirectAction, DirectAction, and DirectAction.

WOActionResults dynamicPageForActionNamed ( String  anActionName  ) 

EOFetchSpecification fetchSpecificationFromRequest ( String  entityName  ) 

Retrieves and executes the fetch specification given in the request.

WOActionResults forbiddenAction (  ) 

Returns a response with a 401 (access denied) message. Override this for something more user friendly.

String keyPathFromRequest (  ) 

EOEditingContext newEditingContext (  )  [protected]

For edit pages, we always use a fresh editing context.

WOActionResults performActionNamed ( String  anActionName  ) 

Overrides the default implementation to try to look up the action as a page configuration if there is no method with the wanted name. This implementation catches NoSuchMethodException more or less silently, so be sure to turn on logging.

Reimplemented from ERXDirectAction.

void prepareEditPage ( D2WContext  context,
EditPageInterface  epi,
String  entityName 
) [protected]

WOActionResults prepareErrorPage ( D2WContext  d2wContext,
ErrorPageInterface  epi 
) [protected]

Returns an error page and sets the message to the key __message.

void prepareInspectPage ( D2WContext  context,
InspectPageInterface  ipi,
String  entityName 
) [protected]

void prepareListPage ( D2WContext  context,
ListPageInterface  lpi,
String  entityName 
) [protected]

void prepareQueryPage ( D2WContext  context,
QueryPageInterface  qpi,
String  entityName 
) [protected]

WOComponent previousPageFromRequest (  ) 

NSDictionary primaryKeyFromRequest ( EOEditingContext  ec,
String  entityName 
)

Number primaryKeyFromRequest (  ) 

Object qualifierValueForAttribute ( EOAttribute  attribute,
String  stringValue 
) [protected]

Overwrite for custom value conversion.

Parameters:
attribute 
stringValue 

EOArrayDataSource relationshipArrayFromRequest ( EOEditingContext  ec,
EOClassDescription  cd 
)

WOActionResults reportException ( Exception  ex  ) 

Creates an error page with the given exception.

Parameters:
ex 


Member Data Documentation

final Logger actionLog = Logger.getLogger(ERD2WDirectAction.class.getName() + ".actions") [protected]

final String contextIDKey = "__cid" [static, package]

denotes the context ID for the previous page

final String createPrefix = "Create" [static, package]

final String fetchLimitKey = "__fs_fetchLimit" [static, package]

fetchLimit for the fetchSpec.

final String fetchSpecificationKey = "__fs" [static, package]

fetchSpecificationKey is used to get relationships of a given object.

final String keyPathKey = "__keypath" [static, package]

keyPathKey is used to get relationships of a given object.

final Logger log = Logger.getLogger(ERD2WDirectAction.class) [static, protected]

logging support

Reimplemented from ERXDirectAction.

final String primaryKeyKey = "__key" [static, package]

primaryKeyKey is used to identity a given object via it's primary key.

final String usesDistinctKey = "__fs_usesDistinct" [static, package]

fetchLimit for the fetchSpec.


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:42:48 2012 for Project Wonder by  doxygen 1.5.8