Project Wonder 5.0

er.rest.entityDelegates
Interface IERXRestDelegate

All Known Implementing Classes:
ERD2RestDelegate, ERXDefaultRestDelegate

public interface IERXRestDelegate

IERXRestDelegate provides the core hooks into REST processing.

Author:
mschrag

Method Summary
 void delete(ERXRestRequest deleteRequest, ERXRestContext context)
          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 insertRequest, ERXRestContext context)
          Creates the objects defined by the XML document (which can contain a single object or an array inserts).
 ERXRestKey process(ERXRestRequest restRequest, ERXRestContext context)
          Inserts or updates the objects defined by the XML document.
 void update(ERXRestRequest updateRequest, ERXRestContext context)
          Updates the objects defined by the XML document (which can contain partial updates or array updates).
 ERXRestKey view(ERXRestRequest restRequest, ERXRestContext restContext)
          Views the object defined by the incoming url.
 

Method Detail

view

ERXRestKey view(ERXRestRequest restRequest,
                ERXRestContext restContext)
Views the object defined by the incoming url.

Parameters:
restRequest - the incoming viewing request.
restContext - the rest context
Returns:
the actual result as an ERXRestResult
Throws:
ERXRestException - if there is a general failure
ERXRestSecurityException - if the user attempts to insert or updates objects that he/she is not permitted to
ERXRestNotFoundException - if one of the requested objects does not exist

process

ERXRestKey process(ERXRestRequest restRequest,
                   ERXRestContext context)
                   throws ERXRestException,
                          ERXRestSecurityException,
                          ERXRestNotFoundException
Inserts or updates the objects defined by the XML document.

Parameters:
restRequest - the incoming inserts or updates
context - the rest context
Returns:
the inserted or updates objects as an ERXRestResult
Throws:
ERXRestException - if there is a general failure
ERXRestSecurityException - if the user attempts to insert or updates objects that he/she is not permitted to
ERXRestNotFoundException - if one of the requested objects does not exist

insert

ERXRestKey insert(ERXRestRequest insertRequest,
                  ERXRestContext context)
                  throws ERXRestException,
                         ERXRestSecurityException,
                         ERXRestNotFoundException
Creates the objects defined by the XML document (which can contain a single object or an array inserts).

Parameters:
insertRequest - the incoming inserts
context - the rest context
Returns:
the inserted objects as an ERXRestResult
Throws:
ERXRestException - if there is a general failure
ERXRestSecurityException - if the user attempts to insert objects that he/she is not permitted to insert
ERXRestNotFoundException - if one of the requested objects does not exist

update

void update(ERXRestRequest updateRequest,
            ERXRestContext context)
            throws ERXRestException,
                   ERXRestSecurityException,
                   ERXRestNotFoundException
Updates the objects defined by the XML document (which can contain partial updates or array updates).

Parameters:
updateRequest - the incoming updates
context - 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

void delete(ERXRestRequest deleteRequest,
            ERXRestContext context)
            throws ERXRestException,
                   ERXRestSecurityException,
                   ERXRestNotFoundException
Deletes the given object (NSArray of EOEnterpriseObject).

Parameters:
deleteRequest - the incoming delete
context - 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

entityNameForAlias

java.lang.String entityNameForAlias(java.lang.String entityAlias)
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.

Parameters:
entityAlias - the entity alias
Returns:
the actual entity name

entityDelegate

IERXRestEntityDelegate entityDelegate(com.webobjects.eoaccess.EOEntity entity)
Returns the per-entity rest delegate.

Parameters:
entity - the entity
Returns:
the per-entity rest delegate

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

Copyright © 2002 – 2007 Project Wonder.