|
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.ERXAbstractRestEntityDelegate
er.rest.entityDelegates.ERXStandardRestEntityDelegate
er.rest.entityDelegates.ERXUnsafeRestEntityDelegate
public class ERXUnsafeRestEntityDelegate
ERXUnsafeRestEntityDelegate should NEVER be used in production. This is an entity delegate implementation designed to allow you to explore the features of ERRest without having to actually write custom delegates. This implementation allows full access to read, insert, update, and delegate any object in any model in your system that it is assigned as a delegate for. It will throw an exception on creation if ERXApplication.erxApplication().isDevelopmentMode() is false.
Constructor Summary | |
---|---|
ERXUnsafeRestEntityDelegate()
Constructs an ERXUnsafeRestEntityDelegate. |
|
ERXUnsafeRestEntityDelegate(boolean allowProductionUse)
Constructs an ERXUnsafeRestEntityDelegate. |
Method Summary | |
---|---|
static com.webobjects.foundation.NSArray<java.lang.String> |
allPropertyNames(com.webobjects.eoaccess.EOEntity entity,
boolean includeToMany)
|
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 true if propertyName is declared as an insert property. |
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 true if propertyName is declared as an update property. |
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 true if propertyName is declared as a view property. |
void |
initializeEntityNamed(java.lang.String entityName)
Do nothing by default |
com.webobjects.foundation.NSArray |
objectsForEntity(com.webobjects.eoaccess.EOEntity entity,
ERXRestContext context)
Returns an array of all of the EOs visible to the user for the given entity. |
com.webobjects.foundation.NSArray |
visibleObjects(com.webobjects.eoaccess.EOEntity parentEntity,
java.lang.Object parent,
java.lang.String key,
com.webobjects.eoaccess.EOEntity entity,
com.webobjects.foundation.NSArray objects,
ERXRestContext context)
Given an array, this method filters the array based on the callers permission level. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ERXUnsafeRestEntityDelegate()
public ERXUnsafeRestEntityDelegate(boolean allowProductionUse)
allowProductionUse
- if true, this can be used in production without throwing an exception. BE VERY CAREFUL.Method Detail |
---|
public void initializeEntityNamed(java.lang.String entityName)
ERXAbstractRestEntityDelegate
initializeEntityNamed
in interface IERXRestEntityDelegate
initializeEntityNamed
in class ERXAbstractRestEntityDelegate
entityName
- the name of the entity to initializepublic boolean canInsertProperty(com.webobjects.eoaccess.EOEntity entity, com.webobjects.eocontrol.EOEnterpriseObject eo, java.lang.String propertyName, ERXRestContext context)
ERXStandardRestEntityDelegate
canInsertProperty
in interface IERXRestSecurityDelegate
canInsertProperty
in class ERXStandardRestEntityDelegate
entity
- the entityeo
- the object to checkpropertyName
- the property name to checkcontext
- the rest context
public boolean canUpdateProperty(com.webobjects.eoaccess.EOEntity entity, com.webobjects.eocontrol.EOEnterpriseObject eo, java.lang.String propertyName, ERXRestContext context)
ERXStandardRestEntityDelegate
canUpdateProperty
in interface IERXRestSecurityDelegate
canUpdateProperty
in class ERXStandardRestEntityDelegate
entity
- the entityeo
- the object to checkpropertyName
- the property name to checkcontext
- the rest context
public com.webobjects.foundation.NSArray objectsForEntity(com.webobjects.eoaccess.EOEntity entity, ERXRestContext context)
IERXRestEntityDelegate
entity
- the entity to fetchcontext
- the rest context
public boolean canInsertObject(com.webobjects.eoaccess.EOEntity entity, ERXRestContext context)
IERXRestSecurityDelegate
entity
- the entity of the object to insertcontext
- the rest context
public boolean canInsertObject(com.webobjects.eoaccess.EOEntity parentEntity, java.lang.Object parentObject, java.lang.String parentKey, com.webobjects.eoaccess.EOEntity entity, ERXRestContext context)
IERXRestSecurityDelegate
parentEntity
- the entity of the parentparentObject
- the parentparentKey
- the name of the relationship on the parententity
- the entity of the object to insertcontext
- the rest context
public boolean canDeleteObject(com.webobjects.eoaccess.EOEntity entity, com.webobjects.eocontrol.EOEnterpriseObject eo, ERXRestContext context)
IERXRestSecurityDelegate
entity
- the entity of the objecteo
- the object to checkcontext
- the rest context
public boolean canUpdateObject(com.webobjects.eoaccess.EOEntity entity, com.webobjects.eocontrol.EOEnterpriseObject eo, ERXRestContext context)
IERXRestSecurityDelegate
entity
- the entity of the objecteo
- the object to checkcontext
- the rest context
public boolean canViewObject(com.webobjects.eoaccess.EOEntity entity, com.webobjects.eocontrol.EOEnterpriseObject eo, ERXRestContext context)
IERXRestSecurityDelegate
entity
- the entity of the objecteo
- the object to checkcontext
- the rest context
public boolean canViewProperty(com.webobjects.eoaccess.EOEntity entity, java.lang.Object obj, java.lang.String propertyName, ERXRestContext context)
ERXStandardRestEntityDelegate
canViewProperty
in interface IERXRestSecurityDelegate
canViewProperty
in class ERXStandardRestEntityDelegate
entity
- the entityobj
- the object to checkpropertyName
- the property name to checkcontext
- the rest context
public com.webobjects.foundation.NSArray visibleObjects(com.webobjects.eoaccess.EOEntity parentEntity, java.lang.Object parent, java.lang.String key, com.webobjects.eoaccess.EOEntity entity, com.webobjects.foundation.NSArray objects, ERXRestContext context)
IERXRestEntityDelegate
parentEntity
- the entity of the parentparent
- the parent objectkey
- the key in the parent that references this arrayentity
- the entity of the objects in the arrayobjects
- the actual array of objects to filtercontext
- the rest context
public static com.webobjects.foundation.NSArray<java.lang.String> allPropertyNames(com.webobjects.eoaccess.EOEntity entity, boolean includeToMany)
|
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 |