|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.security.acls.domain.DefaultPermissionFactory
public class DefaultPermissionFactory
Default implementation of PermissionFactory
.
Used as a strategy by classes which wish to map integer masks and permission names to Permission instances for use with the ACL implementation.
Maintains a registry of permission names and masks to Permission instances.
Constructor Summary | |
---|---|
DefaultPermissionFactory()
Registers the Permission fields from the BasePermission class. |
|
DefaultPermissionFactory(Class<? extends Permission> permissionClass)
Registers the Permission fields from the supplied class. |
|
DefaultPermissionFactory(Map<String,? extends Permission> namedPermissions)
Registers a map of named Permission instances. |
Method Summary | |
---|---|
Permission |
buildFromMask(int mask)
Dynamically creates a CumulativePermission or BasePermission representing the
active bits in the passed mask. |
Permission |
buildFromName(String name)
|
List<Permission> |
buildFromNames(List<String> names)
|
protected void |
registerPermission(Permission perm,
String permissionName)
|
protected void |
registerPublicPermissions(Class<? extends Permission> clazz)
Registers the public static fields of type Permission for a give class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultPermissionFactory()
public DefaultPermissionFactory(Class<? extends Permission> permissionClass)
public DefaultPermissionFactory(Map<String,? extends Permission> namedPermissions)
namedPermissions
- the map of Permissions, keyed by name.Method Detail |
---|
protected void registerPublicPermissions(Class<? extends Permission> clazz)
Permission
for a give class.
These permissions will be registered under the name of the field. See BasePermission
for an example.
clazz
- a Permission
class with public static fields to registerprotected void registerPermission(Permission perm, String permissionName)
public Permission buildFromMask(int mask)
PermissionFactory
CumulativePermission
or BasePermission
representing the
active bits in the passed mask.
buildFromMask
in interface PermissionFactory
mask
- to build
public Permission buildFromName(String name)
buildFromName
in interface PermissionFactory
public List<Permission> buildFromNames(List<String> names)
buildFromNames
in interface PermissionFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |