org.figure8.join.businessobjects.security
Class Permission

java.lang.Object
  extended by org.figure8.join.core.EntityObject
      extended by org.figure8.join.businessobjects.security.Permission
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Permission
extends EntityObject

This is an entity representing a Permission : a binding between a security Role and a User. Permission can be relative to a specified resource (that should be another EntityObject)

Version:
$Revision: 1.1 $
Author:
Laurent Broudoux
See Also:
Serialized Form

Constructor Summary
Permission()
          Creates a new instance of Permission
Permission(Role role, java.lang.String userId)
          Creates a new instance of Permission
Permission(Role role, java.lang.String userId, java.lang.String resourceId)
          Creates a new instance of Permission
 
Method Summary
 java.lang.String getResourceId()
           
 Role getRole()
           
 java.lang.String getUserId()
           
 boolean isGlobalPermission()
           
 boolean isResourcePermission()
           
 void setResourceId(java.lang.String resourceId)
           
 void setRole(Role role)
           
 void setUserId(java.lang.String userId)
           
 java.lang.String toString()
           
 
Methods inherited from class org.figure8.join.core.EntityObject
clone, equals, getId, hashCode, isTransient
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Permission

public Permission()
Creates a new instance of Permission


Permission

public Permission(Role role,
                  java.lang.String userId)
Creates a new instance of Permission

Parameters:
role - The security role associated to this permission
userId - The unique identifier of user associated with this permission

Permission

public Permission(Role role,
                  java.lang.String userId,
                  java.lang.String resourceId)
Creates a new instance of Permission

Parameters:
role - The security role associated to this permission
userId - The unique identifier of user associated with this permission
resourceId - The idenitfier of resource entity to whow applies this permission
Method Detail

getRole

public Role getRole()
Returns:
The security role associated to this permission

setRole

public void setRole(Role role)
Parameters:
role - Role associated to this permission

getUserId

public java.lang.String getUserId()
Returns:
The unique identifier of the user which has this permission

setUserId

public void setUserId(java.lang.String userId)
Parameters:
userId - Unique identifier of the user whom belongs this permission

getResourceId

public java.lang.String getResourceId()
Returns:
The identifier of the resource to whom this permission applies

setResourceId

public void setResourceId(java.lang.String resourceId)
Parameters:
resourceId - The identifier of the resource to whom this permission applies

isGlobalPermission

public boolean isGlobalPermission()
Returns:
true if this Permission doesn't apply to a specific resource

isResourcePermission

public boolean isResourcePermission()
Returns:
true if this Permission applies to a specific resource

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
Get the string representation of this permission


Copyright © 2005-2008 Join. All Rights Reserved.