Interface AccessControl
public interface AccessControl
Interface for implementation of access control for all parts of the Portal
(including the initialization). When configured in the servlet init parameter
"accesscontrol.class", an instance of this class is instantiated and used for
every access of the PortalServlet's methods
GenericServlet.init()
,
HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
and GenericServlet.destroy()
. When the secured servlet is destroyed,
the access control instance is destroyed itself, by calling the
destroy()
method.-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Destroy the access control instance, free all resources.void
init
(javax.servlet.ServletConfig config) Initialize the access control instance.runPrivileged
(PrivilegedAction action, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Run the given action with the necessary privileges.
-
Method Details
-
init
void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException Initialize the access control instance. This is done first when the PortalServlet is initialized. When this method throws an exception, the servlet initialization itself will fail with this exception.- Parameters:
config
- servlet configuration- Throws:
javax.servlet.ServletException
- in case of errors
-
runPrivileged
Object runPrivileged(PrivilegedAction action, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException Run the given action with the necessary privileges. This will include everything done by the portal during- Initialization in
GenericServlet.init()
(after this instance was initialized) - Request handling in
HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
- Shutting down in (@link
GenericServlet.destroy()
(before this instance is destroyed)
- Parameters:
action
- privileged actionrequest
- servlet request, when a request is handled, null for the initializationresponse
- servlet response, when a request is handled, null for the initialization- Returns:
- object that was returned by the privileged action
- Throws:
javax.servlet.ServletException
- in case of errors
- Initialization in
-
destroy
void destroy()Destroy the access control instance, free all resources. This method is called from the methodGenericServlet.destroy()
.
-