portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vku...@apache.org
Subject svn commit: r693078 - /portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/SecurityHelper.java
Date Mon, 08 Sep 2008 12:37:34 GMT
Author: vkumar
Date: Mon Sep  8 05:37:33 2008
New Revision: 693078

URL: http://svn.apache.org/viewvc?rev=693078&view=rev
Log:
Fixing broken methods

Modified:
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/SecurityHelper.java

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/SecurityHelper.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/SecurityHelper.java?rev=693078&r1=693077&r2=693078&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/SecurityHelper.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/SecurityHelper.java
Mon Sep  8 05:37:33 2008
@@ -20,7 +20,6 @@
 import java.security.PermissionCollection;
 import java.security.Principal;
 import java.util.Enumeration;
-import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
@@ -30,14 +29,6 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.jetspeed.security.impl.GroupPrincipalImpl;
-import org.apache.jetspeed.security.impl.RemotePrincipalImpl;
-import org.apache.jetspeed.security.impl.RolePrincipalImpl;
-import org.apache.jetspeed.security.impl.UserPrincipalImpl;
-import org.apache.jetspeed.security.om.InternalGroupPrincipal;
-import org.apache.jetspeed.security.om.InternalPrincipal;
-import org.apache.jetspeed.security.om.InternalRolePrincipal;
-import org.apache.jetspeed.security.om.InternalUserPrincipal;
 
 /**
  * <p>
@@ -150,22 +141,6 @@
 
     /**
      * <p>
-     * Utility method to create a subject.
-     * </p>
-     * 
-     * @param principalName The user principal name.
-     * @return The subject.
-     */
-    public static Subject createSubject(String principalName)
-    {
-        Principal principal = new UserPrincipalImpl(principalName);
-        Set principals = new PrincipalsSet();
-        principals.add(principal);
-        return new Subject(true, principals, new HashSet(), new HashSet());
-    }
-
-    /**
-     * <p>
      * Given a subject, finds all principals of the given classe for that subject. If no
principals
      * of the given class is not found, null is returned.
      * </p>
@@ -242,18 +217,4 @@
             log.debug("No permissions to add...");
         }
     }
-    
-    
-    public static Principal createPrincipalFromInternal(InternalPrincipal internal)
-    {
-        if (internal.getType().equals(UserPrincipal.PRINCIPAL_TYPE))
-            return new UserPrincipalImpl(internal.getName());
-        if (internal.getType().equals(RolePrincipal.PRINCIPAL_TYPE))
-            return new RolePrincipalImpl(internal.getName());
-        if (internal.getType().equals(GroupPrincipal.PRINCIPAL_TYPE))
-            return new GroupPrincipalImpl(internal.getName());
-        if (internal.getType().equals(RemotePrincipal.PRINCIPAL_TYPE))
-            return new RemotePrincipalImpl(internal.getName());
-        return null;
-    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message