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

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

Introduction

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

Prototype

public String toString() 

Source Link

Document

Returns a string representation of the object.

Usage

From source file:com.qpark.eip.core.spring.security.EipRoleVoter.java

public String getRequiredRoles(final Collection<ConfigAttribute> attributes) {
    /* Handle logging of required roles. */
    TreeSet<String> ts = new TreeSet<String>();
    for (ConfigAttribute attribute : attributes) {
        if (this.supports(attribute)) {
            ts.add(attribute.toString());
        }// ww  w .java  2 s  .  co m
    }
    StringBuffer sb = new StringBuffer(1024);
    for (String string : ts) {
        if (sb.length() > 0) {
            sb.append(", ");
        }
        sb.append(string);
    }
    return sb.toString();
}