KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > appserv > security > AuditModule


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /*
25  * AuditModule.java
26  *
27  * Created on July 27, 2003, 11:32 PM
28  */

29
30 package com.sun.appserv.security;
31
32 import java.util.Properties JavaDoc;
33 import javax.servlet.http.HttpServletRequest JavaDoc;
34 /**
35  * Base class that should be extended by all classes that wish to provide their
36  * own Audit support.
37  * @author Harpreet Singh
38  * @version
39  */

40 public abstract class AuditModule {
41     Properties JavaDoc props = null;
42     /**
43      * Method is invoked at server startup, during AuditModule initialization.
44      * If method returns without any exception then S1AS assumes that the module
45      * is ready to serve any requests.
46      * @param props the properties for the AuditModule. These properties are
47      * defined in the domain.xml
48      */

49     public void init(Properties JavaDoc props) {
50         this.props = props;
51     }
52     
53     /**
54      * Invoked post authentication request for a user in a given realm
55      * @param user username for whom the authentication request was made
56      * @param realm the realm name under which the user is authenticated.
57      * @param success the status of the authentication
58      */

59     public void authentication(String JavaDoc user, String JavaDoc realm, boolean success) {
60     }
61     
62     /**
63      * Invoked post web authorization request.
64      * @param user the username for whom the authorization was performed
65      * @param req the HttpRequest object for the web request
66      * @param type the permission type, hasUserDataPermission
67      * or hasResourcePermission.
68      * @param success the status of the web authorization request
69      */

70     public void webInvocation(String JavaDoc user, HttpServletRequest JavaDoc req,
71             String JavaDoc type, boolean success) {
72     }
73     /**
74      * Invoked post ejb authorization request.
75      * @param user the username for whom the authorization was performed
76      * @param ejb the ejb name for which this authorization was performed
77      * @param method the method name for which this authorization was performed
78      * @param success the status of the ejb authorization request
79      */

80     public void ejbInvocation(String JavaDoc user, String JavaDoc ejb, String JavaDoc method, boolean success) {
81     }
82     
83     /**
84      * Invoked during validation of the web service request
85      * @param uri The URL representation of the web service endpoint
86      * @param endpoint The name of the endpoint representation
87      * @param success the status of the web service request validation
88      */

89     public void webServiceInvocation(String JavaDoc uri, String JavaDoc endpoint, boolean success) {
90     }
91     
92     /**
93      * Invoked during validation of the web service request
94      * @param endpoint The representation of the web service endpoint
95      * @param success the status of the web service request validation
96      */

97     public void ejbAsWebServiceInvocation(String JavaDoc endpoint, boolean success) {
98     }
99
100     /**
101      * Invoked upon completion of the server startup
102      */

103     public void serverStarted() {
104     }
105
106     /**
107      * Invoked upon completion of the server shutdown
108      */

109     public void serverShutdown() {
110     }
111
112 }
113
Popular Tags