| 
 | |||||||||
| 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_VERSIONClass 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()This is called after a Service has been created, placed into the naming hierarchy, and initialized with its configured property values. | 
|  java.lang.String | getMethod(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 | isMatch(DynamoHttpServletRequest pRequest)Does the URI start with the required prefix defined by getRequiredServletPrefix() | 
| protected  boolean | isTransactionMarkedAsRollback()Returns true if the transaction associated with the current thread is marked for rollback, false otherwise | 
| protected  void | postCommitTransaction(DynamoHttpServletRequest pRequest,
                      DynamoHttpServletResponse pResponse)This method is called after the transaction is committed. | 
| protected  void | postCreateTransaction(DynamoHttpServletRequest pRequest,
                      DynamoHttpServletResponse pResponse)This method is called after the transaction is created. | 
| protected  void | preCommitTransaction(DynamoHttpServletRequest pRequest,
                     DynamoHttpServletResponse pResponse)This method is called before the transaction is committed. | 
| protected  void | preCreateTransaction(DynamoHttpServletRequest pRequest,
                     DynamoHttpServletResponse pResponse)This method is called before the transaction is created. | 
|  void | service(DynamoHttpServletRequest pRequest,
        DynamoHttpServletResponse pResponse)Override the service() method and call serviceRESTRequest(). | 
|  void | serviceRESTRequest(DynamoHttpServletRequest pRequest,
                   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, isUsePathInfo, passRequest, passRequest, service, service, setNextServlet, setServletInfo, setUsePathInfo | 
| Methods inherited from class atg.nucleus.TimedOperationService | 
|---|
| getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics | 
| Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl | 
|---|
| vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, 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()
RestProcessorpublic 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 setRestProcessorpublic 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 ServiceException
GenericService
doStartService in class GenericServiceServiceException - if the Service had a problem starting up
protected void preCreateTransaction(DynamoHttpServletRequest pRequest,
                                    DynamoHttpServletResponse pResponse)
                             throws RestException
pRequest - the servlet requestpResponse - the servlet response
RestException - if an error occurs in the method
protected void postCreateTransaction(DynamoHttpServletRequest pRequest,
                                     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(DynamoHttpServletRequest pRequest,
                                    DynamoHttpServletResponse pResponse)
pRequest - the servlet requestpResponse - the servlet response
protected void postCommitTransaction(DynamoHttpServletRequest pRequest,
                                     DynamoHttpServletResponse pResponse)
pRequest - the servlet requestpResponse - the servlet response
public void service(DynamoHttpServletRequest pRequest,
                    DynamoHttpServletResponse pResponse)
             throws java.io.IOException,
                    javax.servlet.ServletException
service in class PipelineableServletImplpRequest - 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()
protected boolean isMatch(DynamoHttpServletRequest pRequest)
getRequiredServletPrefix()
pRequest - the servlet request
public void serviceRESTRequest(DynamoHttpServletRequest pRequest,
                               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(DynamoHttpServletRequest pRequest)
pRequest - the servlet request
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||