[jboss-svn-commits] JBoss Portal SVN: r5296 - in trunk: common/src/main/org/jboss/portal/common core/src/main/org/jboss/portal/core/portlet/role core/src/main/org/jboss/portal/core/portlet/user core/src/main/org/jboss/portal/core/servlet/jsp core/src/main/org/jboss/portal/core/servlet/jsp/taglib core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context core/src/main/org/jboss/portal/test/core forums/src/main/org/jboss/portlet/forums theme/src/main/org/jboss/portal/theme

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Sep 29 18:12:56 EDT 2006


Author: julien at jboss.com
Date: 2006-09-29 18:12:31 -0400 (Fri, 29 Sep 2006)
New Revision: 5296

Added:
   trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context/
   trunk/theme/src/main/org/jboss/portal/theme/FQN.java
Removed:
   trunk/common/src/main/org/jboss/portal/common/FQN.java
   trunk/common/src/main/org/jboss/portal/common/context/
Modified:
   trunk/core/src/main/org/jboss/portal/core/portlet/role/RolePortlet.java
   trunk/core/src/main/org/jboss/portal/core/portlet/user/UserPortlet.java
   trunk/core/src/main/org/jboss/portal/core/servlet/jsp/PortalJsp.java
   trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/IfTag.java
   trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/IncludeTag.java
   trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/IterateTag.java
   trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/PortalLib.java
   trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context/AbstractContext.java
   trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context/BuildException.java
   trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context/ChildrenStrategy.java
   trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context/Context.java
   trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context/DelegateContext.java
   trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context/NamedContext.java
   trunk/core/src/main/org/jboss/portal/test/core/I18nOutELTestCase.java
   trunk/core/src/main/org/jboss/portal/test/core/IfTagTestCase.java
   trunk/core/src/main/org/jboss/portal/test/core/IterateTagTestCase.java
   trunk/core/src/main/org/jboss/portal/test/core/OutELTestCase.java
   trunk/core/src/main/org/jboss/portal/test/core/TagLibTestCase.java
   trunk/forums/src/main/org/jboss/portlet/forums/ForumsPortlet.java
   trunk/theme/src/main/org/jboss/portal/theme/ServerRegistrationID.java
Log:
- moved code from common to more appropriate place (not generic or useful enough to be in common)

Deleted: trunk/common/src/main/org/jboss/portal/common/FQN.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/FQN.java	2006-09-29 22:00:38 UTC (rev 5295)
+++ trunk/common/src/main/org/jboss/portal/common/FQN.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -1,240 +0,0 @@
-/*
-* 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.common;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-
-/**
- * Defines a reusable and generic full qualified name.
- *
- * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision$
- */
-public class FQN implements Serializable
-{
-
-   /** The serialVersionUID */
-   private static final long serialVersionUID = -4843390736196899215L;
-
-   private static final String[] EMPTY_ARRAY = new String[0];
-
-   /** The list of objects. */
-   protected String[] names; // julien : perhaps Serializable[] ?
-
-   /** The cached hashcode. */
-   private int hashCode;
-
-   public FQN()
-   {
-      names = EMPTY_ARRAY;
-      hashCode = 0;
-   }
-
-   public FQN(String name) throws IllegalArgumentException
-   {
-      if (name == null)
-      {
-         throw new IllegalArgumentException("Name cannot be null");
-      }
-      names = new String[]{name};
-      hashCode = 0;
-   }
-
-   public FQN(String[] names) throws IllegalArgumentException
-   {
-      if (names == null)
-      {
-         throw new IllegalArgumentException("Names array must not be null");
-      }
-      this.names = new String[names.length];
-      this.hashCode = 0;
-      for (int i = 0;i < names.length;i++)
-      {
-         String name = names[i];
-         if (name == null)
-         {
-            throw new IllegalArgumentException("One of the names is null");
-         }
-         this.names[i] = name;
-      }
-   }
-
-   public FQN(FQN base, String name) throws IllegalArgumentException
-   {
-      if (base == null)
-      {
-         throw new IllegalArgumentException("Base cannot be null");
-      }
-      if (name == null)
-      {
-         throw new IllegalArgumentException("Name cannot be null");
-      }
-      names = new String[base.names.length + 1];
-      hashCode = 0;
-      System.arraycopy(base.names, 0, names, 0, base.names.length);
-      names[base.names.length] = name;
-   }
-
-   public FQN(FQN base, String[] relative) throws IllegalArgumentException
-   {
-      if (base == null)
-      {
-         throw new IllegalArgumentException("Base cannot be null");
-      }
-      if (relative == null)
-      {
-         throw new IllegalArgumentException("Relative cannot be null");
-      }
-      names = new String[base.names.length + relative.length];
-      hashCode = 0;
-      System.arraycopy(base.names, 0, names, 0, base.names.length);
-      System.arraycopy(relative, 0, names, base.names.length, relative.length);
-   }
-
-   public FQN(FQN base, FQN relative) throws IllegalArgumentException
-   {
-      if (base == null)
-      {
-         throw new IllegalArgumentException("Base cannot be null");
-      }
-      if (relative == null)
-      {
-         throw new IllegalArgumentException("Relative cannot be null");
-      }
-      names = new String[base.names.length + relative.names.length];
-      hashCode = 0;
-      System.arraycopy(base.names, 0, names, 0, base.names.length);
-      System.arraycopy(relative.names, 0, names, base.names.length, relative.names.length);
-   }
-
-   public int size()
-   {
-      return names.length;
-   }
-
-   public String getName(int index) throws ArrayIndexOutOfBoundsException
-   {
-      return names[index];
-   }
-
-   public String[] toArray()
-   {
-      String[] copy = new String[names.length];
-      System.arraycopy(names, 0, copy, 0, copy.length);
-      return copy;
-   }
-
-   public boolean isChildOf(FQN parent) throws IllegalArgumentException
-   {
-      if (parent == null)
-      {
-         throw new IllegalArgumentException("Cannot compare to null");
-      }
-      if (names.length != parent.names.length + 1)
-      {
-         return false;
-      }
-      for (int i = 0;i < parent.names.length;i++)
-      {
-         Object name = parent.names[i];
-         if (!name.equals(names[i]))
-         {
-            return false;
-         }
-      }
-      return true;
-   }
-
-   public boolean equals(Object obj)
-   {
-      if (obj == this)
-      {
-         return true;
-      }
-      if (!(obj instanceof FQN))
-      {
-         return false;
-      }
-      FQN other = (FQN)obj;
-      if (other.names.length != names.length)
-      {
-         return false;
-      }
-      for (int i = 0;i < names.length;i++)
-      {
-         if (!names[i].equals(other.names[i]))
-         {
-            return false;
-         }
-      }
-      return true;
-   }
-
-   public int hashCode()
-   {
-      if (names.length == 0)
-      {
-         return 0;
-      }
-      if (hashCode == 0)
-      {
-         int tmp = 0;
-         for (int i = 0;i < names.length;i++)
-         {
-            tmp = tmp * 29 + names[i].hashCode();
-         }
-         hashCode = tmp;
-      }
-      return hashCode;
-   }
-
-   public String toString()
-   {
-      StringBuffer buffer = new StringBuffer();
-      for (int i = 0;i < names.length;i++)
-      {
-         buffer.append('/').append(names[i]);
-      }
-      return buffer.toString();
-   }
-
-   private void writeObject(ObjectOutputStream out) throws IOException
-   {
-      out.writeInt(names.length);
-      for (int i = 0; i < names.length; i++)
-      {
-         out.writeObject(names[i]);
-      }
-   }
-
-   private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
-   {
-      names = new String[in.readInt()];
-      for (int i = 0; i < names.length; i++)
-      {
-         names[i] = (String)in.readObject();
-      }
-   }
-}

Modified: trunk/core/src/main/org/jboss/portal/core/portlet/role/RolePortlet.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/portlet/role/RolePortlet.java	2006-09-29 22:00:38 UTC (rev 5295)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/role/RolePortlet.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -22,7 +22,7 @@
 package org.jboss.portal.core.portlet.role;
 
 import org.jboss.logging.Logger;
-import org.jboss.portal.common.context.DelegateContext;
+import org.jboss.portal.core.servlet.jsp.taglib.context.DelegateContext;
 import org.jboss.portal.core.portlet.PortletHelper;
 import org.jboss.portal.core.portlet.user.UserPortletConstants;
 import org.jboss.portal.core.servlet.jsp.PortalJsp;

Modified: trunk/core/src/main/org/jboss/portal/core/portlet/user/UserPortlet.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/portlet/user/UserPortlet.java	2006-09-29 22:00:38 UTC (rev 5295)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/user/UserPortlet.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -24,7 +24,7 @@
 import org.jboss.logging.Logger;
 import org.jboss.portal.api.node.PortalNode;
 import org.jboss.portal.api.node.PortalNodeURL;
