org.musicontroller.security
Class Role

java.lang.Object
  extended by org.musicontroller.security.Role
All Implemented Interfaces:
java.io.Serializable

public class Role
extends java.lang.Object
implements java.io.Serializable

Catches a group of Authorities under one name. This class is be used to simplify the usage of Authorities. Instead of assigning a large amount of Auhthorities to a User only one or two Roles can suffice.

Version:
$Id: Role.java,v 1.1 2010/03/16 18:55:42 varienaja Exp $
Author:
Varienaja
See Also:
Serialized Form

Constructor Summary
Role()
          Creates a new Role-object.
 
Method Summary
 java.util.Set<Authority> getAuthorities()
           
 int getId()
           
 java.lang.String getName()
           
 void setAuthorities(java.util.Set<Authority> authorities)
          Sets the Authorities that are granted to this Role.
 void setId(int id)
          Set the identifier for this Role
 void setName(java.lang.String name)
          Sets the name for this Role.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Role

public Role()
Creates a new Role-object.

Method Detail

getId

public int getId()
Returns:
The unique identifier for this Role

setId

public void setId(int id)
Set the identifier for this Role

Parameters:
id - an integer.

getName

public java.lang.String getName()
Returns:
The name of this Role

setName

public void setName(java.lang.String name)
Sets the name for this Role.

Parameters:
name - The name

getAuthorities

public java.util.Set<Authority> getAuthorities()
Returns:
The Authorities that are granted this Role.

setAuthorities

public void setAuthorities(java.util.Set<Authority> authorities)
Sets the Authorities that are granted to this Role.

Parameters:
authorities - The Authorities.


Copyright © 2010 A.J.V.. All Rights Reserved.