KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > core > Database


1 /*
2  * SSL-Explorer
3  *
4  * Copyright (C) 2003-2006 3SP LTD. All Rights Reserved
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */

19             
20 package com.sslexplorer.core;
21
22
23 /**
24  * SSL-Explorer stores most of its configuration and resources in one of
25  * the <i>Database</i> implementations.
26  * <p>
27  * Current databases include {@link com.sslexplorer.properties.PropertyDatabase},
28  * {@link com.sslexplorer.security.SystemDatabase} and
29  * {@link com.sslexplorer.policyframework.PolicyDatabase}.
30  * Plugins may define futher Databases.
31  *
32  * @author Brett Smith <brett@3sp.com>
33  */

34 public interface Database {
35   
36     /**
37      * Clean up the database. This is an admnistrator initiated action
38      * that should be used to tidy up any old data that is no longer
39      * relevant.
40      * <p>
41      * For example, SSL-Explorer allows the administrator to select the
42      * source of <i>User Accounts</i>. The administrator chooses to use
43      * the <i>Active Directory User Database</i>. Because SSL-Explorer does
44      * not know when a user account is deleted from the Active Directory,
45      * other Databases that store resources keyed by username, may end up
46      * with items that are no longer valid. Every now and again the administrator
47      * should run the <i>Clean Up</i> function which will scan these other
48      * databases looking for non-existant users and delete the items.
49      *
50      * @throws Exception on any error
51      */

52     public void cleanup() throws Exception JavaDoc;
53     
54     /**
55      * Open and initialise the database.
56      *
57      * @param controllingServlet controlling servlet
58      * @throws Exception on any error
59      */

60     public void open(CoreServlet controllingServlet) throws Exception JavaDoc;
61     
62     /**
63      * Close the database. Normally called during shutdown.
64      *
65      * @throws Exception on any error
66      */

67     public void close() throws Exception JavaDoc;
68
69
70 }
71
Popular Tags