com.cc.framework.security
Class Permission

java.lang.Object
  extended bycom.cc.framework.security.Permission
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AccessControlList, FunctionBasedPermission, RoleBasedPermission, StaticPermission

public abstract class Permission
extends java.lang.Object
implements java.io.Serializable

Base class for all permissions

An implementation of a permission can be accessed with the factory method parse().

Since:
1.0
Version:
$Revision: 1.17 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  java.lang.String message
          Additional message text which can be assigned to the permission
private static long serialVersionUID
          Serial Version UID
 
Constructor Summary
Permission()
          Constructor for Permission
Permission(java.lang.String message)
          Constructor for Permission
 
Method Summary
protected abstract  java.lang.String getDefaultMessage()
          If no message is assigned to the permission this method returns a default message.
 java.lang.String getMessage()
          Returns the message assigned to the permission
abstract  boolean isGranted(Principal principal)
          Checks if the permission is granted.
abstract  boolean isGranted(Principal principal, java.util.List notGranted)
          Checks if the permission is granted.
 void setMessage(java.lang.String string)
          Sets the message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

message

private java.lang.String message
Additional message text which can be assigned to the permission

Constructor Detail

Permission

public Permission()
Constructor for Permission


Permission

public Permission(java.lang.String message)
Constructor for Permission

Parameters:
message - A message assigned to the permission
Method Detail

isGranted

public abstract boolean isGranted(Principal principal)
Checks if the permission is granted.

Parameters:
principal - Principal
Returns:
boolean

isGranted

public abstract boolean isGranted(Principal principal,
                                  java.util.List notGranted)
Checks if the permission is granted. Not granted permission will be added to the specified list.

Parameters:
principal - Principal
notGranted - List with Permission
Returns:
boolean

getDefaultMessage

protected abstract java.lang.String getDefaultMessage()
If no message is assigned to the permission this method returns a default message.

Returns:
String

getMessage

public java.lang.String getMessage()
Returns the message assigned to the permission

Returns:
String

setMessage

public void setMessage(java.lang.String string)
Sets the message

Parameters:
string - Message


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.