public abstract class GenericRestProcessor extends GenericService implements RestProcessor
| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
CLASS_VERSION
Class version string 
 | 
SERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description | 
|---|
GenericRestProcessor()
Constructor 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected org.json.JSONObject | 
determineJSONControlParams()
This method determines JSON control params 
 | 
protected boolean | 
determineJSONUsage()
This method determines whether to use JSON input 
 | 
protected boolean | 
getBooleanControlParam(java.lang.String pName,
                      boolean pDefault)
get a specified boolean control param value 
 | 
ComponentResolver | 
getComponentResolver()  | 
FilteringManager | 
getFilteringManager()  | 
RestOutputCustomizer | 
getOutputCustomizer()
Returns the requested or configured rest output customizer. 
 | 
RestPipelineServlet | 
getParentServlet()  | 
protected java.lang.String | 
getStringControlParam(java.lang.String pName)
get a specified string control param value 
 | 
boolean | 
isAcceptJSONInput()
get AcceptJSONInput 
 | 
protected boolean | 
isResourceWritable(ParsedURI pParsedURI)
Returns true if the property is writable based on the filtering configuration. 
 | 
protected boolean | 
isResourceWritable(java.lang.String pPropertyName,
                  ParsedURI pParsedURI)
Returns true if the property is writable based on the filtering configuration. 
 | 
void | 
setAcceptJSONInput(boolean pAcceptJSONInput)
set AcceptJSONInput 
 | 
void | 
setComponentResolver(ComponentResolver pComponentResolver)  | 
void | 
setOutputCustomizer(RestOutputCustomizer pOutputCustomizer)
Set the configured rest output customizer. 
 | 
void | 
setParentServlet(RestPipelineServlet pParentServlet)
This method sets the parent rest pipeline servlet 
 | 
protected boolean | 
useSimpleResponseCodes()
Returns true if simple response codes should be used for responses. 
 | 
protected boolean | 
validateResource(DynamoHttpServletRequest pRequest,
                DynamoHttpServletResponse pResponse)
Validates that the REST request is for a valid resource type. 
 | 
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService, toStringvlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdoRESTDelete, doRESTGet, doRESTPost, doRESTPutpublic RestOutputCustomizer getOutputCustomizer() throws RestException, java.io.IOException
RestExceptionjava.io.IOExceptionpublic void setOutputCustomizer(RestOutputCustomizer pOutputCustomizer)
pOutputCustomizer - the outputCustomizer to setpublic RestPipelineServlet getParentServlet()
public void setParentServlet(RestPipelineServlet pParentServlet)
RestProcessorsetParentServlet in interface RestProcessorpParentServlet - the parentServlet to setpublic ComponentResolver getComponentResolver()
public void setComponentResolver(ComponentResolver pComponentResolver)
pComponentResolver - the componentResolver to setpublic FilteringManager getFilteringManager()
public void setAcceptJSONInput(boolean pAcceptJSONInput)
pAcceptJSONInput - the AcceptJSONInputpublic boolean isAcceptJSONInput()
protected boolean validateResource(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws RestException, java.io.IOException
parsedURI - an object containing the parsed URIpRequest - the servlet requestpResponse - the servlet responseRestException - if an error occurs processing the REST requestjava.io.IOException - if an input or output stream exception occursprotected boolean isResourceWritable(ParsedURI pParsedURI)
pParsedURI - an object containing the parsed URIprotected boolean isResourceWritable(java.lang.String pPropertyName,
                                     ParsedURI pParsedURI)
pPropertyName - the property namepParsedURI - an object containing the parsed URIprotected boolean useSimpleResponseCodes()
protected boolean getBooleanControlParam(java.lang.String pName,
                                         boolean pDefault)
pName - the name of the control parampDefault - the default value for the control paramprotected java.lang.String getStringControlParam(java.lang.String pName)
pName - the name of the control paramprotected org.json.JSONObject determineJSONControlParams()
                                                  throws RestException
java.lang.IllegalArgumentException - if an unexpected error occurs during parsing JSON input paramRestExceptionprotected boolean determineJSONUsage()