[jboss-svn-commits] JBoss Portal SVN: r5339 - trunk/core/src/main/org/jboss/portal/core/impl/model/portal

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Oct 6 05:31:01 EDT 2006


Author: julien at jboss.com
Date: 2006-10-06 05:30:56 -0400 (Fri, 06 Oct 2006)
New Revision: 5339

Removed:
   trunk/core/src/main/org/jboss/portal/core/impl/model/portal/Policy.java
   trunk/core/src/main/org/jboss/portal/core/impl/model/portal/UserIdentity.java
Log:
removed obsolete code

Deleted: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/Policy.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/Policy.java	2006-10-06 00:11:45 UTC (rev 5338)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/Policy.java	2006-10-06 09:30:56 UTC (rev 5339)
@@ -1,71 +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.core.impl.model.portal;
-
-import org.jboss.portal.core.model.portal.DuplicatePortalObjectException;
-
-/**
- * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision$
- */
-public interface Policy
-{
-
-   PortalImpl getDefaultPortal(ContextImpl context);
-
-   Policy SHARED = new Policy()
-   {
-      public PortalImpl getDefaultPortal(ContextImpl context)
-      {
-         return (PortalImpl)context.getPortal("default");
-      }
-   };
-
-   Policy PER_USER = new Policy()
-   {
-      public PortalImpl getDefaultPortal(ContextImpl context)
-      {
-         String userId = UserIdentity.getUserId();
-
-         if (userId != null)
-         {
-            PortalImpl portal = (PortalImpl)context.getPortal(userId);
-            if (portal == null)
-            {
-               try
-               {
-                  portal = (PortalImpl)context.createPortal(userId);
-               }
-               catch (DuplicatePortalObjectException e)
-               {
-                  e.printStackTrace();
-               }
-            }
-            return portal;
-         }
-         else
-         {
-            return null;
-         }
-      }
-   };
-}

Deleted: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/UserIdentity.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/UserIdentity.java	2006-10-06 00:11:45 UTC (rev 5338)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/UserIdentity.java	2006-10-06 09:30:56 UTC (rev 5339)
@@ -1,43 +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.core.impl.model.portal;
-
-/**
- * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision$
- */
-public class UserIdentity
-{
-
-   private static final ThreadLocal local = new ThreadLocal();
-
-   public static final void setUserId(String userId)
-   {
-      local.set(userId);
-   }
-
-   public static final String getUserId()
-   {
-      return (String)local.get();
-   }
-
-}




More information about the jboss-svn-commits mailing list