01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.jetspeed.container.invoker;
18:
19: import javax.servlet.ServletConfig;
20:
21: import org.apache.jetspeed.factory.PortletFactory;
22: import org.apache.pluto.invoker.PortletInvoker;
23: import org.apache.pluto.om.portlet.PortletDefinition;
24:
25: /**
26: * JetspeedPortletInvoker extends Pluto's portlet invoker and extends it
27: * with lifecycle management. Portlet Invokers can be pooled, and activated
28: * and passivated per request cycle.
29: *
30: * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
31: * @version $Id: JetspeedPortletInvoker.java 516448 2007-03-09 16:25:47Z ate $
32: */
33: public interface JetspeedPortletInvoker extends PortletInvoker {
34: /**
35: * Activating an invoker makes it ready to invoke portlets.
36: * If an invoker's state is not activated, it can not invoke.
37: *
38: * @param portletFactory The factory to get access to the portlet being invoked.
39: * @param portletDefinition The portlet's definition that is being invoked.
40: * @param servletConfig The servlet configuration of the portal.
41: * @param containerServlet
42: */
43: void activate(PortletFactory portletFactory,
44: PortletDefinition portletDefinition,
45: ServletConfig servletConfig);
46:
47: /**
48: * Activating an invoker makes it ready to invoke portlets.
49: * If an invoker's state is not activated, it can not invoke.
50: * This second signature allows for activating with an extra property.
51: *
52: * @param portletFactory The factory to get access to the portlet being invoked.
53: * @param portletDefinition The portlet's definition that is being invoked.
54: * @param servletConfig The servlet configuration of the portal.
55: * @param property Implementation specific property
56: * @param containerServlet
57: */
58: void activate(PortletFactory portletFactory,
59: PortletDefinition portletDefinition,
60: ServletConfig servletConfig, String property);
61:
62: /**
63: * Passivates an invoker, freeing it back to the invoker pool.
64: * If an invoker's state is passivated, it cannot be used to invoke portlets.
65: */
66: void passivate();
67:
68: /**
69: * Returns true if the state of this invoke is 'activated', and false if it is 'passivated'.
70: * @return True if the current state of the invoker is 'activated' otherwise false.
71: */
72: boolean isActivated();
73: }
|