com.cc.framework.security
Class StaticPermission

java.lang.Object
  extended bycom.cc.framework.security.Permission
      extended bycom.cc.framework.security.StaticPermission
All Implemented Interfaces:
java.io.Serializable

public final class StaticPermission
extends Permission

This class represents a static permission (true or false)

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

Field Summary
static Permission DENIED
          static permission: DENIED
private  boolean granted
          the static permission
static Permission GRANTED
          static permission: GRANTED
private static long serialVersionUID
          Serial Version UID
 
Fields inherited from class com.cc.framework.security.Permission
 
Constructor Summary
private StaticPermission(boolean granted)
          Constructor for StaticPermission
 
Method Summary
 boolean equals(java.lang.Object obj)
           
protected  java.lang.String getDefaultMessage()
          If no message is assigned to the permission this method returns a default message.
 boolean isGranted(Principal principal)
          Checks if the permission is granted.
 boolean isGranted(Principal principal, java.util.List notGranted)
          Checks if the permission is granted.
static Permission parse(java.lang.String permissionLiteral)
          Creates for the argument (role name) an Object of type Permission.
 java.lang.String toString()
          Returns a String representation of the permission
 
Methods inherited from class com.cc.framework.security.Permission
getMessage, setMessage
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

DENIED

public static final Permission DENIED
static permission: DENIED


GRANTED

public static final Permission GRANTED
static permission: GRANTED


granted

private boolean granted
the static permission

Constructor Detail

StaticPermission

private StaticPermission(boolean granted)
Constructor for StaticPermission

Parameters:
granted - the permission
Method Detail

isGranted

public boolean isGranted(Principal principal)
Description copied from class: Permission
Checks if the permission is granted.

Specified by:
isGranted in class Permission
Parameters:
principal - Principal
Returns:
boolean
See Also:
Permission.isGranted(Principal)

isGranted

public boolean isGranted(Principal principal,
                         java.util.List notGranted)
Description copied from class: Permission
Checks if the permission is granted. Not granted permission will be added to the specified list.

Specified by:
isGranted in class Permission
Parameters:
principal - Principal
notGranted - List with Permission
Returns:
boolean
See Also:
Permission.isGranted(Principal, List)

getDefaultMessage

protected java.lang.String getDefaultMessage()
Description copied from class: Permission
If no message is assigned to the permission this method returns a default message.

Specified by:
getDefaultMessage in class Permission
Returns:
String
See Also:
Permission.getDefaultMessage()

parse

public static Permission parse(java.lang.String permissionLiteral)
                        throws PermissionException
Creates for the argument (role name) an Object of type Permission.

Parameters:
permissionLiteral - String to parse
Returns:
Permission
Throws:
PermissionException - if the argument is not matched

equals

public boolean equals(java.lang.Object obj)
See Also:
Object.equals(java.lang.Object)

toString

public java.lang.String toString()
Returns a String representation of the permission

Returns:
String the String representation


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