|
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.ERXAbstractRestResponseWriter
er.rest.entityDelegates.ERXDictionaryRestResponseWriter
public class ERXDictionaryRestResponseWriter
Provides the common output methods for generating a dictionary response, which can be used by several other writers (json, plist, etc).
Field Summary |
---|
Fields inherited from interface er.rest.entityDelegates.IERXRestResponseWriter |
---|
DETAILS_PREFIX, DETAILS_PROPERTIES_PREFIX, REST_PREFIX |
Constructor Summary | |
---|---|
ERXDictionaryRestResponseWriter()
Constructs an ERXDictionaryRestResponseWriter with displayAllProperties = false. |
|
ERXDictionaryRestResponseWriter(boolean displayAllProperties,
boolean displayAllToMany)
Constructs an ERXDictionaryRestResponseWriter. |
|
ERXDictionaryRestResponseWriter(ERXKeyFilter filter)
Constructs an ERXDictionaryRestResponseWriter. |
Method Summary | |
---|---|
protected void |
addToCollection(java.lang.String name,
java.lang.Object value)
|
protected void |
appendArrayToResponse(ERXRestContext context,
IERXRestResponse response,
ERXRestKey result,
java.lang.String arrayName,
java.lang.String entityName,
com.webobjects.foundation.NSArray valueKeys,
int indent,
com.webobjects.foundation.NSMutableSet<java.lang.Object> visitedObjects)
Writes the given array of objects to the response. |
protected void |
appendDetailsToResponse(ERXRestContext context,
IERXRestResponse response,
com.webobjects.eoaccess.EOEntity entity,
com.webobjects.eocontrol.EOEnterpriseObject eo,
java.lang.String objectName,
java.lang.String entityName,
java.lang.Object id,
com.webobjects.foundation.NSArray displayKeys,
int indent,
com.webobjects.foundation.NSMutableSet<java.lang.Object> visitedObjects)
Writes the visible details of an object to the response. |
protected void |
appendNoDetailsToResponse(ERXRestContext context,
IERXRestResponse response,
com.webobjects.eoaccess.EOEntity entity,
com.webobjects.eocontrol.EOEnterpriseObject eo,
java.lang.String objectName,
java.lang.String entityName,
java.lang.Object id,
int indent)
Write an object to the response without showing its details. |
protected void |
appendPrimitiveToResponse(ERXRestContext context,
IERXRestResponse response,
ERXRestKey result,
int indent,
java.lang.Object value)
Writes the bare primitive out to the response. |
protected void |
appendVisitedToResponse(ERXRestContext context,
IERXRestResponse response,
com.webobjects.eoaccess.EOEntity entity,
com.webobjects.eocontrol.EOEnterpriseObject eo,
java.lang.String objectName,
java.lang.String entityName,
java.lang.Object id,
int indent)
Write an object to the response that has already been visited. |
java.lang.Object |
current()
|
java.lang.Object |
root()
|
Methods inherited from class er.rest.entityDelegates.ERXAbstractRestResponseWriter |
---|
appendArrayToResponse, appendDictionaryToResponse, appendToResponse, appendToResponse, displayDetails, displayProperties, indent, toString, toString, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ERXDictionaryRestResponseWriter()
public ERXDictionaryRestResponseWriter(boolean displayAllProperties, boolean displayAllToMany)
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 displayedpublic ERXDictionaryRestResponseWriter(ERXKeyFilter filter)
filter
- the filter to apply to the written resultsMethod Detail |
---|
public java.lang.Object root()
public java.lang.Object current()
protected void addToCollection(java.lang.String name, java.lang.Object value)
protected void appendArrayToResponse(ERXRestContext context, IERXRestResponse response, ERXRestKey result, java.lang.String arrayName, java.lang.String entityName, com.webobjects.foundation.NSArray valueKeys, int indent, com.webobjects.foundation.NSMutableSet<java.lang.Object> visitedObjects) throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException, java.text.ParseException
ERXAbstractRestResponseWriter
appendArrayToResponse
in class ERXAbstractRestResponseWriter
context
- the rest contextresponse
- the responseresult
- the current keyarrayName
- the name of the array in the context of its parententityName
- the entity name of the contents of the arrayvalueKeys
- an array of ERXRestKeys that represent the entries in the arrayindent
- the indent levelvisitedObjects
- 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 occursprotected void appendVisitedToResponse(ERXRestContext context, IERXRestResponse response, com.webobjects.eoaccess.EOEntity entity, com.webobjects.eocontrol.EOEnterpriseObject eo, java.lang.String objectName, java.lang.String entityName, java.lang.Object id, int indent)
ERXAbstractRestResponseWriter
appendVisitedToResponse
in class ERXAbstractRestResponseWriter
context
- the rest contextresponse
- the responseentity
- the entity of the objecteo
- the current objectobjectName
- the name of the object (relative to its parent)entityName
- the entity name of the objectid
- the id of the objectindent
- the indent levelprotected void appendNoDetailsToResponse(ERXRestContext context, IERXRestResponse response, com.webobjects.eoaccess.EOEntity entity, com.webobjects.eocontrol.EOEnterpriseObject eo, java.lang.String objectName, java.lang.String entityName, java.lang.Object id, int indent)
ERXAbstractRestResponseWriter
appendNoDetailsToResponse
in class ERXAbstractRestResponseWriter
context
- the rest contextresponse
- the responseentity
- the entity of the objecteo
- the current objectobjectName
- the name of the object (relative to its parent)entityName
- the entity name of the objectid
- the id of the objectindent
- the indent levelprotected void appendDetailsToResponse(ERXRestContext context, IERXRestResponse response, com.webobjects.eoaccess.EOEntity entity, com.webobjects.eocontrol.EOEnterpriseObject eo, java.lang.String objectName, java.lang.String entityName, java.lang.Object id, com.webobjects.foundation.NSArray displayKeys, int indent, com.webobjects.foundation.NSMutableSet<java.lang.Object> visitedObjects) throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException, java.text.ParseException
ERXAbstractRestResponseWriter
appendDetailsToResponse
in class ERXAbstractRestResponseWriter
context
- the rest contextresponse
- the responseentity
- the entity of the objecteo
- the current objectobjectName
- the name of the object (relative to its parent)entityName
- the entity name of the objectid
- the id of the objectdisplayKeys
- the list of ERXRestKeys to displayindent
- the indent levelvisitedObjects
- 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 occursprotected void appendPrimitiveToResponse(ERXRestContext context, IERXRestResponse response, ERXRestKey result, int indent, java.lang.Object value) throws ERXRestException
ERXAbstractRestResponseWriter
appendPrimitiveToResponse
in class ERXAbstractRestResponseWriter
context
- the rest contextresponse
- the responseresult
- the current keyindent
- the indent levelvalue
- the value to append
ERXRestException
- if a general failure occurs
|
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 |