directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject [5/6] git commit: o Added the toString() method o Removed some compiler warnings o Added some javadoc
Date Wed, 29 Oct 2014 16:10:29 GMT
o Added the toString() method
o Removed some compiler warnings
o Added some javadoc

Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/commit/2ae41291
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/2ae41291
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/2ae41291

Branch: refs/heads/master
Commit: 2ae41291f27bf9628e31340a8e9ed0479b451f90
Parents: a4c5e21
Author: Emmanuel L├ęcharny <elecharny@symas.com>
Authored: Wed Oct 29 15:11:18 2014 +0100
Committer: Emmanuel L├ęcharny <elecharny@symas.com>
Committed: Wed Oct 29 15:28:12 2014 +0100

----------------------------------------------------------------------
 .../core/rbac/AdminRoleRelationship.java        | 26 ++++++++++-
 .../fortress/core/rbac/OrgUnitRelationship.java | 26 ++++++++++-
 .../directory/fortress/core/rbac/PermGrant.java | 48 +++++++++++++++++++-
 3 files changed, 94 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/2ae41291/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleRelationship.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleRelationship.java
b/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleRelationship.java
index 22b90d4..ebe5938 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleRelationship.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleRelationship.java
@@ -19,6 +19,8 @@
  */
 package org.apache.directory.fortress.core.rbac;
 
+import java.io.Serializable;
+
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlRootElement;
@@ -35,10 +37,14 @@ import javax.xml.bind.annotation.XmlType;
     "child",
     "parent"
 })
-public class AdminRoleRelationship extends FortEntity
-    implements java.io.Serializable
+public class AdminRoleRelationship extends FortEntity implements Serializable
 {
+    private static final long serialVersionUID = 1L;
+    
+    /** The parent AdminRole */
     private AdminRole parent;
+    
+    /** The child AdminRole */
     private AdminRole child;
 
     public AdminRole getParent()
@@ -60,4 +66,20 @@ public class AdminRoleRelationship extends FortEntity
     {
         this.child = child;
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( "AdminRoleRelationship object: \n" );
+
+        sb.append( "    parent :" ).append( parent ).append( '\n' );
+        sb.append( "    child :" ).append( child ).append( '\n' );
+
+        return sb.toString();
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/2ae41291/src/main/java/org/apache/directory/fortress/core/rbac/OrgUnitRelationship.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/OrgUnitRelationship.java
b/src/main/java/org/apache/directory/fortress/core/rbac/OrgUnitRelationship.java
index 3756c93..4425d72 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/OrgUnitRelationship.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/OrgUnitRelationship.java
@@ -19,6 +19,8 @@
  */
 package org.apache.directory.fortress.core.rbac;
 
+import java.io.Serializable;
+
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlRootElement;
@@ -36,9 +38,10 @@ import javax.xml.bind.annotation.XmlType;
     "child",
     "parent"
 })
-public class OrgUnitRelationship extends FortEntity
-    implements java.io.Serializable
+public class OrgUnitRelationship extends FortEntity implements Serializable
 {
+    private static final long serialVersionUID = 1L;
+    
     private OrgUnit parent;
     private OrgUnit child;
 
@@ -47,19 +50,38 @@ public class OrgUnitRelationship extends FortEntity
         return parent;
     }
 
+    
     public void setParent(OrgUnit parent)
     {
         this.parent = parent;
     }
 
+    
     public OrgUnit getChild()
     {
         return child;
     }
 
+    
     public void setChild(OrgUnit child)
     {
         this.child = child;
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( "OrgUnitRelationship object: \n" );
+
+        sb.append( "    parent :" ).append( parent ).append( '\n' );
+        sb.append( "    child :" ).append( child ).append( '\n' );
+
+        return sb.toString();
+    }
 }
 

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/2ae41291/src/main/java/org/apache/directory/fortress/core/rbac/PermGrant.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/PermGrant.java b/src/main/java/org/apache/directory/fortress/core/rbac/PermGrant.java
index 42bf322..d745730 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/PermGrant.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/PermGrant.java
@@ -19,6 +19,8 @@
  */
 package org.apache.directory.fortress.core.rbac;
 
+import java.io.Serializable;
+
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlRootElement;
@@ -43,14 +45,26 @@ import javax.xml.bind.annotation.XmlType;
     "roleNm",
     "admin"
 })
-public class PermGrant extends FortEntity
-    implements java.io.Serializable
+public class PermGrant extends FortEntity implements Serializable
 {
+    private static final long serialVersionUID = 1L;
+    
+    /** The permission object name */
     private String objName;
+    
+    /** The permission operation name */
     private String opName;
+    
+    /** The permission object ID */
     private String objId;
+    
+    /** The userId attribute from this entity */
     private String userId;
+    
+    /** The role name associated from this entity */
     private String roleNm;
+    
+    /** Tells if the entity is stored with administrative permissions */
     private boolean admin;
 
     /**
@@ -61,6 +75,7 @@ public class PermGrant extends FortEntity
     {
         return objName;
     }
+    
 
     /**
      * Set the permission object name.
@@ -70,6 +85,7 @@ public class PermGrant extends FortEntity
     {
         this.objName = objName;
     }
+    
 
     /**
      * Return the permission object id.
@@ -79,6 +95,7 @@ public class PermGrant extends FortEntity
     {
         return objId;
     }
+    
 
     /**
      * Set the permission object id.
@@ -88,6 +105,7 @@ public class PermGrant extends FortEntity
     {
         this.objId = objId;
     }
+    
 
     /**
      * Return the permission operation name.
@@ -97,6 +115,7 @@ public class PermGrant extends FortEntity
     {
         return opName;
     }
+    
 
     /**
      * Set the permission operation name.
@@ -106,6 +125,7 @@ public class PermGrant extends FortEntity
     {
         this.opName = opName;
     }
+    
 
     /**
      * Get the userId attribute from this entity.
@@ -117,6 +137,7 @@ public class PermGrant extends FortEntity
         return userId;
     }
 
+    
     /**
      * Set the userId attribute on this entity.
      *
@@ -126,6 +147,7 @@ public class PermGrant extends FortEntity
     {
         this.userId = userId;
     }
+    
 
     /**
      * Get the role name associated from this entity.
@@ -136,6 +158,7 @@ public class PermGrant extends FortEntity
     {
         return roleNm;
     }
+    
 
     /**
      * Set the role name associated with this entity.
@@ -157,6 +180,7 @@ public class PermGrant extends FortEntity
     {
         return admin;
     }
+    
 
     /**
      * Return boolean value that will be set to true if this entity will be stored in Administrative
Permissions.
@@ -166,4 +190,24 @@ public class PermGrant extends FortEntity
     {
         this.admin = admin;
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( "PermGrant object: \n" );
+
+        sb.append( "    roleNm :" ).append( roleNm ).append( '\n' );
+        sb.append( "    objName :" ).append( objName ).append( '\n' );
+        sb.append( "    objId :" ).append( objId ).append( '\n' );
+        sb.append( "    userId :" ).append( userId ).append( '\n' );
+        sb.append( "    opName :" ).append( opName ).append( '\n' );
+        sb.append( "    isAdmin :" ).append( admin ).append( '\n' );
+
+        return sb.toString();
+    }
 }
\ No newline at end of file


Mime
View raw message