[jboss-cvs] jboss-portal/portlet/src/main/org/jboss/portal/portlet ...

Julien Viet julien at jboss.com
Sun Jul 30 08:36:23 EDT 2006


  User: julien  
  Date: 06/07/30 08:36:23

  Modified:    portlet/src/main/org/jboss/portal/portlet   
                        PortletInvoker.java
  Added:       portlet/src/main/org/jboss/portal/portlet   
                        InvalidPortletIdException.java
                        PortletCloneFailedException.java
  Log:
  JBPORTAL-973 : Portlet instance container integration testing
  JBPORTAL-972 : Portlet stateful invoker testing
  
  Revision  Changes    Path
  1.14      +13 -8     jboss-portal/portlet/src/main/org/jboss/portal/portlet/PortletInvoker.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PortletInvoker.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-portal/portlet/src/main/org/jboss/portal/portlet/PortletInvoker.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -b -r1.13 -r1.14
  --- PortletInvoker.java	5 Jun 2006 23:56:15 -0000	1.13
  +++ PortletInvoker.java	30 Jul 2006 12:36:23 -0000	1.14
  @@ -31,7 +31,7 @@
    * operations are possible on a particular portlet among the set.
    *
    * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
  - * @version $Revision: 1.13 $
  + * @version $Revision: 1.14 $
    */
   public interface PortletInvoker
   {
  @@ -43,11 +43,11 @@
      Set getPortlets() throws PortletInvokerException;
   
      /**
  -    * Get information about a specific portlet.
  +    * Get information about a specific portlet. It returns null if the portlet is not found.
       *
       * @param portletId the portlet identifier in the context of this invoker
       * @return the <code>PortletInfo</code> for the specified portlet
  -    * @throws IllegalArgumentException if the portlet id parameter is null
  +    * @throws IllegalArgumentException if the portletId is null
       */
      Portlet getPortlet(String portletId) throws IllegalArgumentException, PortletInvokerException;
   
  @@ -55,36 +55,41 @@
       * Invoke an operation on a specific portlet.
       *
       * @param invocation the portlet invocation
  +    * @throws IllegalArgumentException if the invocation is null
       */
  -   void invoke(PortletInvocation invocation) throws PortletInvokerException;
  +   void invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException;
   
      /**
       * Clone a portlet.
       *
       * @return the clone id
  +    * @throws IllegalArgumentException if the portletId is null
       */
  -   String createClone(String portletId) throws PortletInvokerException;
  +   String createClone(String portletId) throws IllegalArgumentException, PortletInvokerException;
   
      /**
       * Destroy a cloned portlet.
       *
       * @param portletId the clone id
  +    * @throws IllegalArgumentException if the portletId is null
       */
  -   void destroyClone(String portletId) throws PortletInvokerException;
  +   void destroyClone(String portletId) throws IllegalArgumentException, PortletInvokerException;
   
      /**
       * Return the properties of the specified portlet.
       *
       * @param portletId the portlet id
       * @return the properties
  +    * @throws IllegalArgumentException if the portletId is null
       */
  -   ValueMap getProperties(String portletId) throws PortletInvokerException;
  +   ValueMap getProperties(String portletId) throws IllegalArgumentException, PortletInvokerException;
   
      /**
       * Set the properties on the specified portlet.
       *
       * @param portletId  the portlet id
       * @param properties the new properties
  +    * @throws IllegalArgumentException if the portletId or the properties is null
       */
  -   void setProperties(String portletId, ValueMap properties) throws PortletInvokerException;
  +   void setProperties(String portletId, ValueMap properties) throws IllegalArgumentException, PortletInvokerException;
   }
  
  
  
  1.1      date: 2006/07/30 12:36:23;  author: julien;  state: Exp;jboss-portal/portlet/src/main/org/jboss/portal/portlet/InvalidPortletIdException.java
  
  Index: InvalidPortletIdException.java
  ===================================================================
  /*
  * JBoss, Home of Professional Open Source
  * Copyright 2005, JBoss Inc., and individual contributors as indicated
  * by the @authors tag. See the copyright.txt in the distribution for a
  * full listing of individual contributors.
  *
  * This is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as
  * published by the Free Software Foundation; either version 2.1 of
  * the License, or (at your option) any later version.
  *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
  package org.jboss.portal.portlet;
  
  /**
   * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
   * @version $Revision: 1.1 $
   */
  public class InvalidPortletIdException extends PortletInvokerException
  {
  
     private String portletId;
  
     public InvalidPortletIdException(String portletId)
     {
        super("Invalid portlet id " + portletId);
        this.portletId = portletId;
     }
  
     public InvalidPortletIdException(String message, String portletId)
     {
        super(message);
        this.portletId = portletId;
     }
  
     public InvalidPortletIdException(Throwable cause, String portletId)
     {
        super(cause);
        this.portletId = portletId;
     }
  
     public InvalidPortletIdException(String message, Throwable cause, String portletId)
     {
        super(message, cause);
        this.portletId = portletId;
     }
  
     public String getPortletId()
     {
        return portletId;
     }
  }
  
  
  
  1.1      date: 2006/07/30 12:36:23;  author: julien;  state: Exp;jboss-portal/portlet/src/main/org/jboss/portal/portlet/PortletCloneFailedException.java
  
  Index: PortletCloneFailedException.java
  ===================================================================
  /*
  * JBoss, Home of Professional Open Source
  * Copyright 2005, JBoss Inc., and individual contributors as indicated
  * by the @authors tag. See the copyright.txt in the distribution for a
  * full listing of individual contributors.
  *
  * This is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as
  * published by the Free Software Foundation; either version 2.1 of
  * the License, or (at your option) any later version.
  *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
  package org.jboss.portal.portlet;
  
  /**
   * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
   * @version $Revision: 1.1 $
   */
  public class PortletCloneFailedException extends PortletInvokerException
  {
  
     private String portletId;
  
     public PortletCloneFailedException(String portletId)
     {
        super("Portlet clone failure of portlet id " + portletId);
        this.portletId = portletId;
     }
  
     public PortletCloneFailedException(String message, String portletId)
     {
        super(message);
        this.portletId = portletId;
     }
  
     public PortletCloneFailedException(Throwable cause, String portletId)
     {
        super(cause);
        this.portletId = portletId;
     }
  
     public PortletCloneFailedException(String message, Throwable cause, String portletId)
     {
        super(message, cause);
        this.portletId = portletId;
     }
  
     public String getPortletId()
     {
        return portletId;
     }
  }
  
  
  



More information about the jboss-cvs-commits mailing list