[portal-commits] JBoss Portal SVN: r9046 - in branches/presentation/core-presentation: src/main/org/jboss/portal/core/presentation/server and 2 other directories.

portal-commits at lists.jboss.org portal-commits at lists.jboss.org
Tue Nov 20 13:11:58 EST 2007


Author: julien at jboss.com
Date: 2007-11-20 13:11:57 -0500 (Tue, 20 Nov 2007)
New Revision: 9046

Removed:
   branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/content/portlet/PresentationPortalContext.java
   branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/content/portlet/PresentationUserContext.java
Modified:
   branches/presentation/core-presentation/build.xml
   branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java
   branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/content/PresentationContentRendererContext.java
   branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/content/portlet/PresentationRequestContext.java
Log:
make core-presentation compile too

Modified: branches/presentation/core-presentation/build.xml
===================================================================
--- branches/presentation/core-presentation/build.xml	2007-11-20 17:53:53 UTC (rev 9045)
+++ branches/presentation/core-presentation/build.xml	2007-11-20 18:11:57 UTC (rev 9046)
@@ -85,11 +85,20 @@
       <property name="jboss-junit-configuration" value=""/>
       <property name="junit.formatter.usefile" value="true"/>
 
+      <property name="jboss.portal-presentation.lib" value="../presentation/output/lib"/>
+      <path id="jboss.portal-presentation.classpath">
+         <fileset dir="{jboss.portal-presentation.lib}" includes="portal-presentation-lib.jar"/>
+      </path>
+
       <!-- Configure thirdparty libraries -->
       &libraries;
       <echo message="${xdoclet.xdoclet.lib}"/>
       <echo message="${sun.servlet.lib}"/>
       <path id="library.classpath">
+         <path refid="jboss.portal/modules/common.classpath"/>
+         <path refid="jboss.portal/modules/web.classpath"/>
+         <path refid="jboss.portal/modules/portlet.classpath"/>
+         <path refid="jboss.portal/modules/identity.classpath"/>
          <path refid="apache.log4j.classpath"/>
          <path refid="junit.junit.classpath"/>
          <path refid="sun.servlet.classpath"/>
@@ -98,15 +107,9 @@
       <!-- Configure modules -->
       <call target="configure-modules"/>
       <path id="dependentmodule.classpath">
-         <path refid="jboss.portal-common.classpath"/>
-         <path refid="jboss.portlet-api.classpath"/>
-         <path refid="jboss.portal-portlet.classpath"/>
-         <path refid="jboss.portal-web.classpath"/>
-         <path refid="jboss.portal-identity.classpath"/>
          <path refid="jboss.portal-jems.classpath"/>
-         <path refid="jboss.portal-test.classpath"/>
          <path refid="jboss.portal-server.classpath"/>
-         <path refid="jboss.portal-uiserver.classpath"/>
+         <path refid="jboss.portal-presentation.classpath"/>
          <path refid="jboss.portal-core.classpath"/>
       </path>
 
@@ -164,9 +167,9 @@
 
       <copy file="${gwt.gwt.root}/lib/gwt-user.jar" todir="${build.resources}/presentation-sar/lib" overwrite="true"/>
       <copy file="${build.lib}/portal-core-presentation-lib.jar" todir="${build.resources}/presentation-sar/lib" overwrite="true"/>
-      <copy file="${jboss.portal-uiserver.lib}/portal-presentation-lib.jar" todir="${build.resources}/presentation-sar/lib" overwrite="true"/>
+      <copy file="${jboss.portal-presentation.lib}/portal-presentation-lib.jar" todir="${build.resources}/presentation-sar/lib" overwrite="true"/>
       <copy todir="${build.resources}/presentation-sar">
-         <fileset dir="${jboss.portal-uiserver.lib}" includes="presentation.war"/>
+         <fileset dir="${jboss.portal-presentation.lib}" includes="presentation.war"/>
       </copy>
       <jar jarfile="${build.lib}/presentation.sar">
          <fileset dir="${build.resources}/presentation-sar"/>

Modified: branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java
===================================================================
--- branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java	2007-11-20 17:53:53 UTC (rev 9045)
+++ branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java	2007-11-20 18:11:57 UTC (rev 9046)
@@ -23,46 +23,39 @@
 package org.jboss.portal.core.presentation.server;
 
 import org.apache.log4j.Logger;
-
-import org.jboss.portal.server.ServerException;
-
-
-import org.jboss.portal.presentation.client.PresentationContext;
-import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
-import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
-import org.jboss.portal.presentation.protocol.ServerAction;
-import org.jboss.portal.presentation.protocol.GetActivation;
-import org.jboss.portal.presentation.protocol.LinkActivation;
-import org.jboss.portal.presentation.protocol.ErrorResponse;
-import org.jboss.portal.presentation.protocol.ServerResponse;
-import org.jboss.portal.presentation.server.Processor;
-import org.jboss.portal.presentation.server.ProcessorRequest;
-import org.jboss.portal.presentation.server.ProcessorResponse;
-import org.jboss.portal.presentation.model.UIWindow;
-import org.jboss.portal.core.model.portal.PortalObject;
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.core.model.CustomizationManager;
+import org.jboss.portal.core.model.instance.Instance;
 import org.jboss.portal.core.model.portal.PortalObjectContainer;
 import org.jboss.portal.core.model.portal.PortalObjectId;
 import org.jboss.portal.core.model.portal.PortalObjectPath;
 import org.jboss.portal.core.model.portal.Window;
