KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > webforwards > WebForwardDatabase


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.webforwards;
21
22
23 import java.util.List JavaDoc;
24
25 import com.sslexplorer.extensions.types.PluginDatabase;
26 import com.sslexplorer.replacementproxy.Replacement;
27 import com.sslexplorer.security.User;
28
29 /**
30  * The <i>System Configuration> {@link com.sslexplorer.core.Database} implementation
31  * is responsible for storing an retrieving SSL-Explorer's web forward resources and
32  * configuration.
33  *
34  * @author James D Robinson <a HREF="mailto:james@3sp.com">&lt;james@3sp.com&gt;</a>
35  */

36 public interface WebForwardDatabase extends PluginDatabase {
37
38     /**
39      * Get web forwards of type.
40      *
41      * @param realmID
42      * @return List
43      * @throws Exception
44      */

45     public List JavaDoc<WebForward> getWebForwards(int realmID) throws Exception JavaDoc;
46
47     /**
48      * Get reverse proxy web forward.
49      *
50      * @param user
51      * @param pathInContext
52      * @return WebForward
53      * @throws Exception
54      */

55     public WebForward getReverseProxyWebForward(User user, String JavaDoc pathInContext) throws Exception JavaDoc;
56
57     /**
58      * Get web forward.
59      *
60      * @param id
61      * @return WebForward
62      * @throws Exception
63      */

64     public WebForward getWebForward(int id) throws Exception JavaDoc;
65
66     /**
67      * Does the reverse proxy path exist.
68      *
69      * @param path
70      * @return boolean
71      * @throws Exception
72      */

73     public boolean reverseProxyPathExists(String JavaDoc path) throws Exception JavaDoc;
74
75     /**
76      * Does the reverse proxy path exist for the given web forward.
77      *
78      * @param path
79      * @param webforward_id
80      * @return boolean
81      * @throws Exception
82      */

83     public boolean reverseProxyPathExists(String JavaDoc path, int webforward_id) throws Exception JavaDoc;
84
85     /**
86      * Create a new web forward.
87      *
88      * @param webForward
89      * @return WebForward
90      * @throws Exception
91      */

92     public WebForward createWebForward(WebForward webForward) throws Exception JavaDoc;
93
94     /**
95      * Update the specified web forward.
96      * @param webForward
97      * @throws Exception
98      */

99     public void updateWebForward(WebForward webForward) throws Exception JavaDoc;
100
101     /**
102      * Delete the web forward with the specified resource id.
103      *
104      * @param resourceId
105      * @return WebForward
106      * @throws Exception
107      */

108     public WebForward deleteWebForward(int resourceId) throws Exception JavaDoc;
109
110     /**
111      * Get all web forwards.
112      *
113      * @return List<WebForward>
114      * @throws Exception
115      */

116     public List JavaDoc<WebForward> getWebForwards() throws Exception JavaDoc;
117
118     /**
119      * Get the web forward with the specified name.
120      *
121      * @param name
122      * @param realmID
123      * @return WebForward
124      * @throws Exception
125      */

126     public WebForward getWebForward(String JavaDoc name, int realmID) throws Exception JavaDoc;
127     
128     /**
129      * @param username
130      * @param replaceType
131      * @param mimeType
132      * @param site
133      * @return
134      * @throws Exception
135      */

136     public List JavaDoc<Replacement> getReplacementsForContent(String JavaDoc username, int replaceType, String JavaDoc mimeType, String JavaDoc site) throws Exception JavaDoc;
137
138     public List JavaDoc getReplacements() throws Exception JavaDoc;
139
140     public void updateReplacement(Replacement replacement) throws Exception JavaDoc;
141
142     public void deleteReplacement(int sequence) throws Exception JavaDoc;
143
144     public Replacement getReplacement(int sequence) throws Exception JavaDoc;
145
146     public Replacement createReplacement(Replacement replacement) throws Exception JavaDoc;
147
148
149 }
Popular Tags