BrightSide Workbench Full Report + Source Code
org.turro.elephant.impl.security.RoleAttribute Class Reference
Inheritance diagram for org.turro.elephant.impl.security.RoleAttribute:
Collaboration diagram for org.turro.elephant.impl.security.RoleAttribute:

Public Member Functions

boolean isInRole (String role)
 
void addFromElementChildren (List< Element > children)
 

Static Public Member Functions

static RoleAttribute loadFromElementChildren (List< Element > children)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 30 of file RoleAttribute.java.

Member Function Documentation

◆ addFromElementChildren()

void org.turro.elephant.impl.security.RoleAttribute.addFromElementChildren ( List< Element >  children)

Definition at line 52 of file RoleAttribute.java.

52  {
53  for(Element el : children) {
54  RoleValue rv = get(el.getAttributeValue("name"));
55  if(rv != null) {
56  rv.loadFrom(new RoleValue(el.getAttributeValue("value").split(" *, *")));
57  } else {
58  put(el.getAttributeValue("name"),
59  new RoleValue(el.getAttributeValue("value").split(" *, *")));
60  }
61  }
62  }
Here is the call graph for this function:

◆ isInRole()

boolean org.turro.elephant.impl.security.RoleAttribute.isInRole ( String  role)

Definition at line 32 of file RoleAttribute.java.

32  {
33  String[] roles = role.split("\\s*\\|\\s*");
34  for(String r : roles) {
35  if(checkRole(r)) return true;
36  }
37  return false;
38  }

◆ loadFromElementChildren()

static RoleAttribute org.turro.elephant.impl.security.RoleAttribute.loadFromElementChildren ( List< Element >  children)
static

Definition at line 64 of file RoleAttribute.java.

64  {
65  RoleAttribute ra = new RoleAttribute();
66 
67  for(Element el : children) {
68  ra.put(el.getAttributeValue("name"),
69  new RoleValue(el.getAttributeValue("value").split(" *, *")));
70  }
71 
72  return ra;
73  }

The documentation for this class was generated from the following file: