Project Wonder 5.0

er.rest.entityDelegates
Class ERXPListRestResponseWriter

java.lang.Object
  extended by er.rest.entityDelegates.ERXPListRestResponseWriter
All Implemented Interfaces:
IERXRestResponseWriter

public class ERXPListRestResponseWriter
extends java.lang.Object
implements IERXRestResponseWriter

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

Author:
mschrag

Field Summary
 
Fields inherited from interface er.rest.entityDelegates.IERXRestResponseWriter
DETAILS_PREFIX, DETAILS_PROPERTIES_PREFIX, REST_PREFIX
 
Constructor Summary
ERXPListRestResponseWriter()
           
ERXPListRestResponseWriter(boolean displayAllProperties, boolean displayAllToMany)
          Constructs an ERXPListRestResponseWriter.
ERXPListRestResponseWriter(ERXKeyFilter filter)
          Constructs an ERXPListRestResponseWriter.
 
Method Summary
 void appendToResponse(ERXRestContext context, IERXRestResponse response, ERXRestKey result)
          Called at the end of a request to produce the output to the user.
 java.lang.String toString(com.webobjects.eocontrol.EOEditingContext editingContext, java.lang.String entityName, com.webobjects.foundation.NSArray values)
          Returns a String form of the given objects using the unsafe delegate.
 java.lang.String toString(com.webobjects.eoaccess.EOEntity entity, com.webobjects.foundation.NSArray values)
          Returns a String form of the given objects using the unsafe delegate.
 java.lang.String toString(java.lang.Object value)
          Returns a String form of the given object using the unsafe delegate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ERXPListRestResponseWriter

public ERXPListRestResponseWriter()

ERXPListRestResponseWriter

public ERXPListRestResponseWriter(boolean displayAllProperties,
                                  boolean displayAllToMany)
Constructs an ERXPListRestResponseWriter.

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

ERXPListRestResponseWriter

public ERXPListRestResponseWriter(ERXKeyFilter filter)
Constructs an ERXPListRestResponseWriter.

Parameters:
filter - the filter to apply to the written results
Method Detail

appendToResponse

public void appendToResponse(ERXRestContext context,
                             IERXRestResponse response,
                             ERXRestKey result)
                      throws ERXRestException,
                             ERXRestSecurityException,
                             ERXRestNotFoundException,
                             java.text.ParseException
Description copied from interface: IERXRestResponseWriter
Called at the end of a request to produce the output to the user.

Specified by:
appendToResponse in interface IERXRestResponseWriter
Parameters:
context - the rest context
response - the response to write into
result - the result of the rest request
Throws:
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

toString

public java.lang.String toString(java.lang.Object value)
                          throws ERXRestException,
                                 ERXRestSecurityException,
                                 ERXRestNotFoundException,
                                 java.text.ParseException
Returns a String form of the given object using the unsafe delegate.

Specified by:
toString in interface IERXRestResponseWriter
Parameters:
value - the value to write
Returns:
a string form of the value using the given writer
Throws:
ERXRestException
ERXRestSecurityException
ERXRestNotFoundException
ParseException

toString

public java.lang.String toString(com.webobjects.eoaccess.EOEntity entity,
                                 com.webobjects.foundation.NSArray values)
                          throws ERXRestException,
                                 ERXRestSecurityException,
                                 ERXRestNotFoundException,
                                 java.text.ParseException
Returns a String form of the given objects using the unsafe delegate.

Specified by:
toString in interface IERXRestResponseWriter
Parameters:
values - the values to write
Returns:
a string form of the value using the given writer
Throws:
ERXRestException
ERXRestSecurityException
ERXRestNotFoundException
ParseException

toString

public java.lang.String toString(com.webobjects.eocontrol.EOEditingContext editingContext,
                                 java.lang.String entityName,
                                 com.webobjects.foundation.NSArray values)
                          throws ERXRestException,
                                 ERXRestSecurityException,
                                 ERXRestNotFoundException,
                                 java.text.ParseException
Returns a String form of the given objects using the unsafe delegate.

Specified by:
toString in interface IERXRestResponseWriter
Parameters:
values - the values to write
editingContext - the editingcontext to resolve the given entity name within
entityName - the entity name of the values of the array
Returns:
a string form of the value using the given writer
Throws:
ERXRestException
ERXRestSecurityException
ERXRestNotFoundException
ParseException

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.