|
Project Wonder 5.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecter.rest.entityDelegates.ERXDefaultRestDelegate
public class ERXDefaultRestDelegate
ERXDefaultRestDelegate is the default implementation of the IERXRestDelegate interface. It provides support for registering custom IERXRestEntityDelegates for specific entities.
Constructor Summary | |
---|---|
ERXDefaultRestDelegate()
Constructs an ERXDefaultRestDelegate with an ERXDenyRestEntityDelegate as the default entity delegate. |
|
ERXDefaultRestDelegate(boolean guessDelegateNames)
Constructs an ERXDefaultRestDelegate with an ERXDenyRestEntityDelegate as the default entity delegate. |
|
ERXDefaultRestDelegate(IERXRestEntityDelegate defaultDelegate)
Constructs an ERXDefaultRestDelegate with the given default entity delegate and with delegate name guessing turned on. |
|
ERXDefaultRestDelegate(IERXRestEntityDelegate defaultDelegate,
boolean guessDelegateNames)
Constructs an ERXDefaultRestDelegate with the given 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 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). |
protected ERXRestKey |
insertInto(com.webobjects.eoaccess.EOEntity entity,
ERXRestRequest insertRequest,
com.webobjects.eoaccess.EOEntity parentEntity,
com.webobjects.eocontrol.EOEnterpriseObject parentObject,
java.lang.String parentKey,
ERXRestContext context)
|
ERXRestKey |
process(ERXRestRequest restRequest,
ERXRestContext context)
Inserts or updates the objects defined by the XML document. |
void |
removeDelegateForEntityNamed(java.lang.String entityName)
Removes the delegate for the given entity name. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ERXDefaultRestDelegate()
public ERXDefaultRestDelegate(boolean guessDelegateNames)
guessDelegateNames
- if true, delegates names will be guessed "public ERXDefaultRestDelegate(IERXRestEntityDelegate defaultDelegate)
defaultDelegate
- the default entity delegate to usepublic ERXDefaultRestDelegate(IERXRestEntityDelegate defaultDelegate, boolean guessDelegateNames)
defaultDelegate
- the default entity delegate to useguessDelegateNames
- if true, delegates names will be guessed "Method Detail |
---|
public ERXRestKey process(ERXRestRequest restRequest, ERXRestContext context) throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException
IERXRestDelegate
process
in interface IERXRestDelegate
restRequest
- the incoming inserts or updatescontext
- the rest context
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 existpublic ERXRestKey view(ERXRestRequest restRequest, ERXRestContext restContext)
IERXRestDelegate
view
in interface IERXRestDelegate
restRequest
- the incoming viewing request.restContext
- the rest context
public ERXRestKey insert(ERXRestRequest insertRequest, ERXRestContext context) throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException
IERXRestDelegate
insert
in interface IERXRestDelegate
insertRequest
- the incoming insertscontext
- the rest context
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 existprotected ERXRestKey insertInto(com.webobjects.eoaccess.EOEntity entity, ERXRestRequest insertRequest, com.webobjects.eoaccess.EOEntity parentEntity, com.webobjects.eocontrol.EOEnterpriseObject parentObject, java.lang.String parentKey, ERXRestContext context) throws ERXRestSecurityException, ERXRestException, ERXRestNotFoundException
ERXRestSecurityException
ERXRestException
ERXRestNotFoundException
public void update(ERXRestRequest updateRequest, ERXRestContext context) throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException
IERXRestDelegate
update
in interface IERXRestDelegate
updateRequest
- the incoming updatescontext
- the rest context
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 existpublic void delete(ERXRestRequest deleteRequest, ERXRestContext context) throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException
IERXRestDelegate
delete
in interface IERXRestDelegate
deleteRequest
- the incoming deletecontext
- the rest context
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 existpublic java.lang.String entityNameForAlias(java.lang.String entityAlias)
IERXRestDelegate
entityNameForAlias
in interface IERXRestDelegate
entityAlias
- the entity alias
public IERXRestEntityDelegate entityDelegate(com.webobjects.eoaccess.EOEntity entity)
IERXRestDelegate
entityDelegate
in interface IERXRestDelegate
entity
- the entity
public void addDelegateForEntityNamed(IERXRestEntityDelegate entityDelegate, java.lang.String entityName)
entityDelegate
- the entity delegateentityName
- the entity name to associate the delegate withpublic void removeDelegateForEntityNamed(java.lang.String entityName)
entityName
- the name of the entity
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |