|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet atg.nucleus.ServiceAdminServlet
public class ServiceAdminServlet
A ServiceAdminServlet is the base class for services that wish to provide an HTTP interface. Such a service should implement AdminableService, and are expected to provide a Servlet that will implement that interface. For convenience, that Servlet may extend ServiceAdminServlet.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
protected Nucleus |
mNucleus
The Nucleus controlling the system |
protected java.lang.Object |
mResolvedService
The service as returned from Nucleus' resolveName method |
protected java.lang.Object |
mService
The Service for whom this interface is operating |
Constructor Summary | |
---|---|
ServiceAdminServlet(java.lang.Object pService,
Nucleus pNucleus)
Constructs a new ServiceAdminServlet |
Method Summary | |
---|---|
protected java.lang.String |
formatLongObject(java.lang.Object pObject,
javax.servlet.http.HttpServletRequest pRequest)
Formats the specified object, turning it into the "long form" String representation of its value. |
java.lang.String |
formatLongPropertyValue(java.lang.Object pValue,
javax.servlet.http.HttpServletRequest pRequest,
PropertyValueFormatter pFormatter)
Formats the specified value into a String, using the "long form" of the value. |
protected java.lang.String |
formatObject(java.lang.Object pObject,
javax.servlet.http.HttpServletRequest pRequest)
Formats the specified object, turning it into a String representation of its value. |
java.lang.String |
formatPropertyValue(java.lang.Object pValue,
javax.servlet.http.HttpServletRequest pRequest,
PropertyValueFormatter pFormatter)
Formats the specified value into a String, using the "short form" of the value. |
protected java.lang.String |
formatServiceLink(java.lang.String pServiceName,
javax.servlet.http.HttpServletRequest pRequest)
Returns the opening "href" tag that will lead back to the specified absolute service name |
protected java.lang.String |
formatServiceName(java.lang.String pServiceName,
javax.servlet.http.HttpServletRequest pRequest)
Returns the specified service name in a manner that is usable as a link, by adding the servlet path and appending a "/" if necessary. |
protected java.lang.String |
formatServiceName(java.lang.String pServiceName,
java.lang.String pSuffix,
javax.servlet.http.HttpServletRequest pRequest)
Returns the specified service name in a manner that is usable as a link, by adding the servlet path and appending a "/" if necessary. |
protected java.lang.String |
getPropertyConfigurationErrorString(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse,
java.lang.String pPropertyName,
java.lang.String pNewValue,
atg.nucleus.logging.CollectingLoggingSupport pLoggerCollecting)
Return a string to represent property configuration errors. |
java.beans.PropertyDescriptor |
getPropertyDescriptor(java.lang.Class pClass,
java.lang.String pPropertyName)
Returns the property descriptor for the given property of the given class, or null if none is found. |
protected java.util.ResourceBundle |
getResourceBundle()
The ResourceBundle to use with this AdminServlet. |
protected java.lang.String |
getResourceString(java.lang.String pPattern)
Loads the resource bundle, if not already loaded, and returns the requested resource string. |
protected java.lang.String |
getResourceString(java.lang.String pPattern,
java.lang.Object[] pPatternArgs)
Loads the resource bundle, if not already loaded, and returns the requested resource string with any args inserted. |
protected void |
handleInvocationException(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse,
java.lang.String pMethodName,
java.lang.Throwable pException)
Handle an invocation exception. |
protected void |
insertStyle(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse,
javax.servlet.ServletOutputStream pOut)
Insert any style/css tags... |
protected void |
printAdmin(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse,
javax.servlet.ServletOutputStream pOut)
Prints the administrative information specific to this service. |
protected void |
printBodyTag(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse,
javax.servlet.ServletOutputStream pOut)
Prints the opening body tag. |
protected void |
printDirectory(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse,
javax.servlet.ServletOutputStream pOut)
Prints a directory listing of the elements in the context, if the service is a NameContext. |
void |
printEventSet(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse,
java.lang.String pEventSetName)
Prints an event set |
protected void |
printEventSets(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse,
javax.servlet.ServletOutputStream pOut)
Prints a listing of all the service's event sets |
protected void |
printHeaderTitle(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse,
javax.servlet.ServletOutputStream pOut)
Prints the title of the page's header. |
void |
printMethodInvocation(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse,
java.lang.String pMethodName)
Prints the formatted information of a method invocation on a service |
protected void |
printMethodInvocationResult(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse,
java.lang.String pMethodName,
java.lang.Object pResult)
Print out the invocation method result. |
void |
printMethodInvocationVerification(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse,
java.lang.String pMethodName)
Prints the formatted information for a verification screen before invoking a method |
protected void |
printMethods(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse,
javax.servlet.ServletOutputStream pOut)
Prints a listing of all the service's properties and values. |
void |
printProperty(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse,
java.lang.String pPropertyName)
Prints the formatted information for a service, including the name, directory listing, and properties. |
protected void |
printPropertyValues(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse,
javax.servlet.ServletOutputStream pOut)
Prints a listing of all the service's properties and values. |
protected void |
printPropertyValues(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse,
javax.servlet.ServletOutputStream pOut,
java.lang.String pPropertyPrefix,
java.lang.Object pObject,
java.beans.PropertyDescriptor[] pPropDescs)
Prints a listing of all the service's properties and values. |
void |
printService(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse)
Prints the formatted information for a service, including the name, directory listing, and properties. |
protected void |
printServiceInfo(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse,
javax.servlet.ServletOutputStream pOut)
Prints the serviceInfo property of the service. |
protected void |
printStringValue(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse,
javax.servlet.ServletOutputStream pOut)
Prints the string value (toString) of the service. |
protected void |
printTitle(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse,
javax.servlet.ServletOutputStream pOut)
Prints the title of the page. |
void |
service(javax.servlet.http.HttpServletRequest pRequest,
javax.servlet.http.HttpServletResponse pResponse)
Handles requests |
void |
setResolvedService(java.lang.Object pService)
Sets the service component as resolved by Nucleus. |
protected java.beans.EventSetDescriptor[] |
sortEventSetDescriptors(java.beans.EventSetDescriptor[] pDescriptors)
Sorts the list of eventSet descriptors by eventSet name and returns a new list of the sorted descriptors. |
protected java.beans.MethodDescriptor[] |
sortMethodDescriptors(java.beans.MethodDescriptor[] pDescriptors)
Sorts the list of method descriptors by method name and returns a new list of the sorted descriptors. |
protected java.beans.PropertyDescriptor[] |
sortPropertyDescriptors(java.beans.PropertyDescriptor[] pDescriptors)
Sorts the list of property descriptors by property name and returns a new list of the sorted descriptors. |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
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
protected transient java.lang.Object mService
protected transient Nucleus mNucleus
protected transient java.lang.Object mResolvedService
Constructor Detail |
---|
public ServiceAdminServlet(java.lang.Object pService, Nucleus pNucleus)
pService
- the service object to be manipulated by this servletpNucleus
- the Nucleus controlling the service hierarchyMethod Detail |
---|
public void service(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
service
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
- if an error occurred while processing
the servlet request
java.io.IOException
- if an error occurred while reading or writing
the servlet requestpublic void printService(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
- if an error occurred while processing
the servlet request
java.io.IOException
- if an error occurred while reading or writing
the servlet requestprotected void insertStyle(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse, javax.servlet.ServletOutputStream pOut) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
protected void printHeaderTitle(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse, javax.servlet.ServletOutputStream pOut) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
- if an error occurred
java.io.IOException
- if an error occurredprotected void printTitle(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse, javax.servlet.ServletOutputStream pOut) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
- if an error occurred
java.io.IOException
- if an error occurredprotected void printServiceInfo(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse, javax.servlet.ServletOutputStream pOut) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
protected void printStringValue(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse, javax.servlet.ServletOutputStream pOut) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
protected void printBodyTag(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse, javax.servlet.ServletOutputStream pOut) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
- if an error occurred
java.io.IOException
- if an error occurredprotected void printDirectory(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse, javax.servlet.ServletOutputStream pOut) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
protected java.beans.PropertyDescriptor[] sortPropertyDescriptors(java.beans.PropertyDescriptor[] pDescriptors)
protected java.beans.MethodDescriptor[] sortMethodDescriptors(java.beans.MethodDescriptor[] pDescriptors)
protected void printMethods(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse, javax.servlet.ServletOutputStream pOut) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
protected void printPropertyValues(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse, javax.servlet.ServletOutputStream pOut) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
protected void printPropertyValues(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse, javax.servlet.ServletOutputStream pOut, java.lang.String pPropertyPrefix, java.lang.Object pObject, java.beans.PropertyDescriptor[] pPropDescs) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
public java.beans.PropertyDescriptor getPropertyDescriptor(java.lang.Class pClass, java.lang.String pPropertyName) throws java.beans.IntrospectionException
java.beans.IntrospectionException
public void printMethodInvocationVerification(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse, java.lang.String pMethodName) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
- if an error occurred while processing
the servlet request
java.io.IOException
- if an error occurred while reading or writing
the servlet requestpublic void printMethodInvocation(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse, java.lang.String pMethodName) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
- if an error occurred while processing
the servlet request
java.io.IOException
- if an error occurred while reading or writing
the servlet requestprotected void printMethodInvocationResult(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse, java.lang.String pMethodName, java.lang.Object pResult) throws java.io.IOException
java.io.IOException
protected void handleInvocationException(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse, java.lang.String pMethodName, java.lang.Throwable pException) throws java.io.IOException
java.io.IOException
public void printProperty(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse, java.lang.String pPropertyName) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
- if an error occurred while processing
the servlet request
java.io.IOException
- if an error occurred while reading or writing
the servlet requestprotected java.lang.String getPropertyConfigurationErrorString(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse, java.lang.String pPropertyName, java.lang.String pNewValue, atg.nucleus.logging.CollectingLoggingSupport pLoggerCollecting)
protected java.beans.EventSetDescriptor[] sortEventSetDescriptors(java.beans.EventSetDescriptor[] pDescriptors)
protected void printEventSets(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse, javax.servlet.ServletOutputStream pOut) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
public void printEventSet(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse, java.lang.String pEventSetName) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
- if an error occurred while processing
the servlet request
java.io.IOException
- if an error occurred while reading or writing
the servlet requestprotected void printAdmin(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse, javax.servlet.ServletOutputStream pOut) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
- if an error occurred
java.io.IOException
- if an error occurredprotected java.lang.String formatObject(java.lang.Object pObject, javax.servlet.http.HttpServletRequest pRequest)
protected java.lang.String formatLongObject(java.lang.Object pObject, javax.servlet.http.HttpServletRequest pRequest)
protected java.lang.String formatServiceName(java.lang.String pServiceName, javax.servlet.http.HttpServletRequest pRequest)
protected java.lang.String formatServiceName(java.lang.String pServiceName, java.lang.String pSuffix, javax.servlet.http.HttpServletRequest pRequest)
protected java.lang.String formatServiceLink(java.lang.String pServiceName, javax.servlet.http.HttpServletRequest pRequest)
public java.lang.String formatPropertyValue(java.lang.Object pValue, javax.servlet.http.HttpServletRequest pRequest, PropertyValueFormatter pFormatter)
formatPropertyValue
in interface PropertyValueFormatter
public java.lang.String formatLongPropertyValue(java.lang.Object pValue, javax.servlet.http.HttpServletRequest pRequest, PropertyValueFormatter pFormatter)
formatLongPropertyValue
in interface PropertyValueFormatter
protected java.lang.String getResourceString(java.lang.String pPattern)
protected java.lang.String getResourceString(java.lang.String pPattern, java.lang.Object[] pPatternArgs)
protected java.util.ResourceBundle getResourceBundle()
public void setResolvedService(java.lang.Object pService)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |