|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.nucleus.TimedOperationService
atg.servlet.pipeline.PipelineableServletImpl
atg.rest.servlet.RestPipelineServlet
public class RestPipelineServlet
Base class for a REST pipeline servlet. This servlet pipeline is intended to make ATG
resources available in a "Representational State Transfer" format. See:
http://www.ics.uci.edu/%7Efielding/pubs/dissertation/top.htm
Field Summary | |
---|---|
static java.lang.String |
BEAN_SERVLET_PATH
|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
PARSED_URI
|
static java.lang.String |
PATH_INFO
|
static java.lang.String |
REPOSITORY_SERVLET_PATH
|
static java.lang.String |
REST_CONTEXT_ROOT
|
static java.lang.String |
SERVLET_PATH
|
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
RestPipelineServlet()
Constructor |
Method Summary | |
---|---|
void |
doStartService()
|
java.lang.String |
getMethod(atg.servlet.DynamoHttpServletRequest pRequest)
This method returns the http method type for the given request. |
java.lang.String |
getRequiredServletPrefix()
Returns the required servlet prefix. |
RestProcessor |
getRestProcessor()
|
javax.transaction.TransactionManager |
getTransactionManager()
|
boolean |
isEnsureTransaction()
Returns property EnsureTransaction, if false then no transaction management is performed |
protected boolean |
isTransactionMarkedAsRollback()
Returns true if the transaction associated with the current thread is marked for rollback, false otherwise |
protected void |
postCommitTransaction(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
This method is called after the transaction is committed. |
protected void |
postCreateTransaction(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
This method is called after the transaction is created. |
protected void |
preCommitTransaction(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
This method is called before the transaction is committed. |
protected void |
preCreateTransaction(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
This method is called before the transaction is created. |
void |
service(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Override the service() method and call serviceRESTRequest(). |
void |
serviceRESTRequest(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
This is the method which determines the type of request made and hands it off to one of the handle methods in the RestProcessor. |
void |
setEnsureTransaction(boolean pEnsureTransaction)
Sets property EnsureTransaction |
void |
setRequiredServletPrefix(java.lang.String pRequiredServletPrefix)
Sets the required servletPrefix string |
void |
setRestProcessor(RestProcessor pRestProcessor)
|
void |
setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
|
Methods inherited from class atg.servlet.pipeline.PipelineableServletImpl |
---|
createAdminServlet, destroy, getAdminServlet, getNextServlet, getServletConfig, getServletInfo, init, passRequest, passRequest, service, service, setNextServlet, setServletInfo |
Methods inherited from class atg.nucleus.TimedOperationService |
---|
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics |
Methods inherited from class atg.nucleus.GenericService |
---|
addLogListener, doStopService, getAbsoluteName, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
public static final java.lang.String REPOSITORY_SERVLET_PATH
public static final java.lang.String BEAN_SERVLET_PATH
public static final java.lang.String REST_CONTEXT_ROOT
public static final java.lang.String PARSED_URI
public static final java.lang.String SERVLET_PATH
public static final java.lang.String PATH_INFO
Constructor Detail |
---|
public RestPipelineServlet()
Method Detail |
---|
public RestProcessor getRestProcessor()
RestProcessor
public void setRestProcessor(RestProcessor pRestProcessor)
pRestProcessor
- the restProcessor to set. The restProcessor is a reference to a nucleus component which implements the RestProcessor
interface for handling REST requests.pRestProcessor
- the instance of a RestProcessor to setRestProcessor
public java.lang.String getRequiredServletPrefix()
public void setRequiredServletPrefix(java.lang.String pRequiredServletPrefix)
pRequiredServletPrefix
- the requiredServletPrefix to setpublic javax.transaction.TransactionManager getTransactionManager()
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
pTransactionManager
- the transactionManager to setpublic void setEnsureTransaction(boolean pEnsureTransaction)
public boolean isEnsureTransaction()
public void doStartService() throws atg.nucleus.ServiceException
doStartService
in class atg.nucleus.GenericService
atg.nucleus.ServiceException
protected void preCreateTransaction(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws RestException
pRequest
- the servlet requestpResponse
- the servlet response
RestException
- if an error occurs in the methodprotected void postCreateTransaction(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws RestException, java.io.IOException
pRequest
- the servlet requestpResponse
- the servlet response
RestException
- if an error occurs in the method
java.io.IOException
protected void preCommitTransaction(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
pRequest
- the servlet requestpResponse
- the servlet responseprotected void postCommitTransaction(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
pRequest
- the servlet requestpResponse
- the servlet responsepublic void service(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
service
in class atg.servlet.pipeline.PipelineableServletImpl
pRequest
- the servlet requestpResponse
- the servlet response
java.io.IOException
- if an input or output stream exception occurs
javax.servlet.ServletException
- if any other error occursserviceRESTRequest(DynamoHttpServletRequest, DynamoHttpServletResponse)
protected boolean isTransactionMarkedAsRollback()
public void serviceRESTRequest(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws RestException, java.io.IOException, javax.servlet.ServletException
pRequest
- the servlet requestpResponse
- the servlet response
RestException
- if an error occurs processing the REST request
java.io.IOException
- if an input or output stream exception occurs
javax.servlet.ServletException
- if a general error occurspublic java.lang.String getMethod(atg.servlet.DynamoHttpServletRequest pRequest)
pRequest
- the servlet request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |