portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r690959 - in /portals/jetspeed-2/portal/branches/security-refactoring: components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/ jetspeed-api/src/main/java/org/apache/jetspeed/security/ jetspeed-api/src/main/java/org/apa...
Date Mon, 01 Sep 2008 12:41:03 GMT
Author: ate
Date: Mon Sep  1 05:41:00 2008
New Revision: 690959

URL: http://svn.apache.org/viewvc?rev=690959&view=rev
Log:
Removing setter methods from JetspeedPrincipal for attributes which should only be set through
a JetspeedPrincipalStorageManager implementation. 
The JetspeedPrincipalManager needs to delegate the newPrincipal(name) to its StorageManager
indicating if the new principal should be (stored as) mapped or not.
All the other field values can be derived from that, either by the external (LDAP) StorageManager
or else the default (db) StorageManager.

Modified:
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/BaseJetspeedPrincipal.java
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipal.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/JetspeedPrincipalStorageManager.java

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/BaseJetspeedPrincipal.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/BaseJetspeedPrincipal.java?rev=690959&r1=690958&r2=690959&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/BaseJetspeedPrincipal.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/BaseJetspeedPrincipal.java
Mon Sep  1 05:41:00 2008
@@ -98,43 +98,8 @@
         return false;
     }
 
-    public void setCreationDate(Timestamp creationDate)
-    {
-        // TODO Auto-generated method stub
-    }
-
     public void setEnable(boolean enabled)
     {
         // TODO Auto-generated method stub
     }
-
-    public void setExtendable(boolean extendable)
-    {
-        // TODO Auto-generated method stub
-    }
-
-    public void setMapped(boolean mapped)
-    {
-        // TODO Auto-generated method stub
-    }
-
-    public void setModifiedDate(Timestamp modifiedDate)
-    {
-        // TODO Auto-generated method stub
-    }
-
-    public void setName(String name)
-    {
-        // TODO Auto-generated method stub
-    }
-
-    public void setReadonly(boolean readonly)
-    {
-        // TODO Auto-generated method stub
-    }
-
-    public void setRemovable(boolean removable)
-    {
-        // TODO Auto-generated method stub
-    }
 }

Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipal.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipal.java?rev=690959&r1=690958&r2=690959&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipal.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipal.java
Mon Sep  1 05:41:00 2008
@@ -29,35 +29,21 @@
 
     JetspeedPrincipalType getType();
 
-    void setName(String name);
-
     Timestamp getCreationDate();
 
-    void setCreationDate(Timestamp creationDate);
-
     Timestamp getModifiedDate();
 
-    void setModifiedDate(Timestamp modifiedDate);
-
     boolean isEnabled();
 
     void setEnable(boolean enabled);
 
     boolean isMapped(); // true if managed (mapped) through an external authorization provider
(e.g. LDAP)
 
-    void setMapped(boolean mapped);
-
     boolean isReadOnly(); // true if enabled may not be modified, nor mapped associations,
permissions and attributes
 
-    void setReadonly(boolean readonly);
-
     boolean isRemovable();
 
-    void setRemovable(boolean removable);
-
     boolean isExtendable(); // true if adding associations, permissions and attributes is
allowed
 
-    void setExtendable(boolean extendable);
-
     SecurityAttributes getSecurityAttributes();
 }

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=690959&r1=690958&r2=690959&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
Mon Sep  1 05:41:00 2008
@@ -41,6 +41,8 @@
 
     JetspeedPrincipal newPrincipal(String name);
 
+    JetspeedPrincipal newPrincipal(String name, boolean mapped);
+
     boolean principalExists(String name);
 
     JetspeedPrincipal getPrincipal(String name);

Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalStorageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalStorageManager.java?rev=690959&r1=690958&r2=690959&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalStorageManager.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalStorageManager.java
Mon Sep  1 05:41:00 2008
@@ -32,6 +32,7 @@
  */
 public interface JetspeedPrincipalStorageManager
 {
+    void newPrincipal(String name, boolean mapped);
     void addPrincipal(JetspeedPrincipal principal, Set<JetspeedPrincipalAssociationReference>
associations)
         throws PrincipalAlreadyExistsException, PrincipalAssociationRequiredException;
 



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