2 * ============LICENSE_START==========================================
4 * ===================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ===================================================================
8 * Unless otherwise specified, all software contained herein is licensed
9 * under the Apache License, Version 2.0 (the "License");
10 * you may not use this software except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
21 * Unless otherwise specified, all documentation contained herein is licensed
22 * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
23 * you may not use this documentation except in compliance with the License.
24 * You may obtain a copy of the License at
26 * https://creativecommons.org/licenses/by/4.0/
28 * Unless required by applicable law or agreed to in writing, documentation
29 * distributed under the License is distributed on an "AS IS" BASIS,
30 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31 * See the License for the specific language governing permissions and
32 * limitations under the License.
34 * ============LICENSE_END============================================
36 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
38 package org.onap.portalapp.portal.transport;
40 import java.io.Serializable;
41 import java.util.Date;
42 import java.util.SortedSet;
43 import java.util.TreeSet;
45 import org.onap.portalsdk.core.domain.RoleFunction;
47 public class CentralRole implements Serializable {
49 private static final long serialVersionUID = -9210905386086213882L;
52 private Date modified;
53 private Long createdId;
54 private Long modifiedId;
58 private boolean active;
59 private Integer priority;
61 private SortedSet<CentralRoleFunction> roleFunctions = new TreeSet<>();
63 private SortedSet<CentralRole> childRoles = new TreeSet<>();
65 private SortedSet<CentralRole> parentRoles = new TreeSet<>();
71 public CentralRole(Long id, String name, boolean active, Integer priority,
72 SortedSet<CentralRoleFunction> roleFunctions) {
77 this.priority = priority;
78 this.roleFunctions = roleFunctions;
83 public CentralRole(Long id, Date created, Date modified, Long createdId, Long modifiedId, Long rowNum, String name,
84 boolean active, Integer priority, SortedSet<CentralRoleFunction> roleFunctions,
85 SortedSet<CentralRole> childRoles, SortedSet<CentralRole> parentRoles) {
88 this.created = created;
89 this.modified = modified;
90 this.createdId = createdId;
91 this.modifiedId = modifiedId;
95 this.priority = priority;
96 this.roleFunctions = roleFunctions;
97 this.childRoles = childRoles;
98 this.parentRoles = parentRoles;
104 public Long getId() {
112 public void setId(Long id) {
117 * @return the created
119 public Date getCreated() {
127 public void setCreated(Date created) {
128 this.created = created;
132 * @return the modified
134 public Date getModified() {
140 * the modified to set
142 public void setModified(Date modified) {
143 this.modified = modified;
147 * @return the createdId
149 public Long getCreatedId() {
155 * the createdId to set
157 public void setCreatedId(Long createdId) {
158 this.createdId = createdId;
162 * @return the modifiedId
164 public Long getModifiedId() {
170 * the modifiedId to set
172 public void setModifiedId(Long modifiedId) {
173 this.modifiedId = modifiedId;
179 public Long getRowNum() {
187 public void setRowNum(Long rowNum) {
188 this.rowNum = rowNum;
194 public String getName() {
202 public void setName(String name) {
209 public boolean isActive() {
217 public void setActive(boolean active) {
218 this.active = active;
222 * @return the priority
224 public Integer getPriority() {
230 * the priority to set
232 public void setPriority(Integer priority) {
233 this.priority = priority;
237 * @return the roleFunctions
239 public SortedSet<CentralRoleFunction> getRoleFunctions() {
240 return roleFunctions;
244 * @param roleFunctions
245 * the roleFunctions to set
247 public void setRoleFunctions(SortedSet<CentralRoleFunction> roleFunctions) {
248 this.roleFunctions = roleFunctions;
252 * @return the childRoles
254 public SortedSet<CentralRole> getChildRoles() {
260 * the childRoles to set
262 public void setChildRoles(SortedSet<CentralRole> childRoles) {
263 this.childRoles = childRoles;
267 * @return the parentRoles
269 public SortedSet<CentralRole> getParentRoles() {
275 * the parentRoles to set
277 public void setParentRoles(SortedSet<CentralRole> parentRoles) {
278 this.parentRoles = parentRoles;