Project Wonder 5.0

er.directtorest.security
Class ERD2RestAllowSecurityDelegate

java.lang.Object
  extended by er.directtorest.security.ERD2RestAllowSecurityDelegate
All Implemented Interfaces:
IERXRestSecurityDelegate

public class ERD2RestAllowSecurityDelegate
extends java.lang.Object
implements IERXRestSecurityDelegate


Constructor Summary
ERD2RestAllowSecurityDelegate()
           
 
Method Summary
 boolean canDeleteObject(com.webobjects.eoaccess.EOEntity entity, com.webobjects.eocontrol.EOEnterpriseObject eo, ERXRestContext context)
          Returns whether or not the given object can be deleted.
 boolean canInsertObject(com.webobjects.eoaccess.EOEntity entity, ERXRestContext context)
          Returns whether or not the caller is allowed to insert a new object of the given entity.
 boolean canInsertObject(com.webobjects.eoaccess.EOEntity parentEntity, java.lang.Object parentObject, java.lang.String parentKey, com.webobjects.eoaccess.EOEntity entity, ERXRestContext context)
          Returns whether or not a new object can be inserted into the specified relationship of an existing object.
 boolean canInsertProperty(com.webobjects.eoaccess.EOEntity entity, com.webobjects.eocontrol.EOEnterpriseObject eo, java.lang.String propertyName, ERXRestContext context)
          Returns whether or not the given property can be set during an insert.
 boolean canUpdateObject(com.webobjects.eoaccess.EOEntity entity, com.webobjects.eocontrol.EOEnterpriseObject eo, ERXRestContext context)
          Returns whether or not the given object can be updated.
 boolean canUpdateProperty(com.webobjects.eoaccess.EOEntity entity, com.webobjects.eocontrol.EOEnterpriseObject eo, java.lang.String propertyName, ERXRestContext context)
          Returns whether or not the given property can be set during an update.
 boolean canViewObject(com.webobjects.eoaccess.EOEntity entity, com.webobjects.eocontrol.EOEnterpriseObject eo, ERXRestContext context)
          Returns whether or not the given object can be seen.
 boolean canViewProperty(com.webobjects.eoaccess.EOEntity entity, java.lang.Object obj, java.lang.String propertyName, ERXRestContext context)
          Returns whether or not the given property can be seen.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ERD2RestAllowSecurityDelegate

public ERD2RestAllowSecurityDelegate()
Method Detail

canDeleteObject

public boolean canDeleteObject(com.webobjects.eoaccess.EOEntity entity,
                               com.webobjects.eocontrol.EOEnterpriseObject eo,
                               ERXRestContext context)
Description copied from interface: IERXRestSecurityDelegate
Returns whether or not the given object can be deleted. This is called prior to calling canDeleteProperty on any properties and acts as a first line of defenese to completely cut-off access to an object for delete. Note that the actual meaning of "delete" can be defined in your delete method, so returning true for this does not *necessarily* mean the object will be deleted. Instead it just means you will allow access to the delete method.

Specified by:
canDeleteObject in interface IERXRestSecurityDelegate
Parameters:
entity - the entity of the object
eo - the object to check
context - the rest context
Returns:
whether or not the given object can be deleted

canInsertObject

public boolean canInsertObject(com.webobjects.eoaccess.EOEntity entity,
                               ERXRestContext context)
Description copied from interface: IERXRestSecurityDelegate
Returns whether or not the caller is allowed to insert a new object of the given entity. This variant is called if the caller tries to insert an object without traversing a keypath -- that is, a top level insert. You can return false from this without implying that canInsertObject(..., parentObject, parentKey ..) returns false -- the two are mutually exclusive.

Specified by:
canInsertObject in interface IERXRestSecurityDelegate
Parameters:
entity - the entity of the object to insert
context - the rest context
Returns:
whether or not a new object can be inserted

canInsertObject

public boolean canInsertObject(com.webobjects.eoaccess.EOEntity parentEntity,
                               java.lang.Object parentObject,
                               java.lang.String parentKey,
                               com.webobjects.eoaccess.EOEntity entity,
                               ERXRestContext context)
Description copied from interface: IERXRestSecurityDelegate
Returns whether or not a new object can be inserted into the specified relationship of an existing object.

Specified by:
canInsertObject in interface IERXRestSecurityDelegate
Parameters:
parentEntity - the entity of the parent
parentObject - the parent
parentKey - the name of the relationship on the parent
entity - the entity of the object to insert
context - the rest context
Returns:
whether or not a new object can be inserted

canInsertProperty

public boolean canInsertProperty(com.webobjects.eoaccess.EOEntity entity,
                                 com.webobjects.eocontrol.EOEnterpriseObject eo,
                                 java.lang.String propertyName,
                                 ERXRestContext context)
Description copied from interface: IERXRestSecurityDelegate
Returns whether or not the given property can be set during an insert. This is only called if canInsertObject has returned true.

Specified by:
canInsertProperty in interface IERXRestSecurityDelegate
Parameters:
entity - the entity of the object
eo - the object
propertyName - the property name to check
context - the rest context
Returns:
whether or not the given property can be set during an insert

canUpdateObject

public boolean canUpdateObject(com.webobjects.eoaccess.EOEntity entity,
                               com.webobjects.eocontrol.EOEnterpriseObject eo,
                               ERXRestContext context)
Description copied from interface: IERXRestSecurityDelegate
Returns whether or not the given object can be updated. This is called prior to calling canUpdateProperty on any properties and acts as a first line of defenese to completely cut-off access to an object for update

Specified by:
canUpdateObject in interface IERXRestSecurityDelegate
Parameters:
entity - the entity of the object
eo - the object to check
context - the rest context
Returns:
whether or not the given object can be updated

canUpdateProperty

public boolean canUpdateProperty(com.webobjects.eoaccess.EOEntity entity,
                                 com.webobjects.eocontrol.EOEnterpriseObject eo,
                                 java.lang.String propertyName,
                                 ERXRestContext context)
Description copied from interface: IERXRestSecurityDelegate
Returns whether or not the given property can be set during an update. This is only called if canUpdateObject has returned true.

Specified by:
canUpdateProperty in interface IERXRestSecurityDelegate
Parameters:
entity - the entity of the object
eo - the object
propertyName - the property name to check
context - the rest context
Returns:
whether or not the given property can be set during an update

canViewObject

public boolean canViewObject(com.webobjects.eoaccess.EOEntity entity,
                             com.webobjects.eocontrol.EOEnterpriseObject eo,
                             ERXRestContext context)
Description copied from interface: IERXRestSecurityDelegate
Returns whether or not the given object can be seen. This is called prior to calling canViewProperty on any properties and acts as a first line of defenese to completely cut-off access to an object.

Specified by:
canViewObject in interface IERXRestSecurityDelegate
Parameters:
entity - the entity of the object
eo - the object to check
context - the rest context
Returns:
whether or not the given object can be seen

canViewProperty

public boolean canViewProperty(com.webobjects.eoaccess.EOEntity entity,
                               java.lang.Object obj,
                               java.lang.String propertyName,
                               ERXRestContext context)
Description copied from interface: IERXRestSecurityDelegate
Returns whether or not the given property can be seen. This is only called if canViewObject has returned true.

Specified by:
canViewProperty in interface IERXRestSecurityDelegate
Parameters:
entity - the entity of the object
obj - the object
propertyName - the property name to check
context - the rest context
Returns:
whether or not the given property can be seen

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

Copyright © 2002 – 2007 Project Wonder.