Return-Path: Delivered-To: apmail-portals-jetspeed-dev-archive@www.apache.org Received: (qmail 39076 invoked from network); 8 Sep 2008 12:38:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Sep 2008 12:38:27 -0000 Received: (qmail 80515 invoked by uid 500); 8 Sep 2008 12:38:24 -0000 Delivered-To: apmail-portals-jetspeed-dev-archive@portals.apache.org Received: (qmail 80489 invoked by uid 500); 8 Sep 2008 12:38:24 -0000 Mailing-List: contact jetspeed-dev-help@portals.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jetspeed Developers List" Delivered-To: mailing list jetspeed-dev@portals.apache.org Received: (qmail 80478 invoked by uid 99); 8 Sep 2008 12:38:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Sep 2008 05:38:24 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Sep 2008 12:37:34 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id EE3812388892; Mon, 8 Sep 2008 05:37:35 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: jetspeed-dev@portals.apache.org From: vkumar@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080908123735.EE3812388892@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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; /** *

@@ -150,22 +141,6 @@ /** *

- * Utility method to create a subject. - *

- * - * @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()); - } - - /** - *

* 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. *

@@ -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