http://git-wip-us.apache.org/repos/asf/sling-site/blob/c1fb7b2c/apidocs/sling5/org/apache/sling/api/servlets/SlingAllMethodsServlet.html ---------------------------------------------------------------------- diff --git a/apidocs/sling5/org/apache/sling/api/servlets/SlingAllMethodsServlet.html b/apidocs/sling5/org/apache/sling/api/servlets/SlingAllMethodsServlet.html new file mode 100644 index 0000000..f558feb --- /dev/null +++ b/apidocs/sling5/org/apache/sling/api/servlets/SlingAllMethodsServlet.html @@ -0,0 +1,505 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!--NewPage--> +<HTML> +<HEAD> +<!-- Generated by javadoc (build 1.6.0_10) on Mon May 11 08:55:05 CEST 2009 --> +<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<TITLE> +SlingAllMethodsServlet (Apache Sling Aggregate 5-incubator API) +</TITLE> + +<META NAME="date" CONTENT="2009-05-11"> + +<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> + +<SCRIPT type="text/javascript"> +function windowTitle() +{ + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="SlingAllMethodsServlet (Apache Sling Aggregate 5-incubator API)"; + } +} +</SCRIPT> +<NOSCRIPT> +</NOSCRIPT> + +</HEAD> + +<BODY BGCOLOR="white" onload="windowTitle();"> +<HR> + + +<!-- ========= START OF TOP NAVBAR ======= --> +<A NAME="navbar_top"><!-- --></A> +<A HREF="#skip-navbar_top" title="Skip navigation links"></A> +<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> +<TR> +<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> +<A NAME="navbar_top_firstrow"><!-- --></A> +<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> + <TR ALIGN="center" VALIGN="top"> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> + <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SlingAllMethodsServlet.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> + </TR> +</TABLE> +</TD> +<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> +</EM> +</TD> +</TR> + +<TR> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../../../org/apache/sling/api/servlets/ServletResolver.html" title="interface in org.apache.sling.api.servlets"><B>PREV CLASS</B></A> + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html" title="class in org.apache.sling.api.servlets"><B>NEXT CLASS</B></A></FONT></TD> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../../../index.html?org/apache/sling/api/servlets/SlingAllMethodsServlet.html" target="_top"><B>FRAMES</B></A> + <A HREF="SlingAllMethodsServlet.html" target="_top"><B>NO FRAMES</B></A> + <SCRIPT type="text/javascript"> + <!-- + if(window==top) { + document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); + } + //--> +</SCRIPT> +<NOSCRIPT> + <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> +</NOSCRIPT> + + +</FONT></TD> +</TR> +<TR> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> + SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> +DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> +</TR> +</TABLE> +<A NAME="skip-navbar_top"></A> +<!-- ========= END OF TOP NAVBAR ========= --> + +<HR> +<!-- ======== START OF CLASS DATA ======== --> +<H2> +<FONT SIZE="-1"> +org.apache.sling.api.servlets</FONT> +<BR> +Class SlingAllMethodsServlet</H2> +<PRE> +java.lang.Object + <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by ">javax.servlet.GenericServlet + <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html" title="class in org.apache.sling.api.servlets">org.apache.sling.api.servlets.SlingSafeMethodsServlet</A> + <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.sling.api.servlets.SlingAllMethodsServlet</B> +</PRE> +<DL> +<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig</DD> +</DL> +<DL> +<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/sling/jcr/jackrabbit/accessmanager/post/AbstractAccessPostServlet.html" title="class in org.apache.sling.jcr.jackrabbit.accessmanager.post">AbstractAccessPostServlet</A>, <A HREF="../../../../../org/apache/sling/jackrabbit/usermanager/post/AbstractAuthorizablePostServlet.html" title="class in org.apache.sling.jackrabbit.usermanager.post">AbstractAuthorizablePostServlet</A>, <A HREF="../../../../../org/apache/sling/launchpad/testservices/servlets/ExtensionServlet.html" title="class in org.apache.sling.launchpad.testservices.servlets">ExtensionServlet</A>, <A HREF="../../../../../org/apache/sling/jcr/jackrabbit/accessmanager/post/GetAclServlet.html" title="class in org.apache.sling.jcr.jackrabbit.accessmanager.post">GetAclServlet</A>, <A HREF="../../../../../org/apache/sling/launchpad/testservices/servlets/PrefixServletMinusOne.html" title="class in org.apache.sling.launchpad.testservices.servlets">PrefixServle tMinusOne</A>, <A HREF="../../../../../org/apache/sling/launchpad/testservices/servlets/PrefixServletZero.html" title="class in org.apache.sling.launchpad.testservices.servlets">PrefixServletZero</A>, <A HREF="../../../../../org/apache/sling/launchpad/testservices/servlets/PutMethodServlet.html" title="class in org.apache.sling.launchpad.testservices.servlets">PutMethodServlet</A>, <A HREF="../../../../../org/apache/sling/launchpad/testservices/servlets/SelectorServlet.html" title="class in org.apache.sling.launchpad.testservices.servlets">SelectorServlet</A></DD> +</DL> +<HR> +<DL> +<DT><PRE>public class <B>SlingAllMethodsServlet</B><DT>extends <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html" title="class in org.apache.sling.api.servlets">SlingSafeMethodsServlet</A></DL> +</PRE> + +<P> +Helper base class for data modifying Servlets used in Sling. This class + extends the <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html" title="class in org.apache.sling.api.servlets"><CODE>SlingSafeMethodsServlet</CODE></A> by support for the <em>POST</em>, + <em>PUT</em> and <em>DELETE</em> methods. + <p> + Implementors note: The methods in this class are all declared to throw the + exceptions according to the intentions of the Servlet API rather than + throwing their Sling RuntimeException counter parts. This is done to easy the + integration with traditional servlets. +<P> + +<P> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html" title="class in org.apache.sling.api.servlets"><CODE>for more information on supporting more HTTP + methods</CODE></A>, +<A HREF="../../../../../serialized-form.html#org.apache.sling.api.servlets.SlingAllMethodsServlet">Serialized Form</A></DL> +<HR> + +<P> + +<!-- ======== CONSTRUCTOR SUMMARY ======== --> + +<A NAME="constructor_summary"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> +<B>Constructor Summary</B></FONT></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/servlets/SlingAllMethodsServlet.html#SlingAllMethodsServlet()">SlingAllMethodsServlet</A></B>()</CODE> + +<BR> + </TD> +</TR> +</TABLE> + +<!-- ========== METHOD SUMMARY =========== --> + +<A NAME="method_summary"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> +<B>Method Summary</B></FONT></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>protected void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/servlets/SlingAllMethodsServlet.html#doDelete(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)">doDelete</A></B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response)</CODE> + +<BR> + Called by the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingAllMethodsServlet.html#mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>mayService(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> method to + handle an HTTP <em>DELETE</em> request.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>protected void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/servlets/SlingAllMethodsServlet.html#doPost(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)">doPost</A></B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response)</CODE> + +<BR> + Called by the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingAllMethodsServlet.html#mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>mayService(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> method to + handle an HTTP <em>POST</em> request.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>protected void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/servlets/SlingAllMethodsServlet.html#doPut(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)">doPut</A></B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response)</CODE> + +<BR> + Called by the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingAllMethodsServlet.html#mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>mayService(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> method to + handle an HTTP <em>PUT</em> request.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>protected java.lang.StringBuffer</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/servlets/SlingAllMethodsServlet.html#getAllowedRequestMethods(java.util.Map)">getAllowedRequestMethods</A></B>(java.util.Map<java.lang.String,java.lang.reflect.Method> declaredMethods)</CODE> + +<BR> + Helper method called by + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doOptions(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>SlingSafeMethodsServlet.doOptions(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> to calculate + the value of the <em>Allow</em> header sent as the response to the HTTP + <em>OPTIONS</em> request.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>protected boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/servlets/SlingAllMethodsServlet.html#isMethodValid(java.lang.reflect.Method, java.lang.String)">isMethodValid</A></B>(java.lang.reflect.Method method, + java.lang.String className)</CODE> + +<BR> + Returns <code>true</code> if <code>method</code> is not + <code>null</code> and the method is not defined in the class named by + <code>className</code>.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>protected boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/servlets/SlingAllMethodsServlet.html#mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)">mayService</A></B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response)</CODE> + +<BR> + Tries to handle the request by calling a Java method implemented for the + respective HTTP request method.</TD> +</TR> +</TABLE> + <A NAME="methods_inherited_from_class_org.apache.sling.api.servlets.SlingSafeMethodsServlet"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> +<TH ALIGN="left"><B>Methods inherited from class org.apache.sling.api.servlets.<A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html" title="class in org.apache.sling.api.servlets">SlingSafeMethodsServlet</A></B></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE><A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doGeneric(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)">doGeneric</A>, <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doGet(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)">doGet</A>, <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doHead(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)">doHead</A>, <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doOptions(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)">doOptions</A>, <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doTrace(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)">doTrace< /A>, <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#getServletInfo()">getServletInfo</A>, <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#handleMethodNotImplemented(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)">handleMethodNotImplemented</A>, <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)">service</A>, <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#service(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)">service</A></CODE></TD> +</TR> +</TABLE> + <A NAME="methods_inherited_from_class_javax.servlet.GenericServlet"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> +<TH ALIGN="left"><B>Methods inherited from class javax.servlet.GenericServlet</B></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE>destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log</CODE></TD> +</TR> +</TABLE> + <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> +<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> +</TR> +</TABLE> + +<P> + +<!-- ========= CONSTRUCTOR DETAIL ======== --> + +<A NAME="constructor_detail"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> +<B>Constructor Detail</B></FONT></TH> +</TR> +</TABLE> + +<A NAME="SlingAllMethodsServlet()"><!-- --></A><H3> +SlingAllMethodsServlet</H3> +<PRE> +public <B>SlingAllMethodsServlet</B>()</PRE> +<DL> +</DL> + +<!-- ============ METHOD DETAIL ========== --> + +<A NAME="method_detail"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> +<B>Method Detail</B></FONT></TH> +</TR> +</TABLE> + +<A NAME="doPost(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><!-- --></A><H3> +doPost</H3> +<PRE> +protected void <B>doPost</B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response) + throws javax.servlet.ServletException, + java.io.IOException</PRE> +<DL> +<DD>Called by the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingAllMethodsServlet.html#mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>mayService(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> method to + handle an HTTP <em>POST</em> request. + <p> + This default implementation reports back to the client that the method is + not supported. + <p> + Implementations of this class should overwrite this method with their + implementation for the HTTP <em>POST</em> method support. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>request</CODE> - The HTTP request<DD><CODE>response</CODE> - The HTTP response +<DT><B>Throws:</B> +<DD><CODE>javax.servlet.ServletException</CODE> - Not thrown by this implementation. +<DD><CODE>java.io.IOException</CODE> - If the error status cannot be reported back to the + client.</DL> +</DD> +</DL> +<HR> + +<A NAME="doPut(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><!-- --></A><H3> +doPut</H3> +<PRE> +protected void <B>doPut</B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response) + throws javax.servlet.ServletException, + java.io.IOException</PRE> +<DL> +<DD>Called by the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingAllMethodsServlet.html#mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>mayService(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> method to + handle an HTTP <em>PUT</em> request. + <p> + This default implementation reports back to the client that the method is + not supported. + <p> + Implementations of this class should overwrite this method with their + implementation for the HTTP <em>PUT</em> method support. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>request</CODE> - The HTTP request<DD><CODE>response</CODE> - The HTTP response +<DT><B>Throws:</B> +<DD><CODE>javax.servlet.ServletException</CODE> - Not thrown by this implementation. +<DD><CODE>java.io.IOException</CODE> - If the error status cannot be reported back to the + client.</DL> +</DD> +</DL> +<HR> + +<A NAME="doDelete(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><!-- --></A><H3> +doDelete</H3> +<PRE> +protected void <B>doDelete</B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response) + throws javax.servlet.ServletException, + java.io.IOException</PRE> +<DL> +<DD>Called by the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingAllMethodsServlet.html#mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>mayService(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> method to + handle an HTTP <em>DELETE</em> request. + <p> + This default implementation reports back to the client that the method is + not supported. + <p> + Implementations of this class should overwrite this method with their + implementation for the HTTP <em>DELETE</em> method support. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>request</CODE> - The HTTP request<DD><CODE>response</CODE> - The HTTP response +<DT><B>Throws:</B> +<DD><CODE>javax.servlet.ServletException</CODE> - Not thrown by this implementation. +<DD><CODE>java.io.IOException</CODE> - If the error status cannot be reported back to the + client.</DL> +</DD> +</DL> +<HR> + +<A NAME="mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><!-- --></A><H3> +mayService</H3> +<PRE> +protected boolean <B>mayService</B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response) + throws javax.servlet.ServletException, + java.io.IOException</PRE> +<DL> +<DD>Tries to handle the request by calling a Java method implemented for the + respective HTTP request method. + <p> + This implementation first calls the base class implementation and only if + the base class cannot dispatch will try to dispatch the supported methods + <em>POST</em>, <em>PUT</em> and <em>DELETE</em> and returns + <code>true</code> if any of these methods is requested. Otherwise + <code>false</code> is just returned. +<P> +<DD><DL> +<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)">mayService</A></CODE> in class <CODE><A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html" title="class in org.apache.sling.api.servlets">SlingSafeMethodsServlet</A></CODE></DL> +</DD> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>request</CODE> - The HTTP request<DD><CODE>response</CODE> - The HTTP response +<DT><B>Returns:</B><DD><code>true</code> if the requested method (<code>request.getMethod()</code>) + is known. Otherwise <code>false</code> is returned. +<DT><B>Throws:</B> +<DD><CODE>javax.servlet.ServletException</CODE> - Forwarded from any of the dispatched methods +<DD><CODE>java.io.IOException</CODE> - Forwarded from any of the dispatched methods</DL> +</DD> +</DL> +<HR> + +<A NAME="getAllowedRequestMethods(java.util.Map)"><!-- --></A><H3> +getAllowedRequestMethods</H3> +<PRE> +protected java.lang.StringBuffer <B>getAllowedRequestMethods</B>(java.util.Map<java.lang.String,java.lang.reflect.Method> declaredMethods)</PRE> +<DL> +<DD>Helper method called by + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doOptions(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>SlingSafeMethodsServlet.doOptions(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> to calculate + the value of the <em>Allow</em> header sent as the response to the HTTP + <em>OPTIONS</em> request. + <p> + This implementation overwrites the base class implementation adding + support for the <em>POST</em>, <em>PUT</em> and <em>DELETE</em> + methods in addition to the methods returned by the base class + implementation. +<P> +<DD><DL> +<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#getAllowedRequestMethods(java.util.Map)">getAllowedRequestMethods</A></CODE> in class <CODE><A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html" title="class in org.apache.sling.api.servlets">SlingSafeMethodsServlet</A></CODE></DL> +</DD> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>declaredMethods</CODE> - The public and protected methods declared in the + extension of this class. +<DT><B>Returns:</B><DD>A <code>StringBuffer</code> containing the list of HTTP methods + supported.</DL> +</DD> +</DL> +<HR> + +<A NAME="isMethodValid(java.lang.reflect.Method, java.lang.String)"><!-- --></A><H3> +isMethodValid</H3> +<PRE> +protected boolean <B>isMethodValid</B>(java.lang.reflect.Method method, + java.lang.String className)</PRE> +<DL> +<DD>Returns <code>true</code> if <code>method</code> is not + <code>null</code> and the method is not defined in the class named by + <code>className</code>. + <p> + This method may be used to make sure a method is actually overwritten and + not just the default implementation. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>method</CODE> - The Method to check<DD><CODE>className</CODE> - The name of class assumed to contained the initial + declaration of the method. +<DT><B>Returns:</B><DD><code>true</code> if <code>method</code> is not + <code>null</code> and the methods declaring class is not the + given class.</DL> +</DD> +</DL> +<!-- ========= END OF CLASS DATA ========= --> +<HR> + + +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<A NAME="navbar_bottom"><!-- --></A> +<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> +<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> +<TR> +<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> +<A NAME="navbar_bottom_firstrow"><!-- --></A> +<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> + <TR ALIGN="center" VALIGN="top"> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> + <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SlingAllMethodsServlet.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> + </TR> +</TABLE> +</TD> +<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> +</EM> +</TD> +</TR> + +<TR> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../../../org/apache/sling/api/servlets/ServletResolver.html" title="interface in org.apache.sling.api.servlets"><B>PREV CLASS</B></A> + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html" title="class in org.apache.sling.api.servlets"><B>NEXT CLASS</B></A></FONT></TD> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../../../index.html?org/apache/sling/api/servlets/SlingAllMethodsServlet.html" target="_top"><B>FRAMES</B></A> + <A HREF="SlingAllMethodsServlet.html" target="_top"><B>NO FRAMES</B></A> + <SCRIPT type="text/javascript"> + <!-- + if(window==top) { + document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); + } + //--> +</SCRIPT> +<NOSCRIPT> + <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> +</NOSCRIPT> + + +</FONT></TD> +</TR> +<TR> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> + SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> +DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> +</TR> +</TABLE> +<A NAME="skip-navbar_bottom"></A> +<!-- ======== END OF BOTTOM NAVBAR ======= --> + +<HR> +Copyright © 2007-2009. All Rights Reserved. +</BODY> +</HTML>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/c1fb7b2c/apidocs/sling5/org/apache/sling/api/servlets/SlingSafeMethodsServlet.html ---------------------------------------------------------------------- diff --git a/apidocs/sling5/org/apache/sling/api/servlets/SlingSafeMethodsServlet.html b/apidocs/sling5/org/apache/sling/api/servlets/SlingSafeMethodsServlet.html new file mode 100644 index 0000000..a8e1b6b --- /dev/null +++ b/apidocs/sling5/org/apache/sling/api/servlets/SlingSafeMethodsServlet.html @@ -0,0 +1,707 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!--NewPage--> +<HTML> +<HEAD> +<!-- Generated by javadoc (build 1.6.0_10) on Mon May 11 08:55:05 CEST 2009 --> +<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<TITLE> +SlingSafeMethodsServlet (Apache Sling Aggregate 5-incubator API) +</TITLE> + +<META NAME="date" CONTENT="2009-05-11"> + +<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> + +<SCRIPT type="text/javascript"> +function windowTitle() +{ + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="SlingSafeMethodsServlet (Apache Sling Aggregate 5-incubator API)"; + } +} +</SCRIPT> +<NOSCRIPT> +</NOSCRIPT> + +</HEAD> + +<BODY BGCOLOR="white" onload="windowTitle();"> +<HR> + + +<!-- ========= START OF TOP NAVBAR ======= --> +<A NAME="navbar_top"><!-- --></A> +<A HREF="#skip-navbar_top" title="Skip navigation links"></A> +<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> +<TR> +<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> +<A NAME="navbar_top_firstrow"><!-- --></A> +<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> + <TR ALIGN="center" VALIGN="top"> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> + <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SlingSafeMethodsServlet.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> + </TR> +</TABLE> +</TD> +<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> +</EM> +</TD> +</TR> + +<TR> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../../../org/apache/sling/api/servlets/SlingAllMethodsServlet.html" title="class in org.apache.sling.api.servlets"><B>PREV CLASS</B></A> + NEXT CLASS</FONT></TD> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../../../index.html?org/apache/sling/api/servlets/SlingSafeMethodsServlet.html" target="_top"><B>FRAMES</B></A> + <A HREF="SlingSafeMethodsServlet.html" target="_top"><B>NO FRAMES</B></A> + <SCRIPT type="text/javascript"> + <!-- + if(window==top) { + document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); + } + //--> +</SCRIPT> +<NOSCRIPT> + <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> +</NOSCRIPT> + + +</FONT></TD> +</TR> +<TR> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> + SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> +DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> +</TR> +</TABLE> +<A NAME="skip-navbar_top"></A> +<!-- ========= END OF TOP NAVBAR ========= --> + +<HR> +<!-- ======== START OF CLASS DATA ======== --> +<H2> +<FONT SIZE="-1"> +org.apache.sling.api.servlets</FONT> +<BR> +Class SlingSafeMethodsServlet</H2> +<PRE> +java.lang.Object + <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by ">javax.servlet.GenericServlet + <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.sling.api.servlets.SlingSafeMethodsServlet</B> +</PRE> +<DL> +<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig</DD> +</DL> +<DL> +<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/sling/api/servlets/SlingAllMethodsServlet.html" title="class in org.apache.sling.api.servlets">SlingAllMethodsServlet</A></DD> +</DL> +<HR> +<DL> +<DT><PRE>public class <B>SlingSafeMethodsServlet</B><DT>extends javax.servlet.GenericServlet</DL> +</PRE> + +<P> +Helper base class for read-only Servlets used in Sling. This base class is + actually just a better implementation of the Servlet API <em>HttpServlet</em> + class which accounts for extensibility. So extensions of this class have + great control over what methods to overwrite. + <p> + If any of the default HTTP methods is to be implemented just overwrite the + respective doXXX method. If additional methods should be supported implement + appropriate doXXX methods and overwrite the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>mayService(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> method + to dispatch to the doXXX methods as appropriate and overwrite the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#getAllowedRequestMethods(java.util.Map)"><CODE>getAllowedRequestMethods(Map)</CODE></A> to add the new method names. + <p> + Please note, that this base class is intended for applications where data is + only read. As such, this servlet by itself does not support the <em>POST</em>, + <em>PUT</em> and <em>DELETE</em> methods. Extensions of this class should + either overwrite any of the doXXX methods of this class or add support for + other read-only methods only. Applications wishing to support data + modification should rather use or extend the <A HREF="../../../../../org/apache/sling/api/servlets/SlingAllMethodsServlet.html" title="class in org.apache.sling.api.servlets"><CODE>SlingAllMethodsServlet</CODE></A> + which also contains support for the <em>POST</em>, <em>PUT</em> and + <em>DELETE</em> methods. This latter class should also be overwritten to + add support for HTTP methods modifying data. + <p> + Implementors note: The methods in this class are all declared to throw the + exceptions according to the intentions of the Servlet API rather than + throwing their Sling RuntimeException counter parts. This is done to easy the + integration with traditional servlets. +<P> + +<P> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/sling/api/servlets/SlingAllMethodsServlet.html" title="class in org.apache.sling.api.servlets"><CODE>SlingAllMethodsServlet</CODE></A>, +<A HREF="../../../../../serialized-form.html#org.apache.sling.api.servlets.SlingSafeMethodsServlet">Serialized Form</A></DL> +<HR> + +<P> + +<!-- ======== CONSTRUCTOR SUMMARY ======== --> + +<A NAME="constructor_summary"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> +<B>Constructor Summary</B></FONT></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#SlingSafeMethodsServlet()">SlingSafeMethodsServlet</A></B>()</CODE> + +<BR> + </TD> +</TR> +</TABLE> + +<!-- ========== METHOD SUMMARY =========== --> + +<A NAME="method_summary"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> +<B>Method Summary</B></FONT></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>protected void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doGeneric(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)">doGeneric</A></B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response)</CODE> + +<BR> + Called by the <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#service(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>service(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> + method to handle a request for an HTTP method, which is not known and + handled by this class or its extension.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>protected void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doGet(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)">doGet</A></B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response)</CODE> + +<BR> + Called by the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>mayService(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> method to + handle an HTTP <em>GET</em> request.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>protected void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doHead(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)">doHead</A></B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response)</CODE> + +<BR> + Handles the <em>HEAD</em> method.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>protected void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doOptions(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)">doOptions</A></B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response)</CODE> + +<BR> + Handles the <em>OPTIONS</em> method by setting the HTTP + <code>Allow</code> header on the response depending on the methods + declared in this class.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>protected void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doTrace(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)">doTrace</A></B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response)</CODE> + +<BR> + Handles the <em>TRACE</em> method by just returning the list of all + header values in the response body.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>protected java.lang.StringBuffer</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#getAllowedRequestMethods(java.util.Map)">getAllowedRequestMethods</A></B>(java.util.Map<java.lang.String,java.lang.reflect.Method> declaredMethods)</CODE> + +<BR> + Helper method called by + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doOptions(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>doOptions(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> to calculate + the value of the <em>Allow</em> header sent as the response to the HTTP + <em>OPTIONS</em> request.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#getServletInfo()">getServletInfo</A></B>()</CODE> + +<BR> + Returns the simple class name of this servlet class.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>protected void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#handleMethodNotImplemented(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)">handleMethodNotImplemented</A></B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response)</CODE> + +<BR> + Helper method which causes an appropriate HTTP response to be sent for an + unhandled HTTP request method.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>protected boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)">mayService</A></B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response)</CODE> + +<BR> + Tries to handle the request by calling a Java method implemented for the + respective HTTP request method.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)">service</A></B>(javax.servlet.ServletRequest req, + javax.servlet.ServletResponse res)</CODE> + +<BR> + Forwards the request to the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#service(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>service(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> + method if the request is a HTTP request.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>protected void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#service(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)">service</A></B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response)</CODE> + +<BR> + Called by the <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><CODE>service(ServletRequest, ServletResponse)</CODE></A> method to + handle the HTTP request.</TD> +</TR> +</TABLE> + <A NAME="methods_inherited_from_class_javax.servlet.GenericServlet"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> +<TH ALIGN="left"><B>Methods inherited from class javax.servlet.GenericServlet</B></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE>destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log</CODE></TD> +</TR> +</TABLE> + <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> +<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> +</TR> +</TABLE> + +<P> + +<!-- ========= CONSTRUCTOR DETAIL ======== --> + +<A NAME="constructor_detail"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> +<B>Constructor Detail</B></FONT></TH> +</TR> +</TABLE> + +<A NAME="SlingSafeMethodsServlet()"><!-- --></A><H3> +SlingSafeMethodsServlet</H3> +<PRE> +public <B>SlingSafeMethodsServlet</B>()</PRE> +<DL> +</DL> + +<!-- ============ METHOD DETAIL ========== --> + +<A NAME="method_detail"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> +<B>Method Detail</B></FONT></TH> +</TR> +</TABLE> + +<A NAME="doHead(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><!-- --></A><H3> +doHead</H3> +<PRE> +protected void <B>doHead</B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response) + throws javax.servlet.ServletException, + java.io.IOException</PRE> +<DL> +<DD>Handles the <em>HEAD</em> method. + <p> + This base implementation just calls the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doGet(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>doGet(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> method dropping + the output. Implementations of this class may overwrite this method if + they have a more performing implementation. Otherwise, they may just keep + this base implementation. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>request</CODE> - The HTTP request<DD><CODE>response</CODE> - The HTTP response which only gets the headers set +<DT><B>Throws:</B> +<DD><CODE>javax.servlet.ServletException</CODE> - Forwarded from the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doGet(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>doGet(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> + method called by this implementation. +<DD><CODE>java.io.IOException</CODE> - Forwarded from the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doGet(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>doGet(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> + method called by this implementation.</DL> +</DD> +</DL> +<HR> + +<A NAME="doGet(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><!-- --></A><H3> +doGet</H3> +<PRE> +protected void <B>doGet</B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response) + throws javax.servlet.ServletException, + java.io.IOException</PRE> +<DL> +<DD>Called by the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>mayService(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> method to + handle an HTTP <em>GET</em> request. + <p> + This default implementation reports back to the client that the method is + not supported. + <p> + Implementations of this class should overwrite this method with their + implementation for the HTTP <em>GET</em> method support. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>request</CODE> - The HTTP request<DD><CODE>response</CODE> - The HTTP response +<DT><B>Throws:</B> +<DD><CODE>javax.servlet.ServletException</CODE> - Not thrown by this implementation. +<DD><CODE>java.io.IOException</CODE> - If the error status cannot be reported back to the + client.</DL> +</DD> +</DL> +<HR> + +<A NAME="doOptions(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><!-- --></A><H3> +doOptions</H3> +<PRE> +protected void <B>doOptions</B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response) + throws javax.servlet.ServletException, + java.io.IOException</PRE> +<DL> +<DD>Handles the <em>OPTIONS</em> method by setting the HTTP + <code>Allow</code> header on the response depending on the methods + declared in this class. + <p> + Extensions of this class should generally not overwrite this method but + rather the <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#getAllowedRequestMethods(java.util.Map)"><CODE>getAllowedRequestMethods(Map)</CODE></A> method. This method + gathers all declared public and protected methods for the concrete class + (upto but not including this class) and calls the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#getAllowedRequestMethods(java.util.Map)"><CODE>getAllowedRequestMethods(Map)</CODE></A> method with the methods gathered. + The returned value is then used as the value of the <code>Allow</code> + header set. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>request</CODE> - The HTTP request object. Not used.<DD><CODE>response</CODE> - The HTTP response object on which the header is set. +<DT><B>Throws:</B> +<DD><CODE>javax.servlet.ServletException</CODE> - Not thrown by this implementation. +<DD><CODE>java.io.IOException</CODE> - Not thrown by this implementation.</DL> +</DD> +</DL> +<HR> + +<A NAME="doTrace(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><!-- --></A><H3> +doTrace</H3> +<PRE> +protected void <B>doTrace</B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response) + throws javax.servlet.ServletException, + java.io.IOException</PRE> +<DL> +<DD>Handles the <em>TRACE</em> method by just returning the list of all + header values in the response body. + <p> + Extensions of this class do not generally need to overwrite this method + as it contains all there is to be done to the <em>TRACE</em> method. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>request</CODE> - The HTTP request whose headers are returned.<DD><CODE>response</CODE> - The HTTP response into which the request headers are + written. +<DT><B>Throws:</B> +<DD><CODE>javax.servlet.ServletException</CODE> - Not thrown by this implementation. +<DD><CODE>java.io.IOException</CODE> - May be thrown if there is an problem sending back the + request headers in the response stream.</DL> +</DD> +</DL> +<HR> + +<A NAME="doGeneric(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><!-- --></A><H3> +doGeneric</H3> +<PRE> +protected void <B>doGeneric</B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response) + throws javax.servlet.ServletException, + java.io.IOException</PRE> +<DL> +<DD>Called by the <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#service(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>service(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> + method to handle a request for an HTTP method, which is not known and + handled by this class or its extension. + <p> + This default implementation reports back to the client that the method is + not supported. + <p> + This method should be overwritten with great care. It is better to + overwrite the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>mayService(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> method and + add support for any extension HTTP methods through an additional doXXX + method. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>request</CODE> - The HTTP request<DD><CODE>response</CODE> - The HTTP response +<DT><B>Throws:</B> +<DD><CODE>javax.servlet.ServletException</CODE> - Not thrown by this implementation. +<DD><CODE>java.io.IOException</CODE> - If the error status cannot be reported back to the + client.</DL> +</DD> +</DL> +<HR> + +<A NAME="mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><!-- --></A><H3> +mayService</H3> +<PRE> +protected boolean <B>mayService</B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response) + throws javax.servlet.ServletException, + java.io.IOException</PRE> +<DL> +<DD>Tries to handle the request by calling a Java method implemented for the + respective HTTP request method. + <p> + This base class implentation dispatches the <em>HEAD</em>, + <em>GET</em>, <em>OPTIONS</em> and <em>TRACE</em> to the + respective <em>doXXX</em> methods and returns <code>true</code> if + any of these methods is requested. Otherwise <code>false</code> is just + returned. + <p> + Implementations of this class may overwrite this method but should first + call this base implementation and in case <code>false</code> is + returned add handling for any other method and of course return whether + the requested method was known or not. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>request</CODE> - The HTTP request<DD><CODE>response</CODE> - The HTTP response +<DT><B>Returns:</B><DD><code>true</code> if the requested method (<code>request.getMethod()</code>) + is known. Otherwise <code>false</code> is returned. +<DT><B>Throws:</B> +<DD><CODE>javax.servlet.ServletException</CODE> - Forwarded from any of the dispatched methods +<DD><CODE>java.io.IOException</CODE> - Forwarded from any of the dispatched methods</DL> +</DD> +</DL> +<HR> + +<A NAME="handleMethodNotImplemented(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><!-- --></A><H3> +handleMethodNotImplemented</H3> +<PRE> +protected void <B>handleMethodNotImplemented</B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response) + throws java.io.IOException</PRE> +<DL> +<DD>Helper method which causes an appropriate HTTP response to be sent for an + unhandled HTTP request method. In case of HTTP/1.1 a 405 status code + (Method Not Allowed) is returned, otherwise a 400 status (Bad Request) is + returned. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>request</CODE> - The HTTP request from which the method and protocol values + are extracted to build the appropriate message.<DD><CODE>response</CODE> - The HTTP response to which the error status is sent. +<DT><B>Throws:</B> +<DD><CODE>java.io.IOException</CODE> - Thrown if the status cannot be sent to the client.</DL> +</DD> +</DL> +<HR> + +<A NAME="service(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><!-- --></A><H3> +service</H3> +<PRE> +protected void <B>service</B>(<A HREF="../../../../../org/apache/sling/api/SlingHttpServletRequest.html" title="interface in org.apache.sling.api">SlingHttpServletRequest</A> request, + <A HREF="../../../../../org/apache/sling/api/SlingHttpServletResponse.html" title="interface in org.apache.sling.api">SlingHttpServletResponse</A> response) + throws javax.servlet.ServletException, + java.io.IOException</PRE> +<DL> +<DD>Called by the <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><CODE>service(ServletRequest, ServletResponse)</CODE></A> method to + handle the HTTP request. This implementation calls the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>mayService(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> method and + depedending on its return value call the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doGeneric(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>doGeneric(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> method. If + the <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>mayService(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> method + can handle the request, the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doGeneric(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>doGeneric(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> method is not + called otherwise it is called. + <p> + Implementations of this class should not generally overwrite this method. + Rather the <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>mayService(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> + method should be overwritten to add support for more HTTP methods. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>request</CODE> - The HTTP request<DD><CODE>response</CODE> - The HTTP response +<DT><B>Throws:</B> +<DD><CODE>javax.servlet.ServletException</CODE> - Forwarded from the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>mayService(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> + or + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doGeneric(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>doGeneric(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> + methods. +<DD><CODE>java.io.IOException</CODE> - Forwarded from the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>mayService(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> + or + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doGeneric(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>doGeneric(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> + methods.</DL> +</DD> +</DL> +<HR> + +<A NAME="service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><!-- --></A><H3> +service</H3> +<PRE> +public void <B>service</B>(javax.servlet.ServletRequest req, + javax.servlet.ServletResponse res) + throws javax.servlet.ServletException, + java.io.IOException</PRE> +<DL> +<DD>Forwards the request to the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#service(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>service(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> + method if the request is a HTTP request. + <p> + Implementations of this class will not generally overwrite this method. +<P> +<DD><DL> +<DT><B>Specified by:</B><DD><CODE>service</CODE> in interface <CODE>javax.servlet.Servlet</CODE><DT><B>Specified by:</B><DD><CODE>service</CODE> in class <CODE>javax.servlet.GenericServlet</CODE></DL> +</DD> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>req</CODE> - The Servlet request<DD><CODE>res</CODE> - The Servlet response +<DT><B>Throws:</B> +<DD><CODE>javax.servlet.ServletException</CODE> - If the request is not a HTTP request or + forwarded from the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#service(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>service(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> + called. +<DD><CODE>java.io.IOException</CODE> - Forwarded from the + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#service(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>service(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> + called.</DL> +</DD> +</DL> +<HR> + +<A NAME="getServletInfo()"><!-- --></A><H3> +getServletInfo</H3> +<PRE> +public java.lang.String <B>getServletInfo</B>()</PRE> +<DL> +<DD>Returns the simple class name of this servlet class. Extensions of this + class may overwrite to return more specific information. +<P> +<DD><DL> +<DT><B>Specified by:</B><DD><CODE>getServletInfo</CODE> in interface <CODE>javax.servlet.Servlet</CODE><DT><B>Overrides:</B><DD><CODE>getServletInfo</CODE> in class <CODE>javax.servlet.GenericServlet</CODE></DL> +</DD> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="getAllowedRequestMethods(java.util.Map)"><!-- --></A><H3> +getAllowedRequestMethods</H3> +<PRE> +protected java.lang.StringBuffer <B>getAllowedRequestMethods</B>(java.util.Map<java.lang.String,java.lang.reflect.Method> declaredMethods)</PRE> +<DL> +<DD>Helper method called by + <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#doOptions(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>doOptions(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> to calculate + the value of the <em>Allow</em> header sent as the response to the HTTP + <em>OPTIONS</em> request. + <p> + This base class implementation checks whether any doXXX methods exist for + <em>GET</em> and <em>HEAD</em> and returns the list of methods + supported found. The list returned always includes the HTTP + <em>OPTIONS</em> and <em>TRACE</em> methods. + <p> + Implementations of this class may overwrite this method check for more + methods supported by the extension (generally the same list as used in + the <A HREF="../../../../../org/apache/sling/api/servlets/SlingSafeMethodsServlet.html#mayService(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)"><CODE>mayService(SlingHttpServletRequest, SlingHttpServletResponse)</CODE></A> method). + This base class implementation should always be called to make sure the + default HTTP methods are included in the list. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>declaredMethods</CODE> - The public and protected methods declared in the + extension of this class. +<DT><B>Returns:</B><DD>A <code>StringBuffer</code> containing the list of HTTP methods + supported.</DL> +</DD> +</DL> +<!-- ========= END OF CLASS DATA ========= --> +<HR> + + +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<A NAME="navbar_bottom"><!-- --></A> +<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> +<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> +<TR> +<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> +<A NAME="navbar_bottom_firstrow"><!-- --></A> +<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> + <TR ALIGN="center" VALIGN="top"> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> + <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SlingSafeMethodsServlet.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> + </TR> +</TABLE> +</TD> +<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> +</EM> +</TD> +</TR> + +<TR> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../../../org/apache/sling/api/servlets/SlingAllMethodsServlet.html" title="class in org.apache.sling.api.servlets"><B>PREV CLASS</B></A> + NEXT CLASS</FONT></TD> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../../../index.html?org/apache/sling/api/servlets/SlingSafeMethodsServlet.html" target="_top"><B>FRAMES</B></A> + <A HREF="SlingSafeMethodsServlet.html" target="_top"><B>NO FRAMES</B></A> + <SCRIPT type="text/javascript"> + <!-- + if(window==top) { + document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); + } + //--> +</SCRIPT> +<NOSCRIPT> + <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> +</NOSCRIPT> + + +</FONT></TD> +</TR> +<TR> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> + SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> +DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> +</TR> +</TABLE> +<A NAME="skip-navbar_bottom"></A> +<!-- ======== END OF BOTTOM NAVBAR ======= --> + +<HR> +Copyright © 2007-2009. All Rights Reserved. +</BODY> +</HTML>