|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.seam.security.permission.JpaPermissionStore
@ApplicationScoped public class JpaPermissionStore
A permission store implementation that uses JPA as its persistence mechanism.
Constructor Summary | |
---|---|
JpaPermissionStore()
|
Method Summary | |
---|---|
void |
clearPermissions(Object resource)
|
protected Query |
createPermissionQuery(Object target,
Set<?> targets,
org.picketlink.idm.spi.model.IdentityObject identity)
Creates a Query that returns a list of permission records for the specified parameters. |
Class<?> |
getIdentityPermissionClass()
|
boolean |
grantPermission(Permission permission)
|
boolean |
grantPermissions(List<Permission> permissions)
|
void |
init()
|
protected void |
initProperties()
|
boolean |
isEnabled()
|
List<String> |
listAvailableActions(Object target)
|
List<Permission> |
listPermissions(Object target)
|
protected List<Permission> |
listPermissions(Object resource,
Set<Object> targets,
String action)
|
List<Permission> |
listPermissions(Object target,
String action)
Returns a list of all user and role permissions for a specific permission target and action. |
List<Permission> |
listPermissions(Set<Object> targets,
String action)
Returns a list of all user and role permissions for the specified action for all specified target objects |
protected Object |
resolveIdentityEntity(org.picketlink.idm.spi.model.IdentityObject identity)
|
boolean |
revokePermission(Permission permission)
|
boolean |
revokePermissions(List<Permission> permissions)
|
void |
setIdentityPermissionClass(Class<?> identityPermissionClass)
|
protected boolean |
updatePermissionActions(Object resource,
org.picketlink.idm.spi.model.IdentityObject identity,
String[] actions,
boolean set)
This is where the bulk of the actual work happens. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JpaPermissionStore()
Method Detail |
---|
@Inject public void init()
protected void initProperties()
protected Query createPermissionQuery(Object target, Set<?> targets, org.picketlink.idm.spi.model.IdentityObject identity)
target
- The target of the permission, may be nulltargets
- A set of permission targets, may be nullrecipient
- The permission recipient, may be nulldiscrimination
- A discrimination (either user, role or both), required
public boolean grantPermission(Permission permission)
grantPermission
in interface PermissionStore
public boolean revokePermission(Permission permission)
revokePermission
in interface PermissionStore
protected boolean updatePermissionActions(Object resource, org.picketlink.idm.spi.model.IdentityObject identity, String[] actions, boolean set)
target
- The target object to update permissions forrecipient
- The recipient to update permissions foractions
- The actions that will be updatedset
- true if the specified actions are to be granted, false if they are to be revoked
public boolean grantPermissions(List<Permission> permissions)
grantPermissions
in interface PermissionStore
public boolean revokePermissions(List<Permission> permissions)
revokePermissions
in interface PermissionStore
protected Object resolveIdentityEntity(org.picketlink.idm.spi.model.IdentityObject identity)
recipient
-
public List<Permission> listPermissions(Set<Object> targets, String action)
listPermissions
in interface PermissionStore
public List<Permission> listPermissions(Object target, String action)
listPermissions
in interface PermissionStore
protected List<Permission> listPermissions(Object resource, Set<Object> targets, String action)
public List<Permission> listPermissions(Object target)
listPermissions
in interface PermissionStore
public List<String> listAvailableActions(Object target)
listAvailableActions
in interface PermissionStore
public Class<?> getIdentityPermissionClass()
public void setIdentityPermissionClass(Class<?> identityPermissionClass)
public void clearPermissions(Object resource)
clearPermissions
in interface PermissionStore
public boolean isEnabled()
isEnabled
in interface PermissionStore
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |