Return-Path: Delivered-To: apmail-portals-jetspeed-dev-archive@www.apache.org Received: (qmail 12453 invoked from network); 5 Sep 2008 16:50:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Sep 2008 16:50:06 -0000 Received: (qmail 17137 invoked by uid 500); 5 Sep 2008 16:50:04 -0000 Delivered-To: apmail-portals-jetspeed-dev-archive@portals.apache.org Received: (qmail 17114 invoked by uid 500); 5 Sep 2008 16:50:04 -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 17103 invoked by uid 99); 5 Sep 2008 16:50:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Sep 2008 09:50:04 -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; Fri, 05 Sep 2008 16:49:13 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A1118238896C; Fri, 5 Sep 2008 09:49:44 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r692486 - in /portals/jetspeed-2/portal/branches/security-refactoring: components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/ components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/ jetspeed-... Date: Fri, 05 Sep 2008 16:49:43 -0000 To: jetspeed-dev@portals.apache.org From: woonsan@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080905164944.A1118238896C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: woonsan Date: Fri Sep 5 09:49:42 2008 New Revision: 692486 URL: http://svn.apache.org/viewvc?rev=692486&view=rev Log: Flattening the Principal API. Removed for-loop-copying blocks from role/group manager by using generic. Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/BaseJetspeedPrincipalManager.java portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/GroupManagerImpl.java portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/RoleManagerImpl.java portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManager.java portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalAccessManager.java portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalManagerSPI.java Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/BaseJetspeedPrincipalManager.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/BaseJetspeedPrincipalManager.java?rev=692486&r1=692485&r2=692486&view=diff ============================================================================== --- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/BaseJetspeedPrincipalManager.java (original) +++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/BaseJetspeedPrincipalManager.java Fri Sep 5 09:49:42 2008 @@ -43,7 +43,7 @@ /** * @version $Id$ */ -public abstract class BaseJetspeedPrincipalManager implements JetspeedPrincipalManagerSPI +public abstract class BaseJetspeedPrincipalManager implements JetspeedPrincipalManagerSPI { private static class AssociationHandlerKey { @@ -80,11 +80,11 @@ private JetspeedPrincipalType principalType; private Map assHandlers = new HashMap(); private Map reqAssociations = new HashMap(); - private JetspeedPrincipalAccessManager jpam; + private JetspeedPrincipalAccessManager jpam; private JetspeedPrincipalStorageManager jpsm; private JetspeedPrincipalPermissionStorageManager jppsm; - public BaseJetspeedPrincipalManager(JetspeedPrincipalType principalType, JetspeedPrincipalAccessManager jpam, + public BaseJetspeedPrincipalManager(JetspeedPrincipalType principalType, JetspeedPrincipalAccessManager jpam, JetspeedPrincipalStorageManager jpsm, JetspeedPrincipalPermissionStorageManager jppsm) { @@ -116,7 +116,7 @@ return jpam.principalExists(name, principalType); } - public JetspeedPrincipal getPrincipal(String name) + public T getPrincipal(String name) { return jpam.getPrincipal(name, principalType); } @@ -126,12 +126,12 @@ return jpam.getPrincipalNames(nameFilter, principalType); } - public List getPrincipals(String nameFilter) + public List getPrincipals(String nameFilter) { return jpam.getPrincipals(nameFilter, principalType); } - public List getPrincipalsByAttribute(String attributeName, String attributeValue) + public List getPrincipalsByAttribute(String attributeName, String attributeValue) { return jpam.getPrincipalsByAttribute(attributeName, attributeValue, principalType); } @@ -145,7 +145,7 @@ jpsm.removePrincipal(principal); } - public final List getAssociatedFrom(String principalFromName, JetspeedPrincipalType from, String associationName) + public final List getAssociatedFrom(String principalFromName, JetspeedPrincipalType from, String associationName) { if ( !assHandlers.containsKey(new AssociationHandlerKey(from.getName(), principalType.getName(), associationName))) { @@ -175,7 +175,7 @@ return jpam.getAssociatedNamesTo(principalToName, principalType, to, associationName); } - public final List getAssociatedTo(String principalToName, JetspeedPrincipalType to, String associationName) + public final List getAssociatedTo(String principalToName, JetspeedPrincipalType to, String associationName) { if ( !assHandlers.containsKey(new AssociationHandlerKey(principalType.getName(), to.getName(), associationName))) { Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/GroupManagerImpl.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/GroupManagerImpl.java?rev=692486&r1=692485&r2=692486&view=diff ============================================================================== --- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/GroupManagerImpl.java (original) +++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/GroupManagerImpl.java Fri Sep 5 09:49:42 2008 @@ -16,16 +16,14 @@ */ package org.apache.jetspeed.security.impl; -import java.util.ArrayList; import java.util.Collection; -import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.jetspeed.security.Group; import org.apache.jetspeed.security.GroupManager; -import org.apache.jetspeed.security.JetspeedPrincipal; import org.apache.jetspeed.security.JetspeedPrincipalAssociationType; +import org.apache.jetspeed.security.JetspeedPrincipalManager; import org.apache.jetspeed.security.JetspeedPrincipalType; import org.apache.jetspeed.security.PrincipalAlreadyExistsException; import org.apache.jetspeed.security.PrincipalAssociationNotAllowedException; @@ -33,6 +31,7 @@ import org.apache.jetspeed.security.PrincipalNotFoundException; import org.apache.jetspeed.security.PrincipalReadOnlyException; import org.apache.jetspeed.security.PrincipalUpdateException; +import org.apache.jetspeed.security.RoleManager; import org.apache.jetspeed.security.SecurityException; import org.apache.jetspeed.security.User; import org.apache.jetspeed.security.UserManager; @@ -57,7 +56,7 @@ * @author David Sean Taylor * @version $Id$ */ -public class GroupManagerImpl extends BaseJetspeedPrincipalManager implements GroupManager +public class GroupManagerImpl extends BaseJetspeedPrincipalManager implements GroupManager { /** The logger. */ @@ -67,14 +66,14 @@ private JetspeedPrincipalType roleType; private UserManager userManager; - public GroupManagerImpl(JetspeedPrincipalType principalType, JetspeedPrincipalType userType, JetspeedPrincipalType roleType, - JetspeedPrincipalAccessManager jpam, JetspeedPrincipalStorageManager jpsm, + public GroupManagerImpl(JetspeedPrincipalType principalType, + JetspeedPrincipalAccessManager jpam, JetspeedPrincipalStorageManager jpsm, JetspeedPrincipalPermissionStorageManager jppsm, - UserManager userManager) + UserManager userManager, RoleManager roleManager) { super(principalType, jpam, jpsm, jppsm); - this.userType = userType; - this.roleType = roleType; + this.userType = ((JetspeedPrincipalManager) userManager).getPrincipalType(); + this.roleType = ((JetspeedPrincipalManager) roleManager).getPrincipalType(); this.userManager = userManager; } @@ -172,12 +171,7 @@ public Collection getGroupsForUser(String username) throws SecurityException { - ArrayList groups = new ArrayList(); - for (JetspeedPrincipal principal : super.getAssociatedFrom(username, userType, JetspeedPrincipalAssociationType.IS_PART_OF)) - { - groups.add((Group)principal); - } - return groups; + return super.getAssociatedFrom(username, userType, JetspeedPrincipalAssociationType.IS_PART_OF); } /** @@ -186,12 +180,7 @@ public Collection getGroupsInRole(String roleName) throws SecurityException { - ArrayList groups = new ArrayList(); - for (JetspeedPrincipal principal : super.getAssociatedTo(roleName, roleType, JetspeedPrincipalAssociationType.IS_PART_OF)) - { - groups.add((Group)principal); - } - return groups; + return super.getAssociatedTo(roleName, roleType, JetspeedPrincipalAssociationType.IS_PART_OF); } /** @@ -255,15 +244,7 @@ */ public Collection getGroups(String filter) throws SecurityException { - Collection groups = new ArrayList(); - List principals = super.getPrincipals(filter); - - for (JetspeedPrincipal principal : principals) - { - groups.add((Group) principal); - } - - return groups; + return super.getPrincipals(filter); } /** @@ -302,12 +283,12 @@ } } - public JetspeedPrincipal newPrincipal(String name, boolean mapped) + public Group newPrincipal(String name, boolean mapped) { return newGroup(name, mapped); } - public JetspeedPrincipal newTransientPrincipal(String name) + public Group newTransientPrincipal(String name) { return newTransientGroup(name); } Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/RoleManagerImpl.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/RoleManagerImpl.java?rev=692486&r1=692485&r2=692486&view=diff ============================================================================== --- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/RoleManagerImpl.java (original) +++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/RoleManagerImpl.java Fri Sep 5 09:49:42 2008 @@ -16,7 +16,6 @@ */ package org.apache.jetspeed.security.impl; -import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.prefs.Preferences; @@ -25,7 +24,6 @@ import org.apache.commons.logging.LogFactory; import org.apache.jetspeed.security.Group; import org.apache.jetspeed.security.GroupManager; -import org.apache.jetspeed.security.JetspeedPrincipal; import org.apache.jetspeed.security.JetspeedPrincipalAssociationType; import org.apache.jetspeed.security.JetspeedPrincipalManager; import org.apache.jetspeed.security.JetspeedPrincipalType; @@ -63,7 +61,7 @@ * @author David Sean Taylor * @version $Id$ */ -public class RoleManagerImpl extends BaseJetspeedPrincipalManager implements RoleManager +public class RoleManagerImpl extends BaseJetspeedPrincipalManager implements RoleManager { /** The logger. */ private static final Log log = LogFactory.getLog(RoleManagerImpl.class); @@ -74,7 +72,7 @@ private GroupManager groupManager; public RoleManagerImpl(JetspeedPrincipalType principalType, - JetspeedPrincipalAccessManager jpam, JetspeedPrincipalStorageManager jpsm, + JetspeedPrincipalAccessManager jpam, JetspeedPrincipalStorageManager jpsm, JetspeedPrincipalPermissionStorageManager jppsm, UserManager userManager, GroupManager groupManager) { @@ -179,12 +177,7 @@ */ public List getRolesForUser(String username) throws SecurityException { - ArrayList roles = new ArrayList(); - for (JetspeedPrincipal principal : super.getAssociatedFrom(username, userType, JetspeedPrincipalAssociationType.IS_PART_OF)) - { - roles.add((Role)principal); - } - return roles; + return super.getAssociatedFrom(username, userType, JetspeedPrincipalAssociationType.IS_PART_OF); } /** @@ -192,12 +185,7 @@ */ public List getRolesInGroup(String groupName) throws SecurityException { - ArrayList roles = new ArrayList(); - for (JetspeedPrincipal principal : super.getAssociatedFrom(groupName, groupType, JetspeedPrincipalAssociationType.IS_PART_OF)) - { - roles.add((Role)principal); - } - return roles; + return super.getAssociatedFrom(groupName, groupType, JetspeedPrincipalAssociationType.IS_PART_OF); } /** @@ -311,15 +299,7 @@ */ public Collection getRoles(String filter) throws SecurityException { - Collection roles = new ArrayList(); - List principals = super.getPrincipals(filter); - - for (JetspeedPrincipal principal : principals) - { - roles.add((Role) principal); - } - - return roles; + return super.getPrincipals(filter); } /** @@ -361,7 +341,7 @@ /* (non-Javadoc) * @see org.apache.jetspeed.security.JetspeedPrincipalManager#newPrincipal(java.lang.String, boolean) */ - public JetspeedPrincipal newPrincipal(String name, boolean mapped) + public Role newPrincipal(String name, boolean mapped) { return newRole(name, mapped); } @@ -369,7 +349,7 @@ /* (non-Javadoc) * @see org.apache.jetspeed.security.JetspeedPrincipalManager#newTransientPrincipal(java.lang.String) */ - public JetspeedPrincipal newTransientPrincipal(String name) + public Role newTransientPrincipal(String name) { return newTransientRole(name); } Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java?rev=692486&r1=692485&r2=692486&view=diff ============================================================================== --- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java (original) +++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java Fri Sep 5 09:49:42 2008 @@ -33,7 +33,6 @@ import org.apache.jetspeed.security.PrincipalNotFoundException; import org.apache.jetspeed.security.PrincipalNotRemovableException; import org.apache.jetspeed.security.PrincipalUpdateException; -import org.apache.jetspeed.security.User; import org.apache.jetspeed.security.spi.JetspeedPermissionStorageManager; import org.apache.jetspeed.security.spi.JetspeedPrincipalAccessManager; import org.apache.jetspeed.security.spi.JetspeedPrincipalAssociationStorageManager; @@ -44,84 +43,96 @@ /** * @version $Id$ */ -public class JetspeedSecurityPersistenceManager implements JetspeedPrincipalAccessManager, +public class JetspeedSecurityPersistenceManager implements JetspeedPrincipalAccessManager, JetspeedPrincipalStorageManager, UserPasswordCredentialStorageManager, JetspeedPrincipalAssociationStorageManager, JetspeedPrincipalPermissionStorageManager, JetspeedPermissionStorageManager { - // - // JetspeedPrincipalAccessManager interface implementation - // - public List getAssociatedFrom(String principalName, JetspeedPrincipalType type, - String associationName) + + public List getAssociatedFrom(String principalFromName, + JetspeedPrincipalType from, JetspeedPrincipalType to, + String associationName) { // TODO Auto-generated method stub return null; } - public List getAssociatedFrom(Long principalId, JetspeedPrincipalType type, - String associationName) + public List getAssociatedFrom(Long principalFromId, + JetspeedPrincipalType from, JetspeedPrincipalType to, + String associationName) { // TODO Auto-generated method stub return null; } - public List getAssociatedNamesFrom(String principalName, JetspeedPrincipalType type, String associationName) + public List getAssociatedNamesFrom(String principalFromName, + JetspeedPrincipalType from, JetspeedPrincipalType to, + String associationName) { // TODO Auto-generated method stub return null; } - public List getAssociatedNamesFrom(Long principalId, JetspeedPrincipalType type, String associationName) + public List getAssociatedNamesFrom(Long principalFromId, + JetspeedPrincipalType from, JetspeedPrincipalType to, + String associationName) { // TODO Auto-generated method stub return null; } - public List getAssociatedNamesTo(String principalName, JetspeedPrincipalType type, String associationName) + public List getAssociatedNamesTo(String principalToName, + JetspeedPrincipalType from, JetspeedPrincipalType to, + String associationName) { // TODO Auto-generated method stub return null; } - public List getAssociatedNamesTo(Long principalId, JetspeedPrincipalType type, String associationName) + public List getAssociatedNamesTo(Long principalToId, + JetspeedPrincipalType from, JetspeedPrincipalType to, + String associationName) { // TODO Auto-generated method stub return null; } - public List getAssociatedTo(String principalName, JetspeedPrincipalType type, - String associationName) + public List getAssociatedTo(String principalToName, + JetspeedPrincipalType from, JetspeedPrincipalType to, + String associationName) { // TODO Auto-generated method stub return null; } - public List getAssociatedTo(Long principalId, JetspeedPrincipalType type, String associationName) + public List getAssociatedTo(Long principalToId, + JetspeedPrincipalType from, JetspeedPrincipalType to, + String associationName) { // TODO Auto-generated method stub return null; } - public JetspeedPrincipal getPrincipal(Long id) + public T getPrincipal(Long id) { // TODO Auto-generated method stub return null; } - public JetspeedPrincipal getPrincipal(String principalName, JetspeedPrincipalType type) + public T getPrincipal(String principalName, JetspeedPrincipalType type) { // TODO Auto-generated method stub return null; } - public List getPrincipalNames(String nameFilter, JetspeedPrincipalType type) + public List getPrincipalNames(String nameFilter, + JetspeedPrincipalType type) { // TODO Auto-generated method stub return null; } - public List getPrincipals(String nameFilter, JetspeedPrincipalType type) + public List getPrincipals(String nameFilter, JetspeedPrincipalType type) { // TODO Auto-generated method stub return null; @@ -133,26 +144,35 @@ return null; } - public List getPrincipals(JetspeedPermission permission, JetspeedPrincipalType type) + public List getPrincipals(JetspeedPermission permission, + JetspeedPrincipalType type) + { + // TODO Auto-generated method stub + return null; + } + + public List getPrincipalsByAttribute(String attributeName, + String attributeValue, JetspeedPrincipalType type) { // TODO Auto-generated method stub return null; } - public boolean principalExists(String principalName, JetspeedPrincipalType type) + public boolean principalExists(String principalName, + JetspeedPrincipalType type) { // TODO Auto-generated method stub return false; } - // - // JetspeedPrincipalStorageManager interface implementation - // - public void addPrincipal(JetspeedPrincipal principal, Set associations) - throws PrincipalAlreadyExistsException, - PrincipalAssociationRequiredException + public void addPrincipal(JetspeedPrincipal principal, + Set associations) + throws PrincipalAssociationNotAllowedException, + PrincipalAlreadyExistsException, + PrincipalAssociationRequiredException { // TODO Auto-generated method stub + } public boolean isMapped() @@ -161,88 +181,92 @@ return false; } - public void removePrincipal(JetspeedPrincipal principal) throws PrincipalNotFoundException, - PrincipalNotRemovableException, DependentPrincipalException + public void removePrincipal(JetspeedPrincipal principal) + throws PrincipalNotFoundException, PrincipalNotRemovableException, + DependentPrincipalException { // TODO Auto-generated method stub + } - public void updatePrincipal(JetspeedPrincipal principal) throws PrincipalUpdateException, - PrincipalNotFoundException + public void updatePrincipal(JetspeedPrincipal principal) + throws PrincipalUpdateException, PrincipalNotFoundException { // TODO Auto-generated method stub + } - // - // JetspeedPrincipalStorageManager interface implementation - // - public void addCredential(PasswordCredential credential, User user) + public void addCredential(PasswordCredential credential) { // TODO Auto-generated method stub + } public void removeCredential(PasswordCredential credential) { // TODO Auto-generated method stub + } public void updateCredential(PasswordCredential credential) { // TODO Auto-generated method stub + } - // - // JetspeedPrincipalAssociationStorageManager interface implementation - // - public void addAssociation(JetspeedPrincipal from, JetspeedPrincipal to, String associationName) - throws PrincipalNotFoundException, - PrincipalAssociationUnsupportedException, - PrincipalAssociationNotAllowedException + public void addAssociation(JetspeedPrincipal from, JetspeedPrincipal to, + String associationName) throws PrincipalNotFoundException, + PrincipalAssociationUnsupportedException, + PrincipalAssociationNotAllowedException { // TODO Auto-generated method stub + } - public void removeAssociation(JetspeedPrincipal from, JetspeedPrincipal to, String associationName) - throws PrincipalNotFoundException, - PrincipalAssociationUnsupportedException, - PrincipalAssociationRequiredException + public void removeAssociation(JetspeedPrincipal from, JetspeedPrincipal to, + String associationName) throws PrincipalNotFoundException, + PrincipalAssociationUnsupportedException, + PrincipalAssociationRequiredException { // TODO Auto-generated method stub + } - // - // JetspeedPrincipalPermissionStorageManager interface implementation - // - public void grantPermission(JetspeedPrincipal principal, JetspeedPermission permission) + public void grantPermission(JetspeedPrincipal principal, + JetspeedPermission permission) { // TODO Auto-generated method stub + } public void revokeAll(JetspeedPrincipal principal) { // TODO Auto-generated method stub + } - public void revokePermission(JetspeedPrincipal principal, JetspeedPermission permission) + public void revokePermission(JetspeedPrincipal principal, + JetspeedPermission permission) { // TODO Auto-generated method stub + } - // - // JetspeedPermissionStorageManager interface implementation - // public void addPermission(PortalResourcePermission p) { // TODO Auto-generated method stub + } public void removePermission(JetspeedPermission p) { // TODO Auto-generated method stub + } public void updatePermission(JetspeedPermission p) { // TODO Auto-generated method stub + } } Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManager.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManager.java?rev=692486&r1=692485&r2=692486&view=diff ============================================================================== --- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManager.java (original) +++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManager.java Fri Sep 5 09:49:42 2008 @@ -24,29 +24,29 @@ /** * @version $Id$ */ -public interface JetspeedPrincipalManager extends JetspeedPrincipalStorageManager, JetspeedPrincipalPermissionStorageManager +public interface JetspeedPrincipalManager extends JetspeedPrincipalStorageManager, JetspeedPrincipalPermissionStorageManager { JetspeedPrincipalType getPrincipalType(); - boolean principalExists(String name); + boolean principalExists(String name); - JetspeedPrincipal getPrincipal(String name); + T getPrincipal(String name); List getPrincipalNames(String nameFilter); - List getPrincipals(String nameFilter); + List getPrincipals(String nameFilter); - List getPrincipalsByAttribute(String attributeName, String attributeValue); + List getPrincipalsByAttribute(String attributeName, String attributeValue); - JetspeedPrincipal newPrincipal(String name, boolean mapped); + T newPrincipal(String name, boolean mapped); - JetspeedPrincipal newTransientPrincipal(String name); + T newTransientPrincipal(String name); void removePrincipal(String name) throws PrincipalNotFoundException, PrincipalNotRemovableException, DependentPrincipalException; - List getAssociatedFrom(String principalFromName, JetspeedPrincipalType from, String associationName); + List getAssociatedFrom(String principalFromName, JetspeedPrincipalType from, String associationName); - List getAssociatedTo(String principalToName, JetspeedPrincipalType to, String associationName); + List getAssociatedTo(String principalToName, JetspeedPrincipalType to, String associationName); List getAssociatedNamesFrom(String principalFromName, JetspeedPrincipalType from, String associationName); Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalAccessManager.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalAccessManager.java?rev=692486&r1=692485&r2=692486&view=diff ============================================================================== --- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalAccessManager.java (original) +++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalAccessManager.java Fri Sep 5 09:49:42 2008 @@ -25,27 +25,27 @@ /** * @version $Id$ */ -public interface JetspeedPrincipalAccessManager +public interface JetspeedPrincipalAccessManager { boolean principalExists(String principalName, JetspeedPrincipalType type); - JetspeedPrincipal getPrincipal(Long id); + T getPrincipal(Long id); - JetspeedPrincipal getPrincipal(String principalName, JetspeedPrincipalType type); + T getPrincipal(String principalName, JetspeedPrincipalType type); - List getPrincipals(String nameFilter, JetspeedPrincipalType type); + List getPrincipals(String nameFilter, JetspeedPrincipalType type); - List getPrincipalsByAttribute(String attributeName, String attributeValue, JetspeedPrincipalType type); + List getPrincipalsByAttribute(String attributeName, String attributeValue, JetspeedPrincipalType type); List getPrincipalNames(String nameFilter, JetspeedPrincipalType type); - List getAssociatedFrom(String principalFromName, JetspeedPrincipalType from, JetspeedPrincipalType to, String associationName); + List getAssociatedFrom(String principalFromName, JetspeedPrincipalType from, JetspeedPrincipalType to, String associationName); - List getAssociatedFrom(Long principalFromId, JetspeedPrincipalType from, JetspeedPrincipalType to, String associationName); + List getAssociatedFrom(Long principalFromId, JetspeedPrincipalType from, JetspeedPrincipalType to, String associationName); - List getAssociatedTo(String principalToName, JetspeedPrincipalType from, JetspeedPrincipalType to, String associationName); + List getAssociatedTo(String principalToName, JetspeedPrincipalType from, JetspeedPrincipalType to, String associationName); - List getAssociatedTo(Long principalToId, JetspeedPrincipalType from, JetspeedPrincipalType to, String associationName); + List getAssociatedTo(Long principalToId, JetspeedPrincipalType from, JetspeedPrincipalType to, String associationName); List getAssociatedNamesFrom(String principalFromName, JetspeedPrincipalType from, JetspeedPrincipalType to, String associationName); Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalManagerSPI.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalManagerSPI.java?rev=692486&r1=692485&r2=692486&view=diff ============================================================================== --- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalManagerSPI.java (original) +++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalManagerSPI.java Fri Sep 5 09:49:42 2008 @@ -17,6 +17,7 @@ package org.apache.jetspeed.security.spi; +import org.apache.jetspeed.security.JetspeedPrincipal; import org.apache.jetspeed.security.JetspeedPrincipalAssociationHandler; import org.apache.jetspeed.security.JetspeedPrincipalManager; @@ -24,7 +25,7 @@ * @version $Id$ * */ -public interface JetspeedPrincipalManagerSPI extends JetspeedPrincipalManager +public interface JetspeedPrincipalManagerSPI extends JetspeedPrincipalManager { void addAssociationHandler(JetspeedPrincipalAssociationHandler ah); } --------------------------------------------------------------------- To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org For additional commands, e-mail: jetspeed-dev-help@portals.apache.org