
Public Member Functions | |
| Object | current () |
| ERXDictionaryRestResponseWriter (ERXKeyFilter filter) | |
| ERXDictionaryRestResponseWriter (boolean displayAllProperties, boolean displayAllToMany) | |
| ERXDictionaryRestResponseWriter () | |
| Object | root () |
Protected Member Functions | |
| void | addToCollection (String name, Object value) |
| void | appendArrayToResponse (ERXRestContext context, IERXRestResponse response, ERXRestKey result, String arrayName, String entityName, NSArray valueKeys, int indent, NSMutableSet< Object > visitedObjects) throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException, ParseException |
| void | appendDetailsToResponse (ERXRestContext context, IERXRestResponse response, EOEntity entity, EOEnterpriseObject eo, String objectName, String entityName, Object id, NSArray displayKeys, int indent, NSMutableSet< Object > visitedObjects) throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException, ParseException |
| void | appendNoDetailsToResponse (ERXRestContext context, IERXRestResponse response, EOEntity entity, EOEnterpriseObject eo, String objectName, String entityName, Object id, int indent) |
| void | appendPrimitiveToResponse (ERXRestContext context, IERXRestResponse response, ERXRestKey result, int indent, Object value) throws ERXRestException |
| void | appendVisitedToResponse (ERXRestContext context, IERXRestResponse response, EOEntity entity, EOEnterpriseObject eo, String objectName, String entityName, Object id, int indent) |
Private Attributes | |
| Stack< Object > | _stack |
Constructs an ERXDictionaryRestResponseWriter with displayAllProperties = false.
| ERXDictionaryRestResponseWriter | ( | boolean | displayAllProperties, | |
| boolean | displayAllToMany | |||
| ) |
Constructs an ERXDictionaryRestResponseWriter.
| displayAllProperties | if true, by default all properties are eligible to be displayed (probably should only be true in development, but it won't really hurt anything). Note that entity delegates will still control permissions on the properties, it just defaults to checking all of them. | |
| displayAllToMany | if true, all to-many relationships will be displayed |
| ERXDictionaryRestResponseWriter | ( | ERXKeyFilter | filter | ) |
Constructs an ERXDictionaryRestResponseWriter.
| filter | the filter to apply to the written results |
| void addToCollection | ( | String | name, | |
| Object | value | |||
| ) | [protected] |
| void appendArrayToResponse | ( | ERXRestContext | context, | |
| IERXRestResponse | response, | |||
| ERXRestKey | key, | |||
| String | arrayName, | |||
| String | entityName, | |||
| NSArray | valueKeys, | |||
| int | indent, | |||
| NSMutableSet< Object > | visitedObjects | |||
| ) | throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException, ParseException [protected, virtual] |
Writes the given array of objects to the response. Permissions have already been checked by the time this method is called.
| context | the rest context | |
| response | the response | |
| key | the current key | |
| arrayName | the name of the array in the context of its parent | |
| entityName | the entity name of the contents of the array | |
| valueKeys | an array of ERXRestKeys that represent the entries in the array | |
| indent | the indent level | |
| visitedObjects | the list of objects that have been visited already in this request (to prevent infinite loops) |
| ERXRestException | if a general error occurs | |
| ERXRestSecurityException | if a security error occurs | |
| ERXRestNotFoundException | if an object is not found | |
| ParseException | if a parse error occurs |
Implements ERXAbstractRestResponseWriter.
| void appendDetailsToResponse | ( | ERXRestContext | context, | |
| IERXRestResponse | response, | |||
| EOEntity | entity, | |||
| EOEnterpriseObject | eo, | |||
| String | objectName, | |||
| String | entityName, | |||
| Object | id, | |||
| NSArray | displayKeys, | |||
| int | indent, | |||
| NSMutableSet< Object > | visitedObjects | |||
| ) | throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException, ParseException [protected, virtual] |
Writes the visible details of an object to the response. Permissions have already been checked by the time this method is called.
| context | the rest context | |
| response | the response | |
| entity | the entity of the object | |
| eo | the current object | |
| objectName | the name of the object (relative to its parent) | |
| entityName | the entity name of the object | |
| id | the id of the object | |
| displayKeys | the list of ERXRestKeys to display | |
| indent | the indent level | |
| visitedObjects | the list of objects that have been visited already in this request (to prevent infinite loops) |
| ERXRestException | if a general error occurs | |
| ERXRestSecurityException | if a security error occurs | |
| ERXRestNotFoundException | if an object is not found | |
| ParseException | if a parse error occurs |
Implements ERXAbstractRestResponseWriter.
| void appendNoDetailsToResponse | ( | ERXRestContext | context, | |
| IERXRestResponse | response, | |||
| EOEntity | entity, | |||
| EOEnterpriseObject | eo, | |||
| String | objectName, | |||
| String | entityName, | |||
| Object | id, | |||
| int | indent | |||
| ) | [protected, virtual] |
Write an object to the response without showing its details. This is typically similar to appendVisitedToResponse, but is provided as a separate call because it is semantically a different scenario. Permissions have already been checked by the time this method is called.
| context | the rest context | |
| response | the response | |
| entity | the entity of the object | |
| eo | the current object | |
| objectName | the name of the object (relative to its parent) | |
| entityName | the entity name of the object | |
| id | the id of the object | |
| indent | the indent level |
Implements ERXAbstractRestResponseWriter.
| void appendPrimitiveToResponse | ( | ERXRestContext | context, | |
| IERXRestResponse | response, | |||
| ERXRestKey | result, | |||
| int | indent, | |||
| Object | value | |||
| ) | throws ERXRestException [protected, virtual] |
Writes the bare primitive out to the response. Permissions have already been checked by the time this method is called.
| context | the rest context | |
| response | the response | |
| result | the current key | |
| indent | the indent level | |
| value | the value to append |
| ERXRestException | if a general failure occurs |
Implements ERXAbstractRestResponseWriter.
| void appendVisitedToResponse | ( | ERXRestContext | context, | |
| IERXRestResponse | response, | |||
| EOEntity | entity, | |||
| EOEnterpriseObject | eo, | |||
| String | objectName, | |||
| String | entityName, | |||
| Object | id, | |||
| int | indent | |||
| ) | [protected, virtual] |
Write an object to the response that has already been visited. Typically this would just write out the type and id of the object, to prevent entering an infinite loop in the renderer. Permissions have already been checked by the time this method is called.
| context | the rest context | |
| response | the response | |
| entity | the entity of the object | |
| eo | the current object | |
| objectName | the name of the object (relative to its parent) | |
| entityName | the entity name of the object | |
| id | the id of the object | |
| indent | the indent level |
Implements ERXAbstractRestResponseWriter.
| Object current | ( | ) |
| Object root | ( | ) |
Stack<Object> _stack [private] |
1.5.8