-import org.jboss.portal.core.model.portal.portlet.WindowContextImpl;
 import org.jboss.portal.core.model.portal.navstate.WindowNavigationalState;
-import org.jboss.portal.core.model.instance.Instance;
-import org.jboss.portal.core.model.CustomizationManager;
+import org.jboss.portal.core.model.portal.portlet.WindowContextImpl;
 import org.jboss.portal.core.presentation.server.content.portlet.PresentationActionContext;
-import org.jboss.portal.core.presentation.server.content.portlet.PresentationRenderContext;
 import org.jboss.portal.core.presentation.server.content.portlet.PresentationRequestContext;
-import org.jboss.portal.core.presentation.server.content.portlet.PresentationPortalContext;
-import org.jboss.portal.core.presentation.server.content.portlet.PresentationUserContext;
 import org.jboss.portal.core.presentation.server.content.portlet.PresentationSecurityContext;
-import org.jboss.portal.portlet.impl.PortletRequestDecoder;
+import org.jboss.portal.identity.User;
 import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.portlet.impl.PortletRequestDecoder;
+import org.jboss.portal.portlet.impl.spi.AbstractPortalContext;
+import org.jboss.portal.portlet.impl.spi.AbstractUserContext;
 import org.jboss.portal.portlet.invocation.ActionInvocation;
-import org.jboss.portal.portlet.invocation.RenderInvocation;
 import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
 import org.jboss.portal.portlet.invocation.response.RenderResponse;
-import org.jboss.portal.WindowState;
-import org.jboss.portal.Mode;
-import org.jboss.portal.identity.User;
+import org.jboss.portal.presentation.client.PresentationContext;
+import org.jboss.portal.presentation.model.UIWindow;
+import org.jboss.portal.presentation.protocol.ErrorResponse;
+import org.jboss.portal.presentation.protocol.LinkActivation;
+import org.jboss.portal.presentation.protocol.ServerAction;
+import org.jboss.portal.presentation.protocol.ServerResponse;
+import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
+import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
+import org.jboss.portal.presentation.server.Processor;
+import org.jboss.portal.presentation.server.ProcessorRequest;
+import org.jboss.portal.presentation.server.ProcessorResponse;
+import org.jboss.portal.server.ServerException;
 
 /**
  * @author <a href="mailto:sshah at redhat.com">Sohil Shah</a>
@@ -201,8 +194,8 @@
                ActionInvocation action = new ActionInvocation(actionContext);
                action.setRequestContext(new PresentationRequestContext(presentationContext));
                action.setWindowContext(new WindowContextImpl(window));
-               action.setPortalContext(new PresentationPortalContext());
-               action.setUserContext(new PresentationUserContext());
+               action.setPortalContext(new AbstractPortalContext());
+               action.setUserContext(new AbstractUserContext());
                action.setSecurityContext(new PresentationSecurityContext());
 
                // We need the user id

Modified: branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/content/PresentationContentRendererContext.java
===================================================================
--- branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/content/PresentationContentRendererContext.java	2007-11-20 17:53:53 UTC (rev 9045)
+++ branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/content/PresentationContentRendererContext.java	2007-11-20 18:11:57 UTC (rev 9046)
@@ -22,22 +22,22 @@
  ******************************************************************************/
 package org.jboss.portal.core.presentation.server.content;
 
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.core.model.portal.Window;
 import org.jboss.portal.core.model.portal.content.ContentRendererContext;
-import org.jboss.portal.core.model.portal.Window;
+import org.jboss.portal.core.model.portal.navstate.WindowNavigationalState;
 import org.jboss.portal.core.model.portal.portlet.WindowContextImpl;
-import org.jboss.portal.core.model.portal.navstate.WindowNavigationalState;
 import org.jboss.portal.core.presentation.server.content.portlet.PresentationRenderContext;
 import org.jboss.portal.core.presentation.server.content.portlet.PresentationRequestContext;
-import org.jboss.portal.core.presentation.server.content.portlet.PresentationPortalContext;
-import org.jboss.portal.core.presentation.server.content.portlet.PresentationUserContext;
 import org.jboss.portal.core.presentation.server.content.portlet.PresentationSecurityContext;
+import org.jboss.portal.identity.User;
+import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.portlet.impl.spi.AbstractPortalContext;
+import org.jboss.portal.portlet.impl.spi.AbstractUserContext;
+import org.jboss.portal.portlet.invocation.RenderInvocation;
+import org.jboss.portal.presentation.client.PresentationContext;
 import org.jboss.portal.presentation.model.UIWindow;
