@Test public void testGetRole() { Attribute attribute = new Attribute("my.value"); assertNull(attribute.getRole()); Set<String> roles = new LinkedHashSet<String>(); attribute.setRoles(roles); assertNull(attribute.getRole()); roles.add("role1"); roles.add("role2"); assertEquals("role1,role2", attribute.getRole()); }
public String getRole() { String retValue = null; if (roles != null && !roles.isEmpty()) { StringBuilder builder = new StringBuilder(); Iterator<String> roleIt = roles.iterator(); if (roleIt.hasNext()) { builder.append(roleIt.next()); while (roleIt.hasNext()) { builder.append(","); builder.append(roleIt.next()); } retValue = builder.toString(); } } return retValue; }
Attribute implements Serializable, Cloneable { public String getRole() { String retValue = null; if (roles != null && !roles.isEmpty()) { StringBuilder builder = new StringBuilder(); Iterator<String> roleIt = roles.iterator(); if (roleIt.hasNext()) { builder.append(roleIt.next()); while (roleIt.hasNext()) { builder.append(","); builder.append(roleIt.next()); } retValue = builder.toString(); } } return retValue; } }
Attribute implements Serializable, Cloneable { public String getRole() { String retValue = null; if (roles != null && !roles.isEmpty()) { StringBuilder builder = new StringBuilder(); Iterator<String> roleIt = roles.iterator(); if (roleIt.hasNext()) { builder.append(roleIt.next()); while (roleIt.hasNext()) { builder.append(","); builder.append(roleIt.next()); } retValue = builder.toString(); } } return retValue; } Attribute();  Attribute(Object value);  Attribute(Attribute attribute);  Attribute(Object value, String role);  Attribute(Object value, Expression expression, String role, String rendererName); }
Attribute implements Serializable, Cloneable { public String getRole() { String retValue = null; if (roles != null && !roles.isEmpty()) { StringBuilder builder = new StringBuilder(); Iterator<String> roleIt = roles.iterator(); if (roleIt.hasNext()) { builder.append(roleIt.next()); while (roleIt.hasNext()) { builder.append(","); builder.append(roleIt.next()); } retValue = builder.toString(); } } return retValue; } Attribute();  Attribute(Object value);  Attribute(Attribute attribute);  Attribute(Object value, String role);  Attribute(Object value, Expression expression, String role, String rendererName); static Attribute createTemplateAttribute(String template); static Attribute createTemplateAttribute(String template,
            String templateExpression, String templateType, String role); static Attribute createTemplateAttributeWithExpression(
            String templateExpression); String getRole(); Set<String> getRoles(); void setRole(String role); void setRoles(Set<String> roles); Object getValue(); void setValue(Object value); Expression getExpressionObject(); void setExpressionObject(Expression expressionObject); @Override String toString(); String getRenderer(); void setRenderer(String rendererName); void inherit(Attribute attribute); @Override boolean equals(Object obj); boolean isPermitted(Request request); @Override int hashCode(); @Override Attribute clone(); }
Attribute implements Serializable, Cloneable { public String getRole() { String retValue = null; if (roles != null && !roles.isEmpty()) { StringBuilder builder = new StringBuilder(); Iterator<String> roleIt = roles.iterator(); if (roleIt.hasNext()) { builder.append(roleIt.next()); while (roleIt.hasNext()) { builder.append(","); builder.append(roleIt.next()); } retValue = builder.toString(); } } return retValue; } Attribute();  Attribute(Object value);  Attribute(Attribute attribute);  Attribute(Object value, String role);  Attribute(Object value, Expression expression, String role, String rendererName); static Attribute createTemplateAttribute(String template); static Attribute createTemplateAttribute(String template,
            String templateExpression, String templateType, String role); static Attribute createTemplateAttributeWithExpression(
            String templateExpression); String getRole(); Set<String> getRoles(); void setRole(String role); void setRoles(Set<String> roles); Object getValue(); void setValue(Object value); Expression getExpressionObject(); void setExpressionObject(Expression expressionObject); @Override String toString(); String getRenderer(); void setRenderer(String rendererName); void inherit(Attribute attribute); @Override boolean equals(Object obj); boolean isPermitted(Request request); @Override int hashCode(); @Override Attribute clone();  }