BrightSide Workbench Full Report + Source Code
org.turro.security.ConceptPermission Class Reference

Public Member Functions

ConceptPermission show ()
 
ConceptPermission hide ()
 
ConceptPermission max (Integer max)
 
ConceptPermission order (Integer order)
 
ConceptPermission showRole (String role)
 
ConceptPermission actionRole (String role)
 
ConceptPermission showScript (String script)
 
ConceptPermission actionScript (String script)
 
ConceptPermission showActor (String actor)
 
ConceptPermission actionActor (String actor)
 
ConceptPermission addPermission (ConceptPermission permission)
 
String getName ()
 
boolean isAllow ()
 
boolean isShow ()
 
Integer getMax ()
 
Integer getOrder ()
 
ConceptPermission getPermission (String name)
 
Collection< String > getConcepts ()
 
boolean canShow ()
 
boolean canShow (IContact contact)
 
boolean canAct ()
 
boolean canAct (IContact contact)
 
void init (IElephantEntity iee, Cached< IContact > contact)
 

Static Public Member Functions

static ConceptPermission allow (String name)
 
static ConceptPermission forbid (String name)
 

Static Public Attributes

static final String DRIVER = "driver"
 

Detailed Description

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

Definition at line 34 of file ConceptPermission.java.

Member Function Documentation

◆ actionActor()

ConceptPermission org.turro.security.ConceptPermission.actionActor ( String  actor)

Definition at line 110 of file ConceptPermission.java.

110  {
111  this.actionActor = actor;
112  return this;
113  }

◆ actionRole()

ConceptPermission org.turro.security.ConceptPermission.actionRole ( String  role)

Definition at line 90 of file ConceptPermission.java.

90  {
91  this.actionRole = role;
92  return this;
93  }

◆ actionScript()

ConceptPermission org.turro.security.ConceptPermission.actionScript ( String  script)

Definition at line 100 of file ConceptPermission.java.

100  {
101  this.actionScript = script;
102  return this;
103  }

◆ addPermission()

ConceptPermission org.turro.security.ConceptPermission.addPermission ( ConceptPermission  permission)

Definition at line 115 of file ConceptPermission.java.

115  {
116  this.permissions.put(permission);
117  return this;
118  }
ConceptPermission put(String key, ConceptPermission value)
Here is the call graph for this function:

◆ allow()

static ConceptPermission org.turro.security.ConceptPermission.allow ( String  name)
static

Definition at line 194 of file ConceptPermission.java.

194  {
195  return new ConceptPermission(name, true);
196  }

◆ canAct() [1/2]

boolean org.turro.security.ConceptPermission.canAct ( )

Definition at line 161 of file ConceptPermission.java.

161  {
162  return canAct(contact.get());
163  }

◆ canAct() [2/2]

boolean org.turro.security.ConceptPermission.canAct ( IContact  contact)

Definition at line 165 of file ConceptPermission.java.

165  {
166  return isAllow() && Contacts.isValid(contact) &&
167  (Strings.isBlank(actionRole) || contact.isInRole(actionRole)) &&
168  (Strings.isBlank(actionScript) || processScript(actionScript, iee)) &&
169  (Strings.isBlank(actionActor) || processActor(actionActor, iee));
170  }
Here is the call graph for this function:

◆ canShow() [1/2]

boolean org.turro.security.ConceptPermission.canShow ( )

Definition at line 150 of file ConceptPermission.java.

150  {
151  return canShow(contact.get());
152  }

◆ canShow() [2/2]

boolean org.turro.security.ConceptPermission.canShow ( IContact  contact)

Definition at line 154 of file ConceptPermission.java.

154  {
155  return isShow() && Contacts.isValid(contact) &&
156  (Strings.isBlank(showRole) || contact.isInRole(showRole)) &&
157  (Strings.isBlank(showScript) || processScript(showScript, iee)) &&
158  (Strings.isBlank(showActor) || processActor(showActor, iee));
159  }
Here is the call graph for this function:

◆ forbid()

static ConceptPermission org.turro.security.ConceptPermission.forbid ( String  name)
static

Definition at line 198 of file ConceptPermission.java.

198  {
199  return new ConceptPermission(name, false).hide();
200  }
Here is the call graph for this function:

◆ getConcepts()

Collection<String> org.turro.security.ConceptPermission.getConcepts ( )

Definition at line 144 of file ConceptPermission.java.

144  {
145  return permissions.concepts();
146  }
Here is the call graph for this function:

◆ getMax()

Integer org.turro.security.ConceptPermission.getMax ( )

Definition at line 132 of file ConceptPermission.java.

132  {
133  return max;
134  }

◆ getName()

String org.turro.security.ConceptPermission.getName ( )

Definition at line 120 of file ConceptPermission.java.

120  {
121  return name;
122  }
Here is the caller graph for this function:

◆ getOrder()

Integer org.turro.security.ConceptPermission.getOrder ( )

Definition at line 136 of file ConceptPermission.java.

136  {
137  return order;
138  }
Here is the caller graph for this function:

◆ getPermission()

ConceptPermission org.turro.security.ConceptPermission.getPermission ( String  name)

Definition at line 140 of file ConceptPermission.java.

140  {
141  return permissions.get(name, iee);
142  }
Here is the call graph for this function:

◆ hide()

ConceptPermission org.turro.security.ConceptPermission.hide ( )

Definition at line 70 of file ConceptPermission.java.

70  {
71  this.show = false;
72  return this;
73  }
Here is the caller graph for this function:

◆ init()

void org.turro.security.ConceptPermission.init ( IElephantEntity  iee,
Cached< IContact contact 
)

Definition at line 187 of file ConceptPermission.java.

187  {
188  this.iee = iee;
189  this.contact = contact;
190  }
Here is the caller graph for this function:

◆ isAllow()

boolean org.turro.security.ConceptPermission.isAllow ( )

Definition at line 124 of file ConceptPermission.java.

124  {
125  return allow;
126  }
Here is the caller graph for this function:

◆ isShow()

boolean org.turro.security.ConceptPermission.isShow ( )

Definition at line 128 of file ConceptPermission.java.

128  {
129  return show;
130  }
Here is the caller graph for this function:

◆ max()

ConceptPermission org.turro.security.ConceptPermission.max ( Integer  max)

Definition at line 75 of file ConceptPermission.java.

75  {
76  this.max = max;
77  return this;
78  }

◆ order()

ConceptPermission org.turro.security.ConceptPermission.order ( Integer  order)

Definition at line 80 of file ConceptPermission.java.

80  {
81  this.order = order;
82  return this;
83  }

◆ show()

ConceptPermission org.turro.security.ConceptPermission.show ( )

Definition at line 65 of file ConceptPermission.java.

65  {
66  this.show = true;
67  return this;
68  }

◆ showActor()

ConceptPermission org.turro.security.ConceptPermission.showActor ( String  actor)

Definition at line 105 of file ConceptPermission.java.

105  {
106  this.showActor = actor;
107  return this;
108  }

◆ showRole()

ConceptPermission org.turro.security.ConceptPermission.showRole ( String  role)

Definition at line 85 of file ConceptPermission.java.

85  {
86  this.showRole = role;
87  return this;
88  }

◆ showScript()

ConceptPermission org.turro.security.ConceptPermission.showScript ( String  script)

Definition at line 95 of file ConceptPermission.java.

95  {
96  this.showScript = script;
97  return this;
98  }

Member Data Documentation

◆ DRIVER

final String org.turro.security.ConceptPermission.DRIVER = "driver"
static

Definition at line 37 of file ConceptPermission.java.


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