org.springframework.security.acls.domain
Class DefaultPermissionFactory
java.lang.Object
org.springframework.security.acls.domain.DefaultPermissionFactory
- All Implemented Interfaces:
- PermissionFactory
public class DefaultPermissionFactory
- extends Object
- implements PermissionFactory
Default implementation of PermissionFactory
.
Generally this class will be used by a Permission
instance, as opposed to being dependency
injected into a LookupStrategy
or similar. Nevertheless, the latter mode of operation is
fully supported (in which case your Permission
implementations probably should extend
AbstractPermission
instead of AbstractRegisteredPermission
).
- Since:
- 2.0.3
- Author:
- Ben Alex
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultPermissionFactory
public DefaultPermissionFactory()
registerPublicPermissions
public void registerPublicPermissions(Class clazz)
- Permit registration of a
DefaultPermissionFactory
class. The class must provide
public static fields of type Permission
to represent the possible permissions.
- Parameters:
clazz
- a Permission
class with public static fields to register
registerPermission
public void registerPermission(Permission perm,
String permissionName)
buildFromMask
public Permission buildFromMask(int mask)
- Description copied from interface:
PermissionFactory
- Dynamically creates a
CumulativePermission
or BasePermission
representing the
active bits in the passed mask.
- Specified by:
buildFromMask
in interface PermissionFactory
- Parameters:
mask
- to build
- Returns:
- a Permission representing the requested object
buildFromMask
public Permission[] buildFromMask(int[] masks)
buildFromName
public Permission buildFromName(String name)
buildFromName
public Permission[] buildFromName(String[] names)
Copyright © 2004-2010 SpringSource, Inc. All Rights Reserved.