View Javadoc

1   /*
2    * Copyright 2003,2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
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  package org.apache.pluto.invoker;
17  
18  import org.apache.pluto.factory.PortletInvokerFactory;
19  import org.apache.pluto.om.portlet.PortletDefinition;
20  import org.apache.pluto.services.factory.FactoryManager;
21  
22  /***
23   * PortletInvokerAccess is a static accessor for getting and releasing portlet invokers via
24   * the portal's portlet invoker factory.
25   *
26   * @version $Id: PortletInvokerAccess.java 35916 2004-03-02 14:55:19Z cziegeler $
27   */
28  public class PortletInvokerAccess 
29  {
30      private static PortletInvokerFactory invokerFactory = 
31              (PortletInvokerFactory)FactoryManager.getFactory(org.apache.pluto.invoker.PortletInvoker.class);
32      
33      /* (non-Javadoc)
34       * @see org.apache.pluto.factory.PortletInvokerFactory#getPortletInvoker(org.apache.pluto.om.portlet.PortletDefinition)
35       */
36      public static PortletInvoker getPortletInvoker(PortletDefinition portletDefinition)
37      {
38          return invokerFactory.getPortletInvoker(portletDefinition);
39      }
40  
41      /* (non-Javadoc)
42       * @see org.apache.pluto.factory.PortletInvokerFactory#releasePortletInvoker(org.apache.pluto.invoker.PortletInvoker)
43       */
44      public static void releasePortletInvoker(PortletInvoker invoker)
45      {
46          invokerFactory.releasePortletInvoker(invoker);
47      }
48  }