-import org.jboss.portal.common.context.DelegateContext;
+import org.jboss.portal.core.servlet.jsp.taglib.context.DelegateContext;
 import org.jboss.portal.common.util.LocaleInfo;
 import org.jboss.portal.common.util.Tools;
 import org.jboss.portal.common.util.URLTools;

Modified: trunk/core/src/main/org/jboss/portal/core/servlet/jsp/PortalJsp.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/servlet/jsp/PortalJsp.java	2006-09-29 22:00:38 UTC (rev 5295)
+++ trunk/core/src/main/org/jboss/portal/core/servlet/jsp/PortalJsp.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -34,8 +34,8 @@
 import javax.servlet.jsp.HttpJspPage;
 
 import org.jboss.logging.Logger;
-import org.jboss.portal.common.context.Context;
-import org.jboss.portal.common.context.NamedContext;
+import org.jboss.portal.core.servlet.jsp.taglib.context.Context;
+import org.jboss.portal.core.servlet.jsp.taglib.context.NamedContext;
 
 /**
  * Any JSP page using the JBoss library should extend that class. It is done by

Modified: trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/IfTag.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/IfTag.java	2006-09-29 22:00:38 UTC (rev 5295)
+++ trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/IfTag.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -27,8 +27,8 @@
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.TagSupport;
 
-import org.jboss.portal.common.context.Context;
-import org.jboss.portal.common.context.NamedContext;
+import org.jboss.portal.core.servlet.jsp.taglib.context.Context;
+import org.jboss.portal.core.servlet.jsp.taglib.context.NamedContext;
 import org.jboss.portal.core.servlet.jsp.PortalJsp;
 
 /**

Modified: trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/IncludeTag.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/IncludeTag.java	2006-09-29 22:00:38 UTC (rev 5295)
+++ trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/IncludeTag.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -26,8 +26,8 @@
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.TagSupport;
 
-import org.jboss.portal.common.context.Context;
-import org.jboss.portal.common.context.NamedContext;
+import org.jboss.portal.core.servlet.jsp.taglib.context.Context;
+import org.jboss.portal.core.servlet.jsp.taglib.context.NamedContext;
 import org.jboss.portal.core.servlet.jsp.PortalJsp;
 
 /**

Modified: trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/IterateTag.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/IterateTag.java	2006-09-29 22:00:38 UTC (rev 5295)
+++ trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/IterateTag.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -27,8 +27,8 @@
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.TagSupport;
 
-import org.jboss.portal.common.context.Context;
-import org.jboss.portal.common.context.NamedContext;
+import org.jboss.portal.core.servlet.jsp.taglib.context.Context;
+import org.jboss.portal.core.servlet.jsp.taglib.context.NamedContext;
 import org.jboss.portal.core.servlet.jsp.PortalJsp;
 
 /**

Modified: trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/PortalLib.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/PortalLib.java	2006-09-29 22:00:38 UTC (rev 5295)
+++ trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/PortalLib.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -29,8 +29,8 @@
 import javax.portlet.PortletConfig;
 import javax.servlet.http.HttpServletRequest;
 
-import org.jboss.portal.common.context.Context;
-import org.jboss.portal.common.context.NamedContext;
+import org.jboss.portal.core.servlet.jsp.taglib.context.Context;
+import org.jboss.portal.core.servlet.jsp.taglib.context.NamedContext;
 import org.jboss.portal.core.servlet.jsp.PortalJsp;
 
 /**

Copied: trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context (from rev 5290, trunk/common/src/main/org/jboss/portal/common/context)

Modified: trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context/AbstractContext.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/context/AbstractContext.java	2006-09-29 03:49:00 UTC (rev 5290)
+++ trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context/AbstractContext.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -19,7 +19,7 @@
 * 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.common.context;
+package org.jboss.portal.core.servlet.jsp.taglib.context;
 
 import java.util.Iterator;
 

Modified: trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context/BuildException.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/context/BuildException.java	2006-09-29 03:49:00 UTC (rev 5290)
+++ trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context/BuildException.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -19,7 +19,7 @@
 * 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.common.context;
+package org.jboss.portal.core.servlet.jsp.taglib.context;
 
 /**
  * @author <a href="mailto:julien at jboss.org">Julien Viet</a>

Modified: trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context/ChildrenStrategy.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/context/ChildrenStrategy.java	2006-09-29 03:49:00 UTC (rev 5290)
+++ trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context/ChildrenStrategy.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -19,7 +19,7 @@
 * 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.common.context;
+package org.jboss.portal.core.servlet.jsp.taglib.context;
 
 import java.util.Collections;
 import java.util.Iterator;

Modified: trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context/Context.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/context/Context.java	2006-09-29 03:49:00 UTC (rev 5290)
+++ trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context/Context.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -19,7 +19,7 @@
 * 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.common.context;
+package org.jboss.portal.core.servlet.jsp.taglib.context;
 
 import java.util.Collections;
 import java.util.Iterator;

Modified: trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context/DelegateContext.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/context/DelegateContext.java	2006-09-29 03:49:00 UTC (rev 5290)
+++ trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context/DelegateContext.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -19,7 +19,7 @@
 * 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.common.context;
+package org.jboss.portal.core.servlet.jsp.taglib.context;
 
 import java.util.HashMap;
 import java.util.Iterator;
@@ -102,7 +102,7 @@
    }
 
    /**
-    * @see org.jboss.portal.common.context.Context#childIterator(java.lang.String)
+    * @see org.jboss.portal.core.servlet.jsp.taglib.context.Context#childIterator(java.lang.String)
     */
    public Iterator childIterator(String name)
    {
@@ -110,7 +110,7 @@
    }
 
    /**
-    * @see org.jboss.portal.common.context.Context#get(java.lang.String)
+    * @see org.jboss.portal.core.servlet.jsp.taglib.context.Context#get(java.lang.String)
     */
    public String get(String key)
    {
@@ -135,7 +135,7 @@
    }
 
    /**
-    * @see org.jboss.portal.common.context.Context#put(java.lang.String,
+    * @see org.jboss.portal.core.servlet.jsp.taglib.context.Context#put(java.lang.String,
     *      java.lang.String)
     */
    public Context put(String key, String value)

