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============================================
38 package org.onap.portalapp.portal.domain;
40 import java.io.Serializable;
42 import org.hibernate.validator.constraints.SafeHtml;
43 import org.onap.portalsdk.core.domain.support.DomainVo;
45 import com.fasterxml.jackson.annotation.JsonIgnore;
47 @SuppressWarnings("rawtypes")
48 public class CentralV2RoleFunction extends DomainVo implements Serializable, Comparable{
53 private static final long serialVersionUID = -4018975640065252688L;
64 private String action;
66 private String editUrl;
69 public CentralV2RoleFunction() {
74 public CentralV2RoleFunction(Long id, String code, String name, Long appId, String type, String action,String editUrl) {
82 this.editUrl = editUrl;
85 public CentralV2RoleFunction(Long id, String code, String name, Long appId,String editUrl) {
91 this.editUrl = editUrl;
96 public CentralV2RoleFunction(String code, String name) {
105 public String getCode() {
109 * @param code the code to set
111 public void setCode(String code) {
117 public String getName() {
121 * @param name the name to set
123 public void setName(String name) {
129 public Long getAppId() {
133 * @param appId the appId to set
135 public void setAppId(Long appId) {
139 * @return the editUrl
141 public String getEditUrl() {
145 * @param editUrl the editUrl to set
147 public void setEditUrl(String editUrl) {
148 this.editUrl = editUrl;
155 public String getType() {
161 * @param type the type to set
163 public void setType(String type) {
171 public String getAction() {
177 * @param action the action to set
179 public void setAction(String action) {
180 this.action = action;
184 public int compareTo(Object obj){
185 String c1 = getName();
186 String c2 = ((CentralV2RoleFunction)obj).getName();
188 return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);