ERXJSONRestResponseWriter Class Reference

Inherits er::rest::entityDelegates::IERXRestResponseWriter.

Collaboration diagram for ERXJSONRestResponseWriter:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void appendToResponse (ERXRestContext context, IERXRestResponse response, ERXRestKey result) throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException, ParseException
 ERXJSONRestResponseWriter (ERXKeyFilter filter)
 ERXJSONRestResponseWriter (boolean displayAllProperties, boolean displayAllToMany)
 ERXJSONRestResponseWriter ()
String toString (EOEditingContext editingContext, String entityName, NSArray values) throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException, ParseException
String toString (EOEntity entity, NSArray values) throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException, ParseException
String toString (Object value) throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException, ParseException

Private Attributes

boolean _displayAllProperties
boolean _displayAllToMany
ERXKeyFilter _filter


Detailed Description

Provides the output methods for generating JSON responses to a REST request.

Author:
mschrag

Constructor & Destructor Documentation

ERXJSONRestResponseWriter ( boolean  displayAllProperties,
boolean  displayAllToMany 
)

Constructs an ERXJSONRestResponseWriter.

Parameters:
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

Constructs an ERXJSONRestResponseWriter.

Parameters:
filter the filter to apply to the written results


Member Function Documentation

void appendToResponse ( ERXRestContext  context,
IERXRestResponse  response,
ERXRestKey  result 
) throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException, ParseException

Called at the end of a request to produce the output to the user.

Parameters:
context the rest context
response the response to write into
result the result of the rest request
Exceptions:
ERXRestException if there is a general failure
ERXRestSecurityException if there is a security violation
ERXRestNotFoundException if there is a missing entity
ParseException if there is a parse error

Implements IERXRestResponseWriter.

String toString ( EOEditingContext  editingContext,
String  entityName,
NSArray  values 
) throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException, ParseException

Returns a String form of the given objects using the unsafe delegate.

Parameters:
values the values to write
Returns:
a string form of the value using the given writer
Exceptions:
ERXRestException 
ERXRestSecurityException 
ERXRestNotFoundException 
ParseException 

Implements IERXRestResponseWriter.

String toString ( EOEntity  entity,
NSArray  values 
) throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException, ParseException

Returns a String form of the given objects using the unsafe delegate.

Parameters:
values the values to write
Returns:
a string form of the value using the given writer
Exceptions:
ERXRestException 
ERXRestSecurityException 
ERXRestNotFoundException 
ParseException 

Implements IERXRestResponseWriter.

String toString ( Object  value  )  throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException, ParseException

Returns a String form of the given object using the unsafe delegate.

Parameters:
value the value to write
Returns:
a string form of the value using the given writer
Exceptions:
ERXRestException 
ERXRestSecurityException 
ERXRestNotFoundException 
ParseException 

Implements IERXRestResponseWriter.


Member Data Documentation

boolean _displayAllProperties [private]

boolean _displayAllToMany [private]

ERXKeyFilter _filter [private]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:28 2012 for Project Wonder by  doxygen 1.5.8