Author: julien(a)jboss.com
Date: 2007-08-17 08:57:44 -0400 (Fri, 17 Aug 2007)
New Revision: 7973
Removed:
branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/Mode.java
branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/WindowState.java
Modified:
branches/JBoss_Portal_Branch_2_6/api/build.xml
branches/JBoss_Portal_Branch_2_6/core/build.xml
branches/JBoss_Portal_Branch_2_6/portlet-server/build.xml
branches/JBoss_Portal_Branch_2_6/theme/build.xml
branches/JBoss_Portal_Branch_2_6/wsrp/build.xml
Log:
moved org.jboss.portal.Mode and org.jboss.portal.WindowState in a portal common package
along with the common classes
Modified: branches/JBoss_Portal_Branch_2_6/api/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/api/build.xml 2007-08-17 12:56:51 UTC (rev 7972)
+++ branches/JBoss_Portal_Branch_2_6/api/build.xml 2007-08-17 12:57:44 UTC (rev 7973)
@@ -88,6 +88,7 @@
<!-- Configure thirdparty libraries -->
&libraries;
<path id="library.classpath">
+ <path refid="jboss.portal/modules/common.classpath"/>
<path refid="junit.junit.classpath"/>
</path>
Deleted: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/Mode.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/Mode.java 2007-08-17
12:56:51 UTC (rev 7972)
+++ branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/Mode.java 2007-08-17
12:57:44 UTC (rev 7973)
@@ -1,162 +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;
-
-import java.io.Serializable;
-import java.util.Locale;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision$
- */
-public final class Mode implements Serializable
-{
-
- /** The serialVersionUID. */
- private static final long serialVersionUID = 6033765240710422050L;
-
- /** . */
- public static final Mode EDIT = new Mode("edit");
-
- /** . */
- public static final Mode HELP = new Mode("help");
-
- /** . */
- public static final Mode VIEW = new Mode("view");
-
- /** . */
- public static final Mode EDIT_DEFAULTS = new Mode("edit_defaults");
-
- /** . */
- public static final Mode ADMIN = new Mode("admin");
-
- /** . */
- private String name;
-
- public Mode(String name)
- {
- this(name, false);
- }
-
- /**
- * @param name
- * @param preserveCase
- * @since 2.4.2
- */
- private Mode(String name, boolean preserveCase)
- {
- if (name == null)
- {
- throw new IllegalArgumentException("Mode cannot be null");
- }
- this.name = (preserveCase ? name : name.toLowerCase(Locale.ENGLISH));
- }
-
-
- public boolean equals(Object o)
- {
- if (o == this)
- {
- return true;
- }
- if (o instanceof Mode)
- {
- Mode that = (Mode)o;
- return name.equals(that.name);
- }
- return false;
- }
-
- public int hashCode()
- {
- return name.hashCode();
- }
-
- public String toString()
- {
- return name;
- }
-
- private Object readResolve()
- {
- if (VIEW.name.equals(name))
- {
- return VIEW;
- }
- else if (EDIT.name.equals(name))
- {
- return EDIT;
- }
- else if (HELP.name.equals(name))
- {
- return HELP;
- }
- else if (EDIT_DEFAULTS.name.equals(name))
- {
- return EDIT_DEFAULTS;
- }
- else
- {
- return this;
- }
- }
-
- public static Mode create(String name)
- {
- return create(name, false);
- }
-
- /**
- * @param name
- * @param preserveCase
- * @return
- * @since 2.4.2
- */
- public static Mode create(String name, boolean preserveCase)
- {
- if (Mode.VIEW.name.equals(name))
- {
- return Mode.VIEW;
- }
- else if (Mode.EDIT.name.equals(name))
- {
- return Mode.EDIT;
- }
- else if (Mode.HELP.name.equals(name))
- {
- return Mode.HELP;
- }
- else if (Mode.ADMIN.name.equals(name))
- {
- return Mode.ADMIN;
- }
- else if (Mode.EDIT_DEFAULTS.name.equals(name))
- {
- return Mode.EDIT_DEFAULTS;
- }
- else
- {
- return new Mode(name, preserveCase);
- }
- }
-}
Deleted: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/WindowState.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/WindowState.java 2007-08-17
12:56:51 UTC (rev 7972)
+++
branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/WindowState.java 2007-08-17
12:57:44 UTC (rev 7973)
@@ -1,144 +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;
-
-import java.io.Serializable;
-import java.util.Locale;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision$
- */
-public final class WindowState implements Serializable
-{
-
- /** The serialVersionUID */
- private static final long serialVersionUID = -6305311518934458562L;
-
- /** . */
- public static final WindowState NORMAL = new WindowState("normal");
-
- /** . */
- public static final WindowState MINIMIZED = new WindowState("minimized");
-
- /** . */
- public static final WindowState MAXIMIZED = new WindowState("maximized");
-
- /** . */
- private String name;
-
- public WindowState(String name)
- {
- this(name, false);
- }
-
- /**
- * @param name
- * @param preserveCase
- * @since 2.4.2
- */
- private WindowState(String name, boolean preserveCase)
- {
- if (name == null)
- {
- throw new IllegalArgumentException("Window state name cannot be
null");
- }
-
- this.name = (preserveCase ? name : name.toLowerCase(Locale.ENGLISH));
- }
-
- public boolean equals(Object o)
- {
- if (o == this)
- {
- return true;
- }
- if (o instanceof WindowState)
- {
- WindowState that = (WindowState)o;
- return name.equals(that.name);
- }
- return false;
- }
-
- public int hashCode()
- {
- return name.hashCode();
- }
-
- public String toString()
- {
- return name;
- }
-
- private Object readResolve()
- {
- if (NORMAL.name.equals(name))
- {
- return NORMAL;
- }
- else if (MAXIMIZED.name.equals(name))
- {
- return MAXIMIZED;
- }
- else if (MINIMIZED.name.equals(name))
- {
- return MINIMIZED;
- }
- else
- {
- return this;
- }
- }
-
- public static WindowState create(String name)
- {
- return create(name, false);
- }
-
- /**
- * @param name
- * @param preserveCase
- * @return
- * @since 2.4.2
- */
- public static WindowState create(String name, boolean preserveCase)
- {
- if (WindowState.NORMAL.name.equals(name))
- {
- return WindowState.NORMAL;
- }
- else if (WindowState.MINIMIZED.name.equals(name))
- {
- return WindowState.MINIMIZED;
- }
- else if (WindowState.MAXIMIZED.name.equals(name))
- {
- return WindowState.MAXIMIZED;
- }
- else
- {
- return new WindowState(name, preserveCase);
- }
- }
-}
Modified: branches/JBoss_Portal_Branch_2_6/core/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/build.xml 2007-08-17 12:56:51 UTC (rev 7972)
+++ branches/JBoss_Portal_Branch_2_6/core/build.xml 2007-08-17 12:57:44 UTC (rev 7973)
@@ -319,7 +319,7 @@
<fileset dir="${build.lib}"
includes="portal-core-lib.jar"/>
<fileset dir="${build.lib}"
includes="jboss-portlet-api-lib.jar"/>
<fileset dir="${jboss.portal-format.root}/lib"
includes="portal-format-lib.jar"/>
- <fileset dir="${jboss.portal/modules/common.lib}"
includes="portal-common-lib.jar"/>
+ <fileset dir="${jboss.portal/modules/common.lib}"
includes="portal-common-lib.jar,portal-common-portal-lib.jar"/>
<fileset dir="${jboss.portal/modules/web.lib}"
includes="portal-web-lib.jar"/>
<fileset dir="${jboss.portal-bridge.root}/lib"
includes="portal-bridge-lib.jar"/>
<fileset dir="${jboss.portal-server.root}/lib"
includes="portal-server-lib.jar"/>
Modified: branches/JBoss_Portal_Branch_2_6/portlet-server/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/portlet-server/build.xml 2007-08-17 12:56:51 UTC (rev
7972)
+++ branches/JBoss_Portal_Branch_2_6/portlet-server/build.xml 2007-08-17 12:57:44 UTC (rev
7973)
@@ -196,7 +196,7 @@
<fileset dir="${build.resources}/test-war"/>
</jar>
<copy todir="${build.resources}/test-sar">
- <fileset dir="${jboss.portal/modules/common.lib}"
includes="portal-common-lib.jar"/>
+ <fileset dir="${jboss.portal/modules/common.lib}"
includes="portal-common-lib.jar,portal-common-portal-lib.jar"/>
<fileset dir="${jboss.portal/modules/test.lib}"
includes="portal-test-lib.jar"/>
<fileset dir="${jboss.portal-jems.root}/lib"
includes="portal-jems-lib.jar"/>
<fileset dir="${jboss.portal-server.root}/lib"
includes="portal-server-lib.jar"/>
@@ -219,7 +219,7 @@
<jar jarfile="${build.lib}/test-info.sar">
<fileset dir="${junit.junit.lib}"
includes="junit.jar"/>
<fileset dir="${jboss.portal/modules/test.lib}"
includes="portal-test-lib.jar"/>
- <fileset dir="${jboss.portal/modules/common.lib}"
includes="portal-common-lib.jar"/>
+ <fileset dir="${jboss.portal/modules/common.lib}"
includes="portal-common-lib.jar,portal-common-portal-lib.jar"/>
<fileset dir="${jboss.portal-jems.root}/lib"
includes="portal-jems-lib.jar"/>
<fileset dir="${jboss.portal-server.root}/lib"
includes="portal-server-lib.jar"/>
<fileset dir="${jboss.portal-server.root}/lib"
includes="portal-server-test-lib.jar"/>
Modified: branches/JBoss_Portal_Branch_2_6/theme/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/theme/build.xml 2007-08-17 12:56:51 UTC (rev 7972)
+++ branches/JBoss_Portal_Branch_2_6/theme/build.xml 2007-08-17 12:57:44 UTC (rev 7973)
@@ -231,7 +231,7 @@
<jar jarfile="${build.lib}/theme-test.sar">
<fileset dir="${build.lib}"
includes="theme-test.war"/>
<fileset dir="${build.resources}/test/theme-test-sar"/>
- <fileset dir="${jboss.portal/modules/common.lib}"
includes="portal-common-lib.jar"/>
+ <fileset dir="${jboss.portal/modules/common.lib}"
includes="portal-common-lib.jar,portal-common-portal-lib.jar"/>
<fileset dir="${jboss.portal-server.root}/lib"
includes="portal-server-lib.jar"/>
<fileset dir="${jboss.portal-jems.root}/lib"
includes="portal-jems-lib.jar"/>
<fileset dir="${jboss.portal/modules/web.lib}"
includes="portal-web-lib.jar"/>
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-08-17 12:56:51 UTC (rev 7972)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-08-17 12:57:44 UTC (rev 7973)
@@ -482,6 +482,7 @@
<fileset dir="${jboss.portal-security.root}/lib"
includes="portal-security-lib.jar"/>
<fileset dir="${build.lib.test}"
includes="test-wsrp-consumer-lib.jar"/>
<fileset dir="${jboss.portlet-api.root}/lib"
includes="portlet-api-lib.jar"/>
+ <fileset dir="${jboss.portal/modules/common.lib}"
includes="portal-common-portal-lib.jar"/>
<fileset dir="${jboss.portlet-api.root}/lib"
includes="portal-api-lib.jar"/>
<fileset dir="${jboss.portal-portlet.root}/lib"
includes="portal-portlet-lib.jar,
portal-portlet-test-lib.jar"/>
@@ -544,6 +545,7 @@
<copy todir="${build.resources.test}/test-wsrp-producer-sar/lib"
overwrite="true">
<fileset dir="${build.lib}"
includes="portal-wsrp-lib.jar"/>
<fileset dir="${build.lib.test}"
includes="test-wsrp-producer-lib.jar"/>
+ <fileset dir="${jboss.portal/modules/common.lib}"
includes="portal-common-portal-lib.jar"/>
<fileset dir="${jboss.portlet-api.root}/lib"
includes="portlet-api-lib.jar"/>
<fileset dir="${jboss.portlet-api.root}/lib"
includes="portal-api-lib.jar"/>
<fileset dir="${jboss.portal-portlet.root}/lib"
includes="portal-portlet-lib.jar"/>