portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r406810 - in /portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl: BasePrincipalImpl.java GroupPrincipalImpl.java RolePrincipalImpl.java UserPrincipalImpl.java
Date Tue, 16 May 2006 03:16:44 GMT
Author: taylor
Date: Mon May 15 20:16:38 2006
New Revision: 406810

URL: http://svn.apache.org/viewcvs?rev=406810&view=rev
Log:
fix bug in hiearchical names where constructors were always setting the hiearchical names
flag to true regardless of spring configured setting

Modified:
    portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/BasePrincipalImpl.java
    portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/GroupPrincipalImpl.java
    portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/RolePrincipalImpl.java
    portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/UserPrincipalImpl.java

Modified: portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/BasePrincipalImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/BasePrincipalImpl.java?rev=406810&r1=406809&r2=406810&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/BasePrincipalImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/BasePrincipalImpl.java
Mon May 15 20:16:38 2006
@@ -23,7 +23,7 @@
  * 
  * @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
  */
-public class BasePrincipalImpl implements BasePrincipal
+public abstract class BasePrincipalImpl implements BasePrincipal
 {
     
     /** The version uid. */
@@ -43,10 +43,10 @@
      * @param name The principal name.
      * @param prefsRoot The preferences root node.
      */
-    public BasePrincipalImpl(String name, String prefsRoot)
+    public BasePrincipalImpl(String name, String prefsRoot, boolean hiearchicalNames)
     {
         this.name = name;
-        this.fullPath = getFullPathFromPrincipalName(name, prefsRoot);
+        this.fullPath = getFullPathFromPrincipalName(name, prefsRoot, hiearchicalNames);
     }
 
     /**
@@ -127,11 +127,7 @@
      * @param name The principal name.
      * @param prefsRoot The preferences root node.
      * @return The preferences full path / principal name.
-     */
-    public static String getFullPathFromPrincipalName(String name, String prefsRoot)
-    {
-        return getFullPathFromPrincipalName(name, prefsRoot, true);
-    }
+     */        
 
     /**
      * <p>
@@ -180,10 +176,11 @@
      * @param prefsRoot The preferences root node.
      * @return The principal name.
      */
-    public static String getPrincipalNameFromFullPath(String fullPath, String prefsRoot)
-    {
-        return getPrincipalNameFromFullPath(fullPath, prefsRoot, true);
-    }
+// MOVED TO DERVICED CLASSES    
+//    public static String getPrincipalNameFromFullPath(String fullPath, String prefsRoot)
+//    {
+//        return getPrincipalNameFromFullPath(fullPath, prefsRoot, true);
+//    }
 
     private boolean enabled = true;
 

Modified: portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/GroupPrincipalImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/GroupPrincipalImpl.java?rev=406810&r1=406809&r2=406810&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/GroupPrincipalImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/GroupPrincipalImpl.java
Mon May 15 20:16:38 2006
@@ -41,7 +41,7 @@
      */
     public GroupPrincipalImpl(String groupName)
     {
-        super(groupName, PREFS_GROUP_ROOT);
+        super(groupName, PREFS_GROUP_ROOT, hiearchicalNames);
     }
 
     /**
@@ -81,6 +81,11 @@
     public static String getPrincipalNameFromFullPath(String fullPath)
     {
         return BasePrincipalImpl.getPrincipalNameFromFullPath(fullPath, PREFS_GROUP_ROOT,
hiearchicalNames);
+    }
+
+    public static String getFullPathFromPrincipalName(String name, String prefsRoot)    
+    {
+        return BasePrincipalImpl.getFullPathFromPrincipalName(name, prefsRoot, hiearchicalNames);
     }
     
 }

Modified: portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/RolePrincipalImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/RolePrincipalImpl.java?rev=406810&r1=406809&r2=406810&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/RolePrincipalImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/RolePrincipalImpl.java
Mon May 15 20:16:38 2006
@@ -41,7 +41,7 @@
      */
     public RolePrincipalImpl(String roleName)
     {
-        super(roleName, PREFS_ROLE_ROOT);
+        super(roleName, PREFS_ROLE_ROOT, hiearchicalNames);
     }
 
     /**
@@ -83,4 +83,10 @@
     {
         return BasePrincipalImpl.getPrincipalNameFromFullPath(fullPath, PREFS_ROLE_ROOT,
hiearchicalNames);
     }
+    
+    public static String getFullPathFromPrincipalName(String name, String prefsRoot)    
+    {
+        return BasePrincipalImpl.getFullPathFromPrincipalName(name, prefsRoot, hiearchicalNames);
+    }
+    
 }

Modified: portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/UserPrincipalImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/UserPrincipalImpl.java?rev=406810&r1=406809&r2=406810&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/UserPrincipalImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/UserPrincipalImpl.java
Mon May 15 20:16:38 2006
@@ -42,7 +42,7 @@
      */
     public UserPrincipalImpl(String userName)
     {
-        super(userName, PREFS_USER_ROOT);   
+        super(userName, PREFS_USER_ROOT, hiearchicalNames);   
     }
 
     /**
@@ -83,4 +83,10 @@
     {
         return BasePrincipalImpl.getPrincipalNameFromFullPath(fullPath, PREFS_USER_ROOT,
hiearchicalNames);
     }
+
+    public static String getFullPathFromPrincipalName(String name, String prefsRoot)    
+    {
+        return BasePrincipalImpl.getFullPathFromPrincipalName(name, prefsRoot, hiearchicalNames);
+    }
+    
 }



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