toolbox.web
Class HttpSessionAttributePlugin

Package class diagram package HttpSessionAttributePlugin
java.lang.Object
  extended by toolbox.web.AbstractPermissionPlugin
      extended by toolbox.web.HttpSessionAttributePlugin
All Implemented Interfaces:
PermissionPlugin

public class HttpSessionAttributePlugin
extends AbstractPermissionPlugin

Simple PermissionPlugin to check the value of a specific HttpSession attribute.

Supported configuration properties:


Field Summary
 
Fields inherited from class toolbox.web.AbstractPermissionPlugin
m_name, m_properties
 
Constructor Summary
HttpSessionAttributePlugin()
          Default constructor
 
Method Summary
 boolean allow(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
          Obtain the HttpSession and perform the required authorisation.
 
Methods inherited from class toolbox.web.AbstractPermissionPlugin
destroy, getDenied, init, setDenied
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpSessionAttributePlugin

public HttpSessionAttributePlugin()
Default constructor

Method Detail

allow

public boolean allow(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response)
              throws javax.servlet.ServletException,
                     java.io.IOException
Obtain the HttpSession and perform the required authorisation. If session or attribute resolves to null, permission is denied.

Parameters:
request - The servlet request.
response - The servlet response.
Returns:
boolean indicating whether permission is granted or denied.
Throws:
javax.servlet.ServletException
java.io.IOException