
Public Member Functions | |
| ERXRestContext | context () |
| EOEntity | entity () |
| ERXRestKey (ERXRestContext context, EOEntity entity, String keyAlias, Object value) throws ERXRestException | |
| ERXRestKey (ERXRestContext context, EOEntity entity, String keyAlias) throws ERXRestException | |
| ERXRestKey | extend (String key) throws ERXRestException |
| ERXRestKey | extend (String key, Object value) throws ERXRestException |
| ERXRestKey | firstKey () |
| boolean | isKeyAll () |
| boolean | isKeyGID () |
| String | key () |
| String | keyAlias () |
| ERXRestKey | lastKey () |
| EOEntity | nextEntity () throws ERXRestException |
| ERXRestKey | nextKey () |
| String | path (boolean skipGID) |
| ERXRestKey | previousKey () |
| String | toString () |
| ERXRestKey | trimPrevious () throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException |
| Object | value () throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException |
Static Public Member Functions | |
| static ERXRestKey | parse (ERXRestContext context, String path) throws ERXRestException, ERXRestNotFoundException |
| static ERXRestKey | parse (ERXRestContext context, ERXRestRequestNode node, String path) throws ERXRestException, ERXRestNotFoundException |
Protected Member Functions | |
| void | _extend (ERXRestKey nextKey, boolean clone) throws ERXRestException |
| ERXRestKey | _extendWithoutClone (String key) throws ERXRestException |
| Object | _value (boolean checkToOnePermissions) throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException |
| void | appendKey (StringBuffer pathBuffer, boolean skipGID) |
| ERXRestKey | cloneKey (boolean clonePrevious, boolean cloneNext) throws ERXRestException |
| ERXRestKey | cloneKeyWithNewEntity (EOEntity entity, boolean clonePrevious, boolean cloneNext) throws ERXRestException |
| ERXRestKey () | |
Private Attributes | |
| ERXRestContext | _context |
| EOEntity | _entity |
| String | _key |
| String | _keyAlias |
| EOEntity | _nextEntity |
| ERXRestKey | _nextKey |
| ERXRestKey | _previousKey |
| Object | _value |
| boolean | _valueFetched |
| ERXRestKey | ( | ) | [protected] |
| ERXRestKey | ( | ERXRestContext | context, | |
| EOEntity | entity, | |||
| String | keyAlias | |||
| ) | throws ERXRestException |
Constructs an ERXRestKey.
| context | the context | |
| entity | the entity that this key is in | |
| keyAlias | the alias of the key |
| ERXRestException |
| ERXRestKey | ( | ERXRestContext | context, | |
| EOEntity | entity, | |||
| String | keyAlias, | |||
| Object | value | |||
| ) | throws ERXRestException |
Constructs an ERXRestKey.
| context | the context | |
| entity | the entity that this key is in | |
| keyAlias | the alias of the key | |
| value | the cached value of the key at this point in the path |
| ERXRestException |
| void _extend | ( | ERXRestKey | nextKey, | |
| boolean | clone | |||
| ) | throws ERXRestException [protected] |
Extends this key to the next key (optionally cloning).
| nextKey | the next key | |
| clone | if true, clone ourselves |
| ERXRestException | if a general failure occurs |
| ERXRestKey _extendWithoutClone | ( | String | key | ) | throws ERXRestException [protected] |
Extends this key "in-place" to the next key in the path.
| key | the next key |
| ERXRestException | if a general failure occurs |
| Object _value | ( | boolean | checkToOnePermissions | ) | throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException [protected] |
Returns (possibly fetching) the destination value of this key. This can be an expensive call, but it will cache its results.
| checkToOnePermissions | if false, this will not check permissions on a to-one call (this is necessary under certain circumstances to provide a more appropriate error messaga). |
| ERXRestException | if a general error occurs | |
| ERXRestSecurityException | if fetching the value triggers a security violation | |
| ERXRestNotFoundException | if the referenced value does not exist |
| void appendKey | ( | StringBuffer | pathBuffer, | |
| boolean | skipGID | |||
| ) | [protected] |
Appends this key to the given keypath buffer.
| pathBuffer | the current key path buffer | |
| skipGID | if true, global ids will be skipped in the generated path |
| ERXRestKey cloneKey | ( | boolean | clonePrevious, | |
| boolean | cloneNext | |||
| ) | throws ERXRestException [protected] |
Returns a clone of this key, optionally also cloning back up the keypath. If you choose not to clone the previous key, it will not have a previous key.
| clonePrevious | if true, the previous key is also cloned | |
| cloneNext | if true, the next key is also cloned |
| ERXRestException | if a general exception occurs |
| ERXRestKey cloneKeyWithNewEntity | ( | EOEntity | entity, | |
| boolean | clonePrevious, | |||
| boolean | cloneNext | |||
| ) | throws ERXRestException [protected] |
Returns a clone of this key, optionally also cloning back up the keypath. If you choose not to clone the previous key, it will not have a previous key.
| entity | the new entity to clone with (typically a superentity) | |
| clonePrevious | if true, the previous key is also cloned |
| ERXRestException | if a general exception occurs |
| ERXRestContext context | ( | ) |
| EOEntity entity | ( | ) |
Returns the entity that contains this key. Note that this is the containing entity NOT the destination entity of the key.
| ERXRestKey extend | ( | String | key | ) | throws ERXRestException |
Clones and extends this key to the next key in a path.
| key | the next key |
| ERXRestException | if a general failure occurs |
| ERXRestKey extend | ( | String | key, | |
| Object | value | |||
| ) | throws ERXRestException |
Clones and extends this key to the next key in a path with the given cached value.
| key | the next key | |
| value | the current cached value |
| ERXRestException | if a general failure occurs |
| ERXRestKey firstKey | ( | ) |
Returns the first key in this path (can be this).
| boolean isKeyAll | ( | ) |
Returns whether or not this key requests a query against all the values of an Entity (/Site.xml = all Sites).
| boolean isKeyGID | ( | ) |
Returns whether or not this key requests a primary key. Right now, only integer primary keys are supported.
| String key | ( | ) |
Returns the actual key property name for this key.
| String keyAlias | ( | ) |
Returns the key alias property name for this key.
| ERXRestKey lastKey | ( | ) |
Returns the last key in this path (can be this).
| EOEntity nextEntity | ( | ) | throws ERXRestException |
Returns the next entity in this key path (i.e. the destination entity). This can be null.
| ERXRestException | if a general error occurs |
| ERXRestKey nextKey | ( | ) |
Returns the next key in this path (can be null).
| static ERXRestKey parse | ( | ERXRestContext | context, | |
| String | path | |||
| ) | throws ERXRestException, ERXRestNotFoundException [static] |
Parse the given URL path and return an ERXRestKey that represents it.
| context | the rest context | |
| path | the path to parse |
| ERXRestException | if a general exception occurs | |
| ERXRestNotFoundException | if an object can not be found in the path |
| static ERXRestKey parse | ( | ERXRestContext | context, | |
| ERXRestRequestNode | node, | |||
| String | path | |||
| ) | throws ERXRestException, ERXRestNotFoundException [static] |
| String path | ( | boolean | skipGID | ) |
Returns the key path from this key to the end of the path.
| skipGID | if true, global ids will be skipped in the generated path |
| ERXRestKey previousKey | ( | ) |
Returns the previous key in the path (or null if this is the first key).
| String toString | ( | ) |
| ERXRestKey trimPrevious | ( | ) | throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException |
Returns a new ERXRestKey with the previous key path removed, so it appears that this key is the start of the path. This method will have to resolve the value of this key.
| ERXRestException | if a general exception occurs | |
| ERXRestSecurityException | if a security error occurs | |
| ERXRestNotFoundException | if an object is not found in the kaypath |
| Object value | ( | ) | throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException |
Returns (possibly fetching) the destination value of this key. This can be an expensive call, but it will cache its results.
| ERXRestException | if a general error occurs | |
| ERXRestSecurityException | if fetching the value triggers a security violation | |
| ERXRestNotFoundException | if the referenced value does not exist |
ERXRestContext _context [private] |
EOEntity _entity [private] |
EOEntity _nextEntity [private] |
ERXRestKey _nextKey [private] |
ERXRestKey _previousKey [private] |
Object _value [private] |
boolean _valueFetched [private] |
1.5.8