public interface AAAPersistentService
Define a persistent storage for AAAObject
| Modifier and Type | Method and Description |
|---|---|
Iterable<String> |
allPermissionNames()
Returns name of all
permissions |
Iterable<Permission> |
allPermissions()
Returns all
permissions |
Iterable<String> |
allPrivilegeNames()
Returns name of all
privileges |
Iterable<Privilege> |
allPrivileges()
Returns all
privileges |
Iterable<String> |
allRoleNames()
Returns name of all
roles |
Iterable<Role> |
allRoles()
Returns all
roles |
<T extends AAAObject> |
findByName(String name,
Class<T> clz)
Get the AAAObject by name and type.
|
Privilege |
findPrivilege(int level)
Get a
Privilege by level |
void |
remove(AAAObject aaaObject)
Remove the AAAObject from persistent storage
|
<T extends AAAObject> |
removeAll(Class<T> clz)
Remove all AAAObject from persistent store
|
void |
save(AAAObject aaaObject)
Save the AAAObject to persistent storage
|
void save(AAAObject aaaObject)
Save the AAAObject to persistent storage
aaaObject - the objectvoid remove(AAAObject aaaObject)
Remove the AAAObject from persistent storage
aaaObject - the object<T extends AAAObject> void removeAll(Class<T> clz)
Remove all AAAObject from persistent store
T - the generic type of the object to be removedclz - the class of the object to be removed<T extends AAAObject> T findByName(String name, Class<T> clz)
Get the AAAObject by name and type. Where type should be one of
It is recommended to implement a case insensitive search here
T - the generic type of the objectname - the object nameclz - the class of the objectPrivilege findPrivilege(int level)
Get a Privilege by level
level - the privilege levelIterable<Privilege> allPrivileges()
Returns all privileges
IterableIterable<Permission> allPermissions()
Returns all permissions
IterableIterable<String> allPrivilegeNames()
Returns name of all privileges
IterableIterable<String> allPermissionNames()
Returns name of all permissions
IterableCopyright © 2017–2020 OSGL (Open Source General Library). All rights reserved.