|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.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()
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 |
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()
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 ServiceException
GenericService
doStartService
in class GenericService
ServiceException
- if the Service had a problem starting upprotected void preCreateTransaction(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws RestException
pRequest
- the servlet requestpResponse
- the servlet response
RestException
- if an error occurs in the methodprotected 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 responseprotected void postCommitTransaction(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
pRequest
- the servlet requestpResponse
- the servlet responsepublic void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
service
in class 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(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 |