01: /*
02: * Copyright 2004-2007 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: *
16: */
17:
18: package org.jpublish;
19:
20: import java.util.Map;
21:
22: import com.anthonyeden.lib.config.Configuration;
23:
24: /** Standard interface implement by pluggable JPublish modules. Modules have access
25: to the SiteContext during the init() method and have access to the JPublishContext
26: for every request that they will service.
27:
28: @author Anthony Eden
29: */
30:
31: public interface JPublishModule {
32:
33: /** Initialize the module. This corresponds with the
34: Servlet.init() method, except that it includes a reference
35: to the JPublish SiteContext.
36:
37: @param site The SiteContext
38: @param configuration The configuration object
39: @throws Exception
40: */
41:
42: public void init(SiteContext site, Configuration configuration)
43: throws Exception;
44:
45: /** Get a map of defined actions.
46:
47: @return The defined actions
48: */
49:
50: public Map getDefinedActions();
51:
52: /** Invoked when the module is destroyed. This corresponds to the
53: Servlet.destroy() method.
54: */
55:
56: public void destroy();
57:
58: }
|