1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.seasar.cubby.plugin;
17
18 import java.util.LinkedHashSet;
19 import java.util.Set;
20
21 import javax.servlet.ServletContext;
22
23 import org.seasar.cubby.action.ActionResult;
24 import org.seasar.cubby.spi.Provider;
25
26
27
28
29
30
31 public abstract class AbstractPlugin implements Plugin {
32
33
34 private final Set<Class<? extends Provider>> supportedServices = new LinkedHashSet<Class<? extends Provider>>();
35
36
37
38
39
40
41
42 protected void support(final Class<? extends Provider> service) {
43 supportedServices.add(service);
44 }
45
46
47
48
49
50
51
52
53
54 protected boolean isSupport(final Class<? extends Provider> service) {
55 return supportedServices.contains(service);
56 }
57
58
59
60
61 public void initialize(final ServletContext servletContext) {
62 }
63
64
65
66
67 public Set<Class<? extends Provider>> getSupportedServices() {
68 return supportedServices;
69 }
70
71
72
73
74 public <S extends Provider> S getProvider(final Class<S> service) {
75 return null;
76 }
77
78
79
80
81 public void ready() {
82 }
83
84
85
86
87 public void destroy() {
88 }
89
90
91
92
93 public void invokeRequestProcessing(
94 final RequestProcessingInvocation invocation) throws Exception {
95 invocation.proceed();
96 }
97
98
99
100
101 public ActionResult invokeAction(final ActionInvocation invocation)
102 throws Exception {
103 return invocation.proceed();
104 }
105
106
107
108
109 public void invokeActionResult(final ActionResultInvocation invocation)
110 throws Exception {
111 invocation.proceed();
112 }
113
114 }