public abstract class CdmPermissionVoter extends java.lang.Object implements org.springframework.security.access.AccessDecisionVoter<TargetEntityStates>
CdmPermissionVoter
provides access control votes for CdmBase
objects.Modifier and Type | Class and Description |
---|---|
protected class |
CdmPermissionVoter.ValidationResult
Holds various flags with validation results.
|
Constructor and Description |
---|
CdmPermissionVoter() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Integer |
furtherVotingDescisions(CdmAuthority CdmAuthority,
TargetEntityStates targetEntityStates,
java.util.Collection<org.springframework.security.access.ConfigAttribute> attributes,
CdmPermissionVoter.ValidationResult validationResult)
Override this method to implement specific decisions.
|
protected PermissionClass |
getResponsibility()
Get the according CdmPermissionClass matching
getResponsibilityClass() the cdm class this voter is responsible for. |
abstract java.lang.Class<? extends CdmBase> |
getResponsibilityClass()
Sets the Cdm type, or super type this Voter is responsible for.
|
abstract boolean |
isOrpahn(CdmBase object)
The AccessDecisionVoter implementing this method can indicate via this method that
an entity has become orphan in order to allow deleting it.
|
protected boolean |
isResponsibleFor(java.lang.Object securedObject) |
protected boolean |
isResponsibleFor(PermissionClass permissionClass) |
boolean |
supports(java.lang.Class<?> clazz) |
boolean |
supports(org.springframework.security.access.ConfigAttribute attribute) |
int |
vote(org.springframework.security.core.Authentication authentication,
TargetEntityStates targetEntityStates,
java.util.Collection<org.springframework.security.access.ConfigAttribute> attributes) |
protected java.lang.String |
voterLoggingLabel()
returns a label for the logging output
|
protected java.lang.String |
voteToString(int vote) |
public static final Logger logger
public boolean supports(org.springframework.security.access.ConfigAttribute attribute)
supports
in interface org.springframework.security.access.AccessDecisionVoter<TargetEntityStates>
public boolean supports(java.lang.Class<?> clazz)
supports
in interface org.springframework.security.access.AccessDecisionVoter<TargetEntityStates>
public abstract java.lang.Class<? extends CdmBase> getResponsibilityClass()
protected boolean isResponsibleFor(java.lang.Object securedObject)
protected boolean isResponsibleFor(PermissionClass permissionClass)
protected PermissionClass getResponsibility()
getResponsibilityClass()
the cdm class this voter is responsible for.public int vote(org.springframework.security.core.Authentication authentication, TargetEntityStates targetEntityStates, java.util.Collection<org.springframework.security.access.ConfigAttribute> attributes)
vote
in interface org.springframework.security.access.AccessDecisionVoter<TargetEntityStates>
public abstract boolean isOrpahn(CdmBase object)
false
deleting of the entity will be denied.
This is important in the context of hierarchic permission propagation like for example in tree structures where the permission to delete an entity is given on base of the permission on an parent object. Entities which become detached from the tree would otherwise no longer be deletable.
object
- protected java.lang.Integer furtherVotingDescisions(CdmAuthority CdmAuthority, TargetEntityStates targetEntityStates, java.util.Collection<org.springframework.security.access.ConfigAttribute> attributes, CdmPermissionVoter.ValidationResult validationResult)
vote(Authentication, TargetEntityStates, Collection)
.CdmAuthority
- targetEntityStates
- attributes
- validationResult
- AccessDecisionVoter.vote(Authentication, Object, Collection)
protected java.lang.String voterLoggingLabel()
protected java.lang.String voteToString(int vote)
vote
- AccessDecisionVoter
Copyright © 2007-2020 EDIT. All Rights Reserved.