BrightSide Workbench Full Report + Source Code
AllowedGroup.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2022 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 package org.turro.security;
20 
21 import java.util.HashMap;
22 import java.util.Map;
23 
28 public class AllowedGroup {
29 
30  private String id;
31  private boolean readOnly, inherits;
32  private Map<String, String> denyiedRoles = new HashMap<>();
33 
34  public String getId() {
35  return id;
36  }
37 
38  public void setId(String id) {
39  this.id = id;
40  }
41 
42  public boolean isInherits() {
43  return inherits;
44  }
45 
46  public void setInherits(boolean inherits) {
47  this.inherits = inherits;
48  }
49 
50  public boolean isReadOnly() {
51  return readOnly;
52  }
53 
54  public void setReadOnly(boolean readOnly) {
55  this.readOnly = readOnly;
56  }
57 
58  public Map<String, String> getDenyiedRoles() {
59  return denyiedRoles;
60  }
61 
62  public void setDenyiedRoles(Map<String, String> denyiedRoles) {
63  this.denyiedRoles = denyiedRoles;
64  }
65 
66  @Override
67  public boolean equals(Object obj) {
68  if (obj == null) {
69  return false;
70  }
71  if (getClass() != obj.getClass()) {
72  return false;
73  }
74  final AllowedGroup other = (AllowedGroup) obj;
75  if ((this.id == null) ? (other.id != null) : !this.id.equals(other.id)) {
76  return false;
77  }
78  return true;
79  }
80 
81  @Override
82  public int hashCode() {
83  int hash = 7;
84  hash = 61 * hash + (this.id != null ? this.id.hashCode() : 0);
85  return hash;
86  }
87 
88 }
void setReadOnly(boolean readOnly)
Map< String, String > getDenyiedRoles()
void setInherits(boolean inherits)
void setDenyiedRoles(Map< String, String > denyiedRoles)