com.cc.framework.security
Class PermissionFactory

java.lang.Object
  extended bycom.cc.framework.security.PermissionFactory

public abstract class PermissionFactory
extends java.lang.Object

Factory class to convert String literals into Permission objects

Since:
1.6.037
Version:
$Revision: 1.2 $
Author:
Harald Schulz

Field Summary
private static java.util.List factoryMethods
          Permission factory classes
 
Constructor Summary
private PermissionFactory()
          private constructor for a utility class
 
Method Summary
static Permission parse(java.lang.String permissionLiteral)
          Creates for the argument an object of type Permission.
static void register(java.lang.Class permissionClass)
          Registers a permission factory method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factoryMethods

private static java.util.List factoryMethods
Permission factory classes

Constructor Detail

PermissionFactory

private PermissionFactory()
private constructor for a utility class

Method Detail

register

public static void register(java.lang.Class permissionClass)
Registers a permission factory method

Parameters:
permissionClass - the permission class to register. The class needs to expose the following method:
 public static Permission parse(String permissionLiteral) throws PermissionException
 

parse

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

Legal values for an access protection:

Different permissions can be specified in a list separated by ";"

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


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