[jboss-cvs] jboss-portal/api/src/main/org/jboss/portal/node/event ...

Julien Viet julien at jboss.com
Mon Jul 31 15:29:45 EDT 2006


  User: julien  
  Date: 06/07/31 15:29:45

  Added:       api/src/main/org/jboss/portal/node/event       
                        PortalNodeEvent.java PortalNodeEventContext.java
                        PortalNodeEventListener.java WindowActionEvent.java
                        WindowEvent.java WindowNavigationEvent.java
                        WindowRenderEvent.java
  Log:
  - moved the portal api in the api module in order to have a standalone jar
  - JBPORTAL-631 : Try to move org.jboss.portlet package to the api module
  - IPC support in 2.4 (only for local portlets)
  
  Revision  Changes    Path
  1.1      date: 2006/07/31 19:29:45;  author: julien;  state: Exp;jboss-portal/api/src/main/org/jboss/portal/node/event/PortalNodeEvent.java
  
  Index: PortalNodeEvent.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.node.event;
  
  import org.jboss.portal.node.PortalNode;
  
  /**
   * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
   */
  public abstract class PortalNodeEvent
  {
  
     /** The portal node. */
     protected final PortalNode node;
  
     public PortalNodeEvent(PortalNode node)
     {
        if (node == null)
        {
           throw new IllegalArgumentException("No null node accepted");
        }
        this.node = node;
     }
  
     public PortalNode getNode()
     {
        return node;
     }
  }
  
  
  1.1      date: 2006/07/31 19:29:45;  author: julien;  state: Exp;jboss-portal/api/src/main/org/jboss/portal/node/event/PortalNodeEventContext.java
  
  Index: PortalNodeEventContext.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.node.event;
  
  import org.jboss.portal.node.PortalNode;
  
  /**
   * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
   * @version $Revision: 1.1 $
   */
  public interface PortalNodeEventContext
  {
     /**
      * Dispatch the event to the next listeners.
      *
      * @return the event response or null
      */
     PortalNodeEvent dispatch();
  
     /**
      * The current node being browsed by the bubbling effect.
      *
      * @return the current node.
      */
     PortalNode getNode();
  }
  
  
  
  1.1      date: 2006/07/31 19:29:45;  author: julien;  state: Exp;jboss-portal/api/src/main/org/jboss/portal/node/event/PortalNodeEventListener.java
  
  Index: PortalNodeEventListener.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.node.event;
  
  /**
   * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
   * @version $Revision: 1.1 $
   */
  public interface PortalNodeEventListener
  {
     /**
      * Dispatch an event to the listener.
      *
      * @param context the bubbler to perform the event bubbling control
      * @param event the fired event
      * @return the next event or null to keep the same event
      */
     PortalNodeEvent onEvent(PortalNodeEventContext context, PortalNodeEvent event);
  }
  
  
  
  1.1      date: 2006/07/31 19:29:45;  author: julien;  state: Exp;jboss-portal/api/src/main/org/jboss/portal/node/event/WindowActionEvent.java
  
  Index: WindowActionEvent.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.node.event;
  
  import org.jboss.portal.node.PortalNode;
  
  import java.util.Map;
  
  /**
   * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
   * @version $Revision: 1.1 $
   */
  public class WindowActionEvent extends WindowEvent
  {
  
     /** The parameters from the query string. */
     protected Map parameters;
  
     public WindowActionEvent(PortalNode node)
     {
        super(node);
     }
  
     public Map getParameters()
     {
        return parameters;
     }
  
     public void setParameters(Map parameters)
     {
        this.parameters = parameters;
     }
  }
  
  
  
  1.1      date: 2006/07/31 19:29:45;  author: julien;  state: Exp;jboss-portal/api/src/main/org/jboss/portal/node/event/WindowEvent.java
  
  Index: WindowEvent.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.node.event;
  
  import org.jboss.portal.Mode;
  import org.jboss.portal.WindowState;
  import org.jboss.portal.node.PortalNode;
  
  /**
   * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
   */
  public class WindowEvent extends PortalNodeEvent
  {
  
     /** . */
     protected Mode mode;
  
     /** . */
     protected WindowState windowState;
  
     public WindowEvent(PortalNode node) throws IllegalArgumentException
     {
        super(node);
  
        //
        if (node.getType() != PortalNode.TYPE_WINDOW)
        {
           throw new IllegalArgumentException("Only window accepted");
        }
     }
  
     public Mode getMode()
     {
        return mode;
     }
  
     public void setMode(Mode mode)
     {
        this.mode = mode;
     }
  
     public WindowState getWindowState()
     {
        return windowState;
     }
  
     public void setWindowState(WindowState windowState)
     {
        this.windowState = windowState;
     }
  }
  
  
  1.1      date: 2006/07/31 19:29:45;  author: julien;  state: Exp;jboss-portal/api/src/main/org/jboss/portal/node/event/WindowNavigationEvent.java
  
  Index: WindowNavigationEvent.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.node.event;
  
  import org.jboss.portal.node.PortalNode;
  
  /**
   * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
   * @version $Revision: 1.1 $
   */
  public class WindowNavigationEvent extends WindowEvent
  {
     public WindowNavigationEvent(PortalNode node)
     {
        super(node);
     }
  }
  
  
  
  1.1      date: 2006/07/31 19:29:45;  author: julien;  state: Exp;jboss-portal/api/src/main/org/jboss/portal/node/event/WindowRenderEvent.java
  
  Index: WindowRenderEvent.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.node.event;
  
  import org.jboss.portal.node.PortalNode;
  
  import java.util.Map;
  
  /**
   * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
   * @version $Revision: 1.1 $
   */
  public class WindowRenderEvent extends WindowEvent
  {
  
     /** . */
     protected Map parameters;
  
     public WindowRenderEvent(PortalNode node)
     {
        super(node);
     }
  
     public Map getParameters()
     {
        return parameters;
     }
  
     public void setParameters(Map parameters)
     {
        this.parameters = parameters;
     }
  
  }
  
  
  



More information about the jboss-cvs-commits mailing list