superviseur.net.servlets
Class ProtectedResourceServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bysuperviseur.net.servlets.ProtectedResourceServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
CapServlet, EvenementsServlet, GardienAppletServlet, ManageBornesServlet, ParamsParkingServlet, PasswordsServlet, TestBorneServlet, UtilisateursServlet

public abstract class ProtectedResourceServlet
extends javax.servlet.http.HttpServlet

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.http.HttpServlet
 
Fields inherited from class javax.servlet.GenericServlet
 
Constructor Summary
ProtectedResourceServlet()
           
 
Method Summary
protected abstract  void doAuthorizedGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
protected abstract  void doAuthorizedPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
 void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
 void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
 void init(javax.servlet.ServletConfig config)
           
private  boolean isAuthorized(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
protected abstract  boolean isRequireddAdmin()
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtectedResourceServlet

public ProtectedResourceServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

isAuthorized

private boolean isAuthorized(javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse res)
                      throws java.io.IOException
Throws:
java.io.IOException

doGet

public void doGet(javax.servlet.http.HttpServletRequest req,
                  javax.servlet.http.HttpServletResponse res)
           throws javax.servlet.ServletException,
                  java.io.IOException
Throws:
javax.servlet.ServletException
java.io.IOException

doPost

public void doPost(javax.servlet.http.HttpServletRequest req,
                   javax.servlet.http.HttpServletResponse res)
            throws javax.servlet.ServletException,
                   java.io.IOException
Throws:
javax.servlet.ServletException
java.io.IOException

doAuthorizedGet

protected abstract void doAuthorizedGet(javax.servlet.http.HttpServletRequest req,
                                        javax.servlet.http.HttpServletResponse res)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
Throws:
javax.servlet.ServletException
java.io.IOException

doAuthorizedPost

protected abstract void doAuthorizedPost(javax.servlet.http.HttpServletRequest req,
                                         javax.servlet.http.HttpServletResponse res)
                                  throws javax.servlet.ServletException,
                                         java.io.IOException
Throws:
javax.servlet.ServletException
java.io.IOException

isRequireddAdmin

protected abstract boolean isRequireddAdmin()