org.mentawai.authorization
Class Group

java.lang.Object
  extended by org.mentawai.authorization.Group
All Implemented Interfaces:
Serializable

public class Group
extends Object
implements Serializable

Author:
Sergio Oliveira
See Also:
Serialized Form

Constructor Summary
Group(int id, String name)
           
Group(int id, String name, Permission... permissions)
           
Group(int id, String name, Set<Object> permissions)
           
Group(int id, String name, String... permissions)
           
Group(String name)
           
Group(String name, Permission... permissions)
           
Group(String name, Set<Object> permissions)
           
Group(String name, String... permissions)
           
Group(String name, String permissions)
          Deprecated.  
 
Method Summary
 Group addPermission(Permission p)
           
 Group addPermission(String permission)
           
 boolean equals(Object obj)
           
 int getId()
           
 String getName()
           
 Set<Permission> getPermissions()
           
 int hashCode()
           
 boolean hasPermission(Permission p)
           
 boolean hasPermission(String permission)
          Verify if the permission exists in the group and if it is not denied
 void setId(int id)
           
 void setName(String name)
           
 void setPermissions(Set<Permission> permissions)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Group

public Group(String name)

Group

public Group(int id,
             String name)

Group

public Group(String name,
             Set<Object> permissions)

Group

public Group(int id,
             String name,
             Set<Object> permissions)

Group

public Group(int id,
             String name,
             String... permissions)

Group

public Group(String name,
             String... permissions)

Group

public Group(int id,
             String name,
             Permission... permissions)

Group

public Group(String name,
             Permission... permissions)

Group

public Group(String name,
             String permissions)
Deprecated. 

Use varargs instead...

Parameters:
name -
permissions -
Method Detail

setId

public void setId(int id)

setName

public void setName(String name)

getPermissions

public Set<Permission> getPermissions()

setPermissions

public void setPermissions(Set<Permission> permissions)

getId

public int getId()

addPermission

public Group addPermission(String permission)

addPermission

public Group addPermission(Permission p)

getName

public String getName()

hasPermission

public boolean hasPermission(String permission)
Verify if the permission exists in the group and if it is not denied

Returns:
boolean
Since:
1.12

hasPermission

public boolean hasPermission(Permission p)

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2013. All Rights Reserved.