Modified: trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context/NamedContext.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/context/NamedContext.java	2006-09-29 03:49:00 UTC (rev 5290)
+++ trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/context/NamedContext.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -19,7 +19,7 @@
 * 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.common.context;
+package org.jboss.portal.core.servlet.jsp.taglib.context;
 
 /**
  * POJO for a context linked to a name

Modified: trunk/core/src/main/org/jboss/portal/test/core/I18nOutELTestCase.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/test/core/I18nOutELTestCase.java	2006-09-29 22:00:38 UTC (rev 5295)
+++ trunk/core/src/main/org/jboss/portal/test/core/I18nOutELTestCase.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -34,8 +34,8 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.cactus.JspTestCase;
-import org.jboss.portal.common.context.Context;
-import org.jboss.portal.common.context.DelegateContext;
+import org.jboss.portal.core.servlet.jsp.taglib.context.Context;
+import org.jboss.portal.core.servlet.jsp.taglib.context.DelegateContext;
 import org.jboss.portal.core.servlet.jsp.PortalJsp;
 import org.jboss.portal.core.servlet.jsp.taglib.PortalLib;
 import org.jboss.portal.portlet.impl.jsr168.PortletConfigImpl;

Modified: trunk/core/src/main/org/jboss/portal/test/core/IfTagTestCase.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/test/core/IfTagTestCase.java	2006-09-29 22:00:38 UTC (rev 5295)
+++ trunk/core/src/main/org/jboss/portal/test/core/IfTagTestCase.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -28,7 +28,7 @@
 
 import org.apache.cactus.ServletTestCase;
 import org.apache.cactus.WebResponse;
-import org.jboss.portal.common.context.DelegateContext;
+import org.jboss.portal.core.servlet.jsp.taglib.context.DelegateContext;
 
 /**
  * @author <a href="theute at jboss.org">Thomas Heute </a> $Revision$

Modified: trunk/core/src/main/org/jboss/portal/test/core/IterateTagTestCase.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/test/core/IterateTagTestCase.java	2006-09-29 22:00:38 UTC (rev 5295)
+++ trunk/core/src/main/org/jboss/portal/test/core/IterateTagTestCase.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -28,7 +28,7 @@
 
 import org.apache.cactus.ServletTestCase;
 import org.apache.cactus.WebResponse;
-import org.jboss.portal.common.context.DelegateContext;
+import org.jboss.portal.core.servlet.jsp.taglib.context.DelegateContext;
 import org.jboss.portal.core.servlet.jsp.PortalJsp;
 
 /**

Modified: trunk/core/src/main/org/jboss/portal/test/core/OutELTestCase.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/test/core/OutELTestCase.java	2006-09-29 22:00:38 UTC (rev 5295)
+++ trunk/core/src/main/org/jboss/portal/test/core/OutELTestCase.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -28,8 +28,8 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.cactus.JspTestCase;
-import org.jboss.portal.common.context.Context;
-import org.jboss.portal.common.context.DelegateContext;
+import org.jboss.portal.core.servlet.jsp.taglib.context.Context;
+import org.jboss.portal.core.servlet.jsp.taglib.context.DelegateContext;
 import org.jboss.portal.core.servlet.jsp.PortalJsp;
 import org.jboss.portal.core.servlet.jsp.taglib.PortalLib;
 

Modified: trunk/core/src/main/org/jboss/portal/test/core/TagLibTestCase.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/test/core/TagLibTestCase.java	2006-09-29 22:00:38 UTC (rev 5295)
+++ trunk/core/src/main/org/jboss/portal/test/core/TagLibTestCase.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -28,7 +28,7 @@
 
 import org.apache.cactus.JspTestCase;
 import org.apache.cactus.WebResponse;
-import org.jboss.portal.common.context.DelegateContext;
+import org.jboss.portal.core.servlet.jsp.taglib.context.DelegateContext;
 import org.jboss.portal.core.servlet.jsp.PortalJsp;
 
 /**

Modified: trunk/forums/src/main/org/jboss/portlet/forums/ForumsPortlet.java
===================================================================
--- trunk/forums/src/main/org/jboss/portlet/forums/ForumsPortlet.java	2006-09-29 22:00:38 UTC (rev 5295)
+++ trunk/forums/src/main/org/jboss/portlet/forums/ForumsPortlet.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -14,7 +14,7 @@
 import org.jboss.portlet.forums.command.CommandException;
 import org.jboss.portlet.forums.command.result.Result;
 import org.jboss.portlet.forums.command.result.ResultType;
-import org.jboss.portal.common.context.DelegateContext;
+import org.jboss.portal.core.servlet.jsp.taglib.context.DelegateContext;
 import org.jboss.portal.common.util.ProxyInfo;
 import org.jboss.portal.identity.PropertyMap;
 import org.jboss.portal.identity.User;

Copied: trunk/theme/src/main/org/jboss/portal/theme/FQN.java (from rev 5290, trunk/common/src/main/org/jboss/portal/common/FQN.java)
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/FQN.java	2006-09-29 03:49:00 UTC (rev 5290)
+++ trunk/theme/src/main/org/jboss/portal/theme/FQN.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -0,0 +1,240 @@
+/*
+* 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.theme;
+
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+
+/**
+ * Defines a reusable and generic full qualified name.
+ *
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision$
+ */
+public class FQN implements Serializable
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -4843390736196899215L;
+
+   private static final String[] EMPTY_ARRAY = new String[0];
+
+   /** The list of objects. */
+   protected String[] names; // julien : perhaps Serializable[] ?
+
+   /** The cached hashcode. */
+   private int hashCode;
+
+   public FQN()
+   {
+      names = EMPTY_ARRAY;
+      hashCode = 0;
+   }
+
+   public FQN(String name) throws IllegalArgumentException
+   {
+      if (name == null)
+      {
+         throw new IllegalArgumentException("Name cannot be null");
+      }
+      names = new String[]{name};
+      hashCode = 0;
+   }
+
+   public FQN(String[] names) throws IllegalArgumentException
+   {
+      if (names == null)
+      {
+         throw new IllegalArgumentException("Names array must not be null");
+      }
+      this.names = new String[names.length];
+      this.hashCode = 0;
+      for (int i = 0;i < names.length;i++)
+      {
+         String name = names[i];
+         if (name == null)
+         {
+            throw new IllegalArgumentException("One of the names is null");
+         }
+         this.names[i] = name;
+      }
+   }
+
+   public FQN(FQN base, String name) throws IllegalArgumentException
+   {
+      if (base == null)
+      {
+         throw new IllegalArgumentException("Base cannot be null");
+      }
+      if (name == null)
+      {
+         throw new IllegalArgumentException("Name cannot be null");
+      }
+      names = new String[base.names.length + 1];
+      hashCode = 0;
+      System.arraycopy(base.names, 0, names, 0, base.names.length);
+      names[base.names.length] = name;
+   }
+
+   public FQN(FQN base, String[] relative) throws IllegalArgumentException
+   {
+      if (base == null)
+      {
+         throw new IllegalArgumentException("Base cannot be null");
+      }
+      if (relative == null)
+      {
+         throw new IllegalArgumentException("Relative cannot be null");
+      }
+      names = new String[base.names.length + relative.length];
+      hashCode = 0;
+      System.arraycopy(base.names, 0, names, 0, base.names.length);
+      System.arraycopy(relative, 0, names, base.names.length, relative.length);
+   }
+
+   public FQN(FQN base, FQN relative) throws IllegalArgumentException
+   {
+      if (base == null)
+      {
+         throw new IllegalArgumentException("Base cannot be null");
+      }
+      if (relative == null)
+      {
+         throw new IllegalArgumentException("Relative cannot be null");
+      }
+      names = new String[base.names.length + relative.names.length];
+      hashCode = 0;
+      System.arraycopy(base.names, 0, names, 0, base.names.length);
+      System.arraycopy(relative.names, 0, names, base.names.length, relative.names.length);
+   }
+
+   public int size()
+   {
+      return names.length;
+   }
+
+   public String getName(int index) throws ArrayIndexOutOfBoundsException
+   {
+      return names[index];
+   }
+
+   public String[] toArray()
+   {
+      String[] copy = new String[names.length];
+      System.arraycopy(names, 0, copy, 0, copy.length);
+      return copy;
+   }
+
+   public boolean isChildOf(FQN parent) throws IllegalArgumentException
+   {
+      if (parent == null)
+      {
+         throw new IllegalArgumentException("Cannot compare to null");
+      }
+      if (names.length != parent.names.length + 1)
+      {
+         return false;
+      }
+      for (int i = 0;i < parent.names.length;i++)
+      {
+         Object name = parent.names[i];
+         if (!name.equals(names[i]))
+         {
+            return false;
+         }
+      }
+      return true;
+   }
+
+   public boolean equals(Object obj)
+   {
+      if (obj == this)
+      {
+         return true;
+      }
+      if (!(obj instanceof FQN))
+      {
+         return false;
+      }
+      FQN other = (FQN)obj;
+      if (other.names.length != names.length)
+      {
+         return false;
+      }
+      for (int i = 0;i < names.length;i++)
+      {
+         if (!names[i].equals(other.names[i]))
+         {
+            return false;
+         }
+      }
+      return true;
+   }
+
+   public int hashCode()
+   {
+      if (names.length == 0)
+      {
+         return 0;
+      }
+      if (hashCode == 0)
+      {
+         int tmp = 0;
+         for (int i = 0;i < names.length;i++)
+         {
+            tmp = tmp * 29 + names[i].hashCode();
+         }
+         hashCode = tmp;
+      }
+      return hashCode;
+   }
+
+   public String toString()
+   {
+      StringBuffer buffer = new StringBuffer();
+      for (int i = 0;i < names.length;i++)
+      {
+         buffer.append('/').append(names[i]);
+      }
+      return buffer.toString();
+   }
+
+   private void writeObject(ObjectOutputStream out) throws IOException
+   {
+      out.writeInt(names.length);
+      for (int i = 0; i < names.length; i++)
+      {
+         out.writeObject(names[i]);
+      }
+   }
+
+   private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
+   {
+      names = new String[in.readInt()];
+      for (int i = 0; i < names.length; i++)
+      {
+         names[i] = (String)in.readObject();
+      }
+   }
+}


Property changes on: trunk/theme/src/main/org/jboss/portal/theme/FQN.java
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Modified: trunk/theme/src/main/org/jboss/portal/theme/ServerRegistrationID.java
===================================================================
--- trunk/theme/src/main/org/jboss/portal/theme/ServerRegistrationID.java	2006-09-29 22:00:38 UTC (rev 5295)
+++ trunk/theme/src/main/org/jboss/portal/theme/ServerRegistrationID.java	2006-09-29 22:12:31 UTC (rev 5296)
@@ -21,8 +21,6 @@
 */
 package org.jboss.portal.theme;
 
-import org.jboss.portal.common.FQN;
-
 /**
  * Abstraction of a unique identifier for registered meta data.
  *




More information about the jboss-svn-commits mailing list