maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r442146 - in /maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model: InstancePermissions.java UserManager.java impl/DefaultUserManager.java
Date Mon, 11 Sep 2006 09:53:53 GMT
Author: carlos
Date: Mon Sep 11 02:53:52 2006
New Revision: 442146

URL: http://svn.apache.org/viewvc?view=rev&rev=442146
Log:
Add Class and id to InstancePermissions

Modified:
    maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/InstancePermissions.java
    maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/UserManager.java
    maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/impl/DefaultUserManager.java

Modified: maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/InstancePermissions.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/InstancePermissions.java?view=diff&rev=442146&r1=442145&r2=442146
==============================================================================
--- maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/InstancePermissions.java
(original)
+++ maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/InstancePermissions.java
Mon Sep 11 02:53:52 2006
@@ -23,10 +23,18 @@
  */
 public class InstancePermissions
 {
+    private Class clazz;
+
+    private Object id;
+
     private User user;
 
     private boolean read, write, delete, execute, administer;
 
+    private Class parentClass;
+
+    private Object parentId;
+
     public InstancePermissions()
     {
     }
@@ -36,6 +44,34 @@
         this.user = user;
     }
 
+    public void setInstanceClass( Class clazz )
+    {
+        this.clazz = clazz;
+    }
+
+    /**
+     * Class of the object this permission applies to
+     * @return
+     */
+    public Class getInstanceClass()
+    {
+        return clazz;
+    }
+
+    public void setId( Object id )
+    {
+        this.id = id;
+    }
+
+    /**
+     * identifier of the object this permission applies to
+     * @return
+     */
+    public Object getId()
+    {
+        return id;
+    }
+
     public boolean isExecute()
     {
         return execute;
@@ -94,6 +130,26 @@
     public void setUser( User user )
     {
         this.user = user;
+    }
+
+    public void setParentClass( Class parentClass )
+    {
+        this.parentClass = parentClass;
+    }
+
+    public Class getParentClass()
+    {
+        return parentClass;
+    }
+
+    public void setParentId( Object parentId )
+    {
+        this.parentId = parentId;
+    }
+
+    public Object getParentId()
+    {
+        return parentId;
     }
 
     public String toString()

Modified: maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/UserManager.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/UserManager.java?view=diff&rev=442146&r1=442145&r2=442146
==============================================================================
--- maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/UserManager.java
(original)
+++ maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/UserManager.java
Mon Sep 11 02:53:52 2006
@@ -228,14 +228,12 @@
     List getUsersInstancePermissions( Class clazz, Object id );
 
     /**
-     * Set all users instance permissions for an object
+     * Set users instance permissions for a bunch of objects.
      * 
-     * @param clazz {@link Class} of the object
-     * @param id identifier of the object
      * @param permissions {@link Collection} <{@link InstancePermissions}> .
      * Each {@link InstancePermissions}.user only needs to have username, no other properties
are required.
      */
-    void setUsersInstancePermissions( Class clazz, Object id, Collection permissions );
+    void setUsersInstancePermissions( Collection permissions );
 
     /**
      * Get current user

Modified: maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/impl/DefaultUserManager.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/impl/DefaultUserManager.java?view=diff&rev=442146&r1=442145&r2=442146
==============================================================================
--- maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/impl/DefaultUserManager.java
(original)
+++ maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/impl/DefaultUserManager.java
Mon Sep 11 02:53:52 2006
@@ -335,7 +335,7 @@
     /**
      * Do nothing
      */
-    public void setUsersInstancePermissions( Class clazz, Object id, Collection permissions
)
+    public void setUsersInstancePermissions( Collection permissions )
     {
     }
 



Mime
View raw message