mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-13 22:03:33 +00:00
Tidying.
This commit is contained in:
parent
03e285c31d
commit
700de0d388
@ -38,8 +38,7 @@ import org.springframework.util.Assert;
|
|||||||
*/
|
*/
|
||||||
public abstract class AbstractAccessDecisionManager implements AccessDecisionManager, InitializingBean,
|
public abstract class AbstractAccessDecisionManager implements AccessDecisionManager, InitializingBean,
|
||||||
MessageSourceAware {
|
MessageSourceAware {
|
||||||
// ~ Instance fields
|
//~ Instance fields ================================================================================================
|
||||||
// ================================================================================================
|
|
||||||
|
|
||||||
private List decisionVoters;
|
private List decisionVoters;
|
||||||
|
|
||||||
@ -47,8 +46,7 @@ public abstract class AbstractAccessDecisionManager implements AccessDecisionMan
|
|||||||
|
|
||||||
private boolean allowIfAllAbstainDecisions = false;
|
private boolean allowIfAllAbstainDecisions = false;
|
||||||
|
|
||||||
// ~ Methods
|
//~ Methods ========================================================================================================
|
||||||
// ========================================================================================================
|
|
||||||
|
|
||||||
public void afterPropertiesSet() throws Exception {
|
public void afterPropertiesSet() throws Exception {
|
||||||
Assert.notEmpty(this.decisionVoters, "A list of AccessDecisionVoters is required");
|
Assert.notEmpty(this.decisionVoters, "A list of AccessDecisionVoters is required");
|
||||||
@ -81,8 +79,8 @@ public abstract class AbstractAccessDecisionManager implements AccessDecisionMan
|
|||||||
|
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
Object currentObject = iter.next();
|
Object currentObject = iter.next();
|
||||||
Assert.isInstanceOf(AccessDecisionVoter.class, currentObject, "AccessDecisionVoter " + currentObject.getClass().getName()
|
Assert.isInstanceOf(AccessDecisionVoter.class, currentObject, "AccessDecisionVoter " +
|
||||||
+ " must implement AccessDecisionVoter");
|
currentObject.getClass().getName() + " must implement AccessDecisionVoter");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.decisionVoters = newList;
|
this.decisionVoters = newList;
|
||||||
@ -107,15 +105,13 @@ public abstract class AbstractAccessDecisionManager implements AccessDecisionMan
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Iterates through all <code>AccessDecisionVoter</code>s and ensures
|
* Iterates through all <code>AccessDecisionVoter</code>s and ensures each can support the presented class.
|
||||||
* each can support the presented class.
|
|
||||||
* <p/>
|
* <p/>
|
||||||
* If one or more voters cannot support the presented class,
|
* If one or more voters cannot support the presented class, <code>false</code> is returned.
|
||||||
* <code>false</code> is returned.
|
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param clazz DOCUMENT ME!
|
* @param clazz the type of secured object being presented
|
||||||
* @return DOCUMENT ME!
|
* @return true if this type is supported
|
||||||
*/
|
*/
|
||||||
public boolean supports(Class clazz) {
|
public boolean supports(Class clazz) {
|
||||||
Iterator iter = this.decisionVoters.iterator();
|
Iterator iter = this.decisionVoters.iterator();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user