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

Public Member Functions

 SecSet (Collection<? extends SecItem > c)
 
void select (String secName)
 
void unselect (String secName)
 
void toggle (String secName)
 
void selectAll ()
 
void unselectAll ()
 
void toggle ()
 
String secUrl (SecItem sec)
 
TreeSet< String > getSecNames ()
 
TreeSet< SecItemgetSelected ()
 
TreeSet< SecItemgetUnselected ()
 
TreeSet< String > getSelectedSecNames ()
 
TreeSet< String > getUnselectedSecNames ()
 
long getMaxUsage ()
 
void markSiblingsFromSelection ()
 

Static Public Member Functions

static SecSet empty ()
 

Detailed Description

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

Definition at line 31 of file SecSet.java.

Constructor & Destructor Documentation

◆ SecSet()

org.turro.security.SecSet.SecSet ( Collection<? extends SecItem c)

Definition at line 33 of file SecSet.java.

33  {
34  super(c);
35  }
Here is the caller graph for this function:

Member Function Documentation

◆ empty()

static SecSet org.turro.security.SecSet.empty ( )
static

Definition at line 121 of file SecSet.java.

121  {
122  return new SecSet(Collections.EMPTY_SET);
123  }
SecSet(Collection<? extends SecItem > c)
Definition: SecSet.java:33
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMaxUsage()

long org.turro.security.SecSet.getMaxUsage ( )

Definition at line 110 of file SecSet.java.

110  {
111  return stream().mapToLong(t -> t.getUsage()).max().orElse(0);
112  }
Here is the caller graph for this function:

◆ getSecNames()

TreeSet<String> org.turro.security.SecSet.getSecNames ( )

Definition at line 90 of file SecSet.java.

90  {
91  return new TreeSet(stream().map(t -> t.getSecName()).collect(Collectors.toSet()));
92  }

◆ getSelected()

TreeSet<SecItem> org.turro.security.SecSet.getSelected ( )

Definition at line 94 of file SecSet.java.

94  {
95  return new TreeSet(stream().filter(t -> t.isSelected()).collect(Collectors.toSet()));
96  }
Here is the caller graph for this function:

◆ getSelectedSecNames()

TreeSet<String> org.turro.security.SecSet.getSelectedSecNames ( )

Definition at line 102 of file SecSet.java.

102  {
103  return new TreeSet(stream().filter(t -> t.isSelected()).map(t -> t.getSecName()).collect(Collectors.toSet()));
104  }
Here is the caller graph for this function:

◆ getUnselected()

TreeSet<SecItem> org.turro.security.SecSet.getUnselected ( )

Definition at line 98 of file SecSet.java.

98  {
99  return new TreeSet(stream().filter(t -> !t.isSelected()).collect(Collectors.toSet()));
100  }
Here is the caller graph for this function:

◆ getUnselectedSecNames()

TreeSet<String> org.turro.security.SecSet.getUnselectedSecNames ( )

Definition at line 106 of file SecSet.java.

106  {
107  return new TreeSet(stream().filter(t -> !t.isSelected()).map(t -> t.getSecName()).collect(Collectors.toSet()));
108  }

◆ markSiblingsFromSelection()

void org.turro.security.SecSet.markSiblingsFromSelection ( )

Definition at line 114 of file SecSet.java.

114  {
115  SecSet siblings = Secs.getSiblings(getSelectedSecNames());
116  for(SecItem sec : getUnselected()) {
117  sec.setSibling(siblings.contains(sec));
118  }
119  }
TreeSet< SecItem > getUnselected()
Definition: SecSet.java:98
TreeSet< String > getSelectedSecNames()
Definition: SecSet.java:102
Here is the call graph for this function:

◆ secUrl()

String org.turro.security.SecSet.secUrl ( SecItem  sec)

Definition at line 86 of file SecSet.java.

86  {
87  return MarkerHelper.setObfuscatedRightNowPars("sec=" + sec.getSecName());
88  }
Here is the call graph for this function:

◆ select()

void org.turro.security.SecSet.select ( String  secName)

Definition at line 37 of file SecSet.java.

37  {
38  for(SecItem t : this) {
39  if(t.getSecName().equals(secName)) {
40  t.setSelected(true);
41  }
42  }
43  }
Here is the call graph for this function:

◆ selectAll()

void org.turro.security.SecSet.selectAll ( )

Definition at line 68 of file SecSet.java.

68  {
69  for(SecItem t : this) {
70  t.setSelected(true);
71  }
72  }
Here is the call graph for this function:

◆ toggle() [1/2]

void org.turro.security.SecSet.toggle ( )

Definition at line 80 of file SecSet.java.

80  {
81  for(SecItem t : this) {
82  t.setSelected(!t.isSelected());
83  }
84  }
Here is the call graph for this function:

◆ toggle() [2/2]

void org.turro.security.SecSet.toggle ( String  secName)

Definition at line 53 of file SecSet.java.

53  {
54  for(SecItem t : this) {
55  if(t.getSecName().equals(secName)) {
56  if(t.isSelected()) {
57  t.setSelected(false);
58  } else if(t.isSibling()) {
59  t.setSelected(true);
60  } else {
61  unselectAll();
62  t.setSelected(true);
63  }
64  }
65  }
66  }
Here is the call graph for this function:

◆ unselect()

void org.turro.security.SecSet.unselect ( String  secName)

Definition at line 45 of file SecSet.java.

45  {
46  for(SecItem t : this) {
47  if(t.getSecName().equals(secName)) {
48  t.setSelected(false);
49  }
50  }
51  }
Here is the call graph for this function:

◆ unselectAll()

void org.turro.security.SecSet.unselectAll ( )

Definition at line 74 of file SecSet.java.

74  {
75  for(SecItem t : this) {
76  t.setSelected(false);
77  }
78  }
Here is the call graph for this function:
Here is the caller graph for this function:

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