You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-dev@portals.apache.org by dl...@apache.org on 2005/08/31 19:34:45 UTC

cvs commit: ws-wsrp4j/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/interfaces/page Page.java

dlouzan     2005/08/31 10:34:45

  Added:       sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/interfaces/page
                        Page.java
  Log:
  Moved from consumer-swingconsumer module.
  
  Revision  Changes    Path
  1.1                  ws-wsrp4j/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/interfaces/page/Page.java
  
  Index: Page.java
  ===================================================================
  /*
   * Copyright 2003-2005 The Apache Software Foundation.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   * 
   *      http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  package org.apache.wsrp4j.commons.consumer.interfaces.page;
  
  import java.util.Iterator;
  import java.util.Map;
  
  import org.apache.wsrp4j.commons.consumer.interfaces.portlet.PortletKey;
  
  
  /**
   * Interface defines a page with portlets.
   *
   * @author Stephan Laertz
   * @version $Id: Page.java,v 1.1 2005/08/31 17:34:45 dlouzan Exp $
   **/
  public interface Page {
      
      /**
       * Get the keys of all portlet instances on the page.
       *
       * @return Iterator with the instance keys of all portlets on the page
       **/
      Iterator getPortletInstanceKeys();
      
      /**
       * Get the portlet key to the given portlet instance key.
       *
       * @param portletInstanceKey Key of a portlet instance on the page
       * @return The portlet key
       **/
      PortletKey getPortletKey(String portletInstanceKey);
      
      /**
       * Get the ID of this page
       *
       * @return The page ID
       **/
      String getPageID();
      
      /**
       * Add an portlet to the page. The ID of this portlet on the page
       * is generated.
       *
       * @param portletKey The portlet key
       **/
      void addPortlet(PortletKey portletKey);
      
      /**
       * Add an portlet to the page and set the ID of this portlet on
       * the page to the given value. If any other portlet exists on the page
       * with the same ID the old portlet is removed.
       *
       * @param portletKey The portlet key
       * @param instanceKey ID of the portlet on the page
       **/
      void addPortlet(PortletKey portletKey, String instanceKey);
      
      /**
       * Remove an portlet instance from the page
       *
       * @param portletInstanceKey The instance key of the portlet instance to be 
       * removed
       **/
      void removePortlet(String portletInstanceKey);
      
      /**
       * Set the page ID
       *
       * @param pageID ID of this page
       **/
      void setPageID(String pageID);
      
      /**
       * Get the title of the page
       *
       * @return Title of this page
       **/
      String getTitle();
      
      /**
       * Set the title of the page
       *
       * @param title Page title
       **/
      void setTitle(String title);
      
      /**
       * Get the instance key of the portlet on this page which is in maximized 
       * window state or null if no portlet is in that state.
       *
       * @return portlet instance key of the portlet or null if no portlet is in 
       * max window state
       **/
      String getMaximizedPortletInstanceKey();
      
      /**
       * Set the portlet which is currently in maximized window state
       *
       * @param portletInstanceKey instance ID
       **/
      void setMaximizedPortletInstanceKey(String portletInstanceKey);
      
      /**
       * Set the portlets which should appear on the page. The map must contain
       * mappings of portlet instance keys to portlet keys.
       **/
      void setPortlets(Map map);
      
      /**
       * Get map with portlet instance keys map to portlet keys with all portlet 
       * instances on this page.
       **/
      Map getPortlets();
      
  }