Project Wonder 5.0

er.directtorest
Class ERD2RestDelegate

java.lang.Object
  extended by er.rest.entityDelegates.ERXDefaultRestDelegate
      extended by er.directtorest.ERD2RestDelegate
All Implemented Interfaces:
IERXRestDelegate

public class ERD2RestDelegate
extends ERXDefaultRestDelegate


Constructor Summary
ERD2RestDelegate()
          Constructs an ERXDefaultRestDelegate with an ERXDenyRestEntityDelegate as the default entity delegate.
 
Method Summary
 void addDelegateForEntityNamed(IERXRestEntityDelegate entityDelegate, java.lang.String entityName)
          Call this method to register an entity-specific delegate for a particular entity name.
 void delete(ERXRestRequest restRequest, ERXRestContext restContext)
          Deletes the given object (NSArray of EOEnterpriseObject).
 IERXRestEntityDelegate entityDelegate(com.webobjects.eoaccess.EOEntity entity)
          Returns the per-entity rest delegate.
 java.lang.String entityNameForAlias(java.lang.String entityAlias)
          Returns the actual name for the entity from its aliased name.
 ERXRestKey insert(ERXRestRequest restRequest, ERXRestContext restContext)
          Creates the objects defined by the XML document (which can contain a single object or an array inserts).
 void removeDelegateForEntityNamed(java.lang.String entityName)
          Removes the delegate for the given entity name.
 void update(ERXRestRequest restRequest, ERXRestContext restContext)
          Updates the objects defined by the XML document (which can contain partial updates or array updates).
protected  void updateDynamicPage(java.lang.String task, ERXRestRequest restRequest, ERXRestContext restContext)
           
 ERXRestKey view(ERXRestRequest restRequest, ERXRestContext restContext)
          Views the object defined by the incoming url.
 
Methods inherited from class er.rest.entityDelegates.ERXDefaultRestDelegate
insertInto, process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ERD2RestDelegate

public ERD2RestDelegate()
Constructs an ERXDefaultRestDelegate with an ERXDenyRestEntityDelegate as the default entity delegate.

Method Detail

entityNameForAlias

public java.lang.String entityNameForAlias(java.lang.String entityAlias)
Description copied from interface: IERXRestDelegate
Returns the actual name for the entity from its aliased name. The mappings for aliases is acquired when entity delegates are registered by calling entityAliasForEntityNamed.

Specified by:
entityNameForAlias in interface IERXRestDelegate
Overrides:
entityNameForAlias in class ERXDefaultRestDelegate
Parameters:
entityAlias - the entity alias
Returns:
the actual entity name

entityDelegate

public IERXRestEntityDelegate entityDelegate(com.webobjects.eoaccess.EOEntity entity)
Description copied from interface: IERXRestDelegate
Returns the per-entity rest delegate.

Specified by:
entityDelegate in interface IERXRestDelegate
Overrides:
entityDelegate in class ERXDefaultRestDelegate
Parameters:
entity - the entity
Returns:
the per-entity rest delegate

addDelegateForEntityNamed

public void addDelegateForEntityNamed(IERXRestEntityDelegate entityDelegate,
                                      java.lang.String entityName)
Call this method to register an entity-specific delegate for a particular entity name.

Overrides:
addDelegateForEntityNamed in class ERXDefaultRestDelegate
Parameters:
entityDelegate - the entity delegate
entityName - the entity name to associate the delegate with

removeDelegateForEntityNamed

public void removeDelegateForEntityNamed(java.lang.String entityName)
Removes the delegate for the given entity name.

Overrides:
removeDelegateForEntityNamed in class ERXDefaultRestDelegate
Parameters:
entityName - the name of the entity

updateDynamicPage

protected void updateDynamicPage(java.lang.String task,
                                 ERXRestRequest restRequest,
                                 ERXRestContext restContext)

view

public ERXRestKey view(ERXRestRequest restRequest,
                       ERXRestContext restContext)
Description copied from interface: IERXRestDelegate
Views the object defined by the incoming url.

Specified by:
view in interface IERXRestDelegate
Overrides:
view in class ERXDefaultRestDelegate
Parameters:
restRequest - the incoming viewing request.
restContext - the rest context
Returns:
the actual result as an ERXRestResult

insert

public ERXRestKey insert(ERXRestRequest restRequest,
                         ERXRestContext restContext)
Description copied from interface: IERXRestDelegate
Creates the objects defined by the XML document (which can contain a single object or an array inserts).

Specified by:
insert in interface IERXRestDelegate
Overrides:
insert in class ERXDefaultRestDelegate
Parameters:
restRequest - the incoming inserts
restContext - the rest context
Returns:
the inserted objects as an ERXRestResult

update

public void update(ERXRestRequest restRequest,
                   ERXRestContext restContext)
            throws ERXRestException,
                   ERXRestSecurityException,
                   ERXRestNotFoundException
Description copied from interface: IERXRestDelegate
Updates the objects defined by the XML document (which can contain partial updates or array updates).

Specified by:
update in interface IERXRestDelegate
Overrides:
update in class ERXDefaultRestDelegate
Parameters:
restRequest - the incoming updates
restContext - the rest context
Throws:
ERXRestException - if there is a general failure
ERXRestSecurityException - if the user attempts to update objects that he/she is not permitted to update
ERXRestNotFoundException - if one of the requested objects does not exist

delete

public void delete(ERXRestRequest restRequest,
                   ERXRestContext restContext)
            throws ERXRestException,
                   ERXRestSecurityException,
                   ERXRestNotFoundException
Description copied from interface: IERXRestDelegate
Deletes the given object (NSArray of EOEnterpriseObject).

Specified by:
delete in interface IERXRestDelegate
Overrides:
delete in class ERXDefaultRestDelegate
Parameters:
restRequest - the incoming delete
restContext - the rest context
Throws:
ERXRestException - if there is a general failure
ERXRestSecurityException - if the user attempts to delete objects that he/she is not permitted to delete
ERXRestNotFoundException - if one of the requested objects does not exist

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.