Example usage for org.springframework.security.access ConfigAttribute equals

List of usage examples for org.springframework.security.access ConfigAttribute equals

Introduction

In this page you can find the example usage for org.springframework.security.access ConfigAttribute equals.

Prototype

public boolean equals(Object obj) 

Source Link

Document

Indicates whether some other object is "equal to" this one.

Usage

From source file:eu.freme.common.persistence.tools.AccessLevelHelper.java

public boolean hasRead(Collection<ConfigAttribute> col) {
    for (ConfigAttribute ca : col) {
        if (ca.equals(readAccess)) {
            return true;
        }//from   w ww .  j  a  va2 s  .  c om
    }
    return false;
}

From source file:eu.freme.common.persistence.tools.AccessLevelHelper.java

public boolean hasWrite(Collection<ConfigAttribute> col) {
    for (ConfigAttribute ca : col) {
        if (ca.equals(writeAccess)) {
            return true;
        }/*from  www.  jav a 2  s  . c om*/
    }
    return false;
}

From source file:com.edgenius.wiki.security.Policy.java

public boolean removeAttribute(String attribute) {
    SecurityConfig config = new SecurityConfig(attribute);
    Iterator<ConfigAttribute> iter = attributes.iterator();
    while (iter.hasNext()) {
        ConfigAttribute att = iter.next();
        if (att.equals(config)) {
            iter.remove();/*from  ww  w . j  a  v  a2  s  .  c o  m*/
            return true;
        }
    }
    return false;

}