-import org.jboss.portal.presentation.client.PresentationContext;
-import org.jboss.portal.Mode;
-import org.jboss.portal.WindowState;
-import org.jboss.portal.portlet.invocation.RenderInvocation;
-import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.identity.User;
 
 /**
  * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
@@ -105,8 +105,8 @@
       RenderInvocation invocation = new RenderInvocation(new PresentationRenderContext(uiwindow, navigationalState, presentationContext));
       invocation.setRequestContext(new PresentationRequestContext(presentationContext));
       invocation.setWindowContext(new WindowContextImpl(window));
-      invocation.setPortalContext(new PresentationPortalContext());
-      invocation.setUserContext(new PresentationUserContext());
+      invocation.setPortalContext(new AbstractPortalContext());
+      invocation.setUserContext(new AbstractUserContext());
       invocation.setSecurityContext(new PresentationSecurityContext());
       return invocation;
    }

Deleted: branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/content/portlet/PresentationPortalContext.java
===================================================================
--- branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/content/portlet/PresentationPortalContext.java	2007-11-20 17:53:53 UTC (rev 9045)
+++ branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/content/portlet/PresentationPortalContext.java	2007-11-20 18:11:57 UTC (rev 9046)
@@ -1,76 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat                                               *
- * Copyright 2006, Red Hat Middleware, LLC, 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.core.presentation.server.content.portlet;
-
-import org.jboss.portal.portlet.spi.PortalContext;
-import org.jboss.portal.common.util.CollectionBuilder;
-import org.jboss.portal.WindowState;
-import org.jboss.portal.Mode;
-
-import java.util.Set;
-import java.util.Map;
-import java.util.Collections;
-
-/**
- * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class PresentationPortalContext implements PortalContext
-{
-
-   /** . */
-   private final Set windowStates;
-
-   /** . */
-   private final Set modes;
-
-   /** . */
-   private final Map props;
-
-   public PresentationPortalContext()
-   {
-      windowStates = Collections.unmodifiableSet(new CollectionBuilder().add(WindowState.MAXIMIZED).add(WindowState.MINIMIZED).add(WindowState.NORMAL).toHashSet());
-      modes = Collections.unmodifiableSet(new CollectionBuilder().add(Mode.EDIT).add(Mode.HELP).add(Mode.VIEW).toHashSet());
-      props = Collections.EMPTY_MAP;
-   }
-
-   public String getInfo()
-   {
-      return "JBossPortal/1.0";
-   }
-
-   public Set getWindowStates()
-   {
-      return windowStates;
-   }
-
-   public Set getModes()
-   {
-      return modes;
-   }
-
-   public Map getProperties()
-   {
-      return props;
-   }
-}

Modified: branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/content/portlet/PresentationRequestContext.java
===================================================================
--- branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/content/portlet/PresentationRequestContext.java	2007-11-20 17:53:53 UTC (rev 9045)
+++ branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/content/portlet/PresentationRequestContext.java	2007-11-20 18:11:57 UTC (rev 9046)
@@ -23,8 +23,8 @@
 package org.jboss.portal.core.presentation.server.content.portlet;
 
 import org.jboss.portal.portlet.spi.RequestContext;
-import org.jboss.portal.web.spi.ServletContainerContext;
 import org.jboss.portal.web.RequestDispatchCallback;
+import org.jboss.portal.web.ServletContainer;
 
 import javax.servlet.ServletContext;
 
@@ -58,8 +58,8 @@
       return 8080;
    }
 
-   public Object dispatch(ServletContainerContext servletContainerContext, ServletContext targetServletContext, RequestDispatchCallback callback, Object handback) throws Exception
+   public Object dispatch(ServletContainer servletContainer, ServletContext servletContext, RequestDispatchCallback requestDispatchCallback, Object o) throws Exception
    {
-      return context.getDispatcher().include(targetServletContext, callback, handback);
+      return context.getDispatcher().include(servletContext, requestDispatchCallback, o);
    }
 }

Deleted: branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/content/portlet/PresentationUserContext.java
===================================================================
--- branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/content/portlet/PresentationUserContext.java	2007-11-20 17:53:53 UTC (rev 9045)
+++ branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/server/content/portlet/PresentationUserContext.java	2007-11-20 18:11:57 UTC (rev 9046)
@@ -1,58 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat                                               *
- * Copyright 2006, Red Hat Middleware, LLC, 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.core.presentation.server.content.portlet;
-
-import org.jboss.portal.portlet.spi.UserContext;
-
-import java.util.Map;
-import java.util.Locale;
-import java.util.List;
-import java.util.Collections;
-
-/**
- * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class PresentationUserContext implements UserContext
-{
-
-   public String getId()
-   {
-      return null;
-   }
-
-   public Map getInformations()
-   {
-      return null;
-   }
-
-   public Locale getLocale()
-   {
-      return Locale.ENGLISH;
-   }
-
-   public List getLocales()
-   {
-      return Collections.singletonList(Locale.ENGLISH);
-   }
-}




More information about the portal-commits mailing list