[jboss-cvs] JBossAS SVN: r68521 - projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Dec 21 13:44:42 EST 2007


Author: anil.saldhana at jboss.com
Date: 2007-12-21 13:44:41 -0500 (Fri, 21 Dec 2007)
New Revision: 68521

Modified:
   projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/Role.java
   projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/RoleGroup.java
Log:
SECURITY-103: Role has containsXXX methods

Modified: projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/Role.java
===================================================================
--- projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/Role.java	2007-12-21 18:15:33 UTC (rev 68520)
+++ projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/Role.java	2007-12-21 18:44:41 UTC (rev 68521)
@@ -42,4 +42,12 @@
     * @return simple,group
     */
    public RoleType getType();
+   
+   /**
+    * Indicate whether the argument role is equal or contained
+    * depending on the role-type
+    * @param anotherRole
+    * @return true or false
+    */
+   public boolean containsAll(Role anotherRole);
 }
\ No newline at end of file

Modified: projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/RoleGroup.java
===================================================================
--- projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/RoleGroup.java	2007-12-21 18:15:33 UTC (rev 68520)
+++ projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/RoleGroup.java	2007-12-21 18:44:41 UTC (rev 68521)
@@ -34,4 +34,20 @@
 public interface RoleGroup extends Role
 {  
    public List<Role> getRoles(); 
+   
+   /**
+    * Validates whether a simple role is available
+    * @param aRole simple role
+    * @return
+    * @throws IllegalArgumentException role is not simple
+    */
+   public boolean containsRole(Role aRole);
+   
+   /**
+    * Validates whether there is at least one matching
+    * role in "anotherRoleGroup"
+    * @param anotherRoleGroup another role group
+    * @return
+    */
+   public boolean containsAtleastOneRole(RoleGroup anotherRoleGroup);
 }
\ No newline at end of file




More information about the jboss-cvs-commits mailing list