X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-BE-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fportalapp%2Fportal%2Ftransport%2FExternalAccessPerms.java;h=aeb2ad36473aa4771e694e3443d4c29e925c9264;hb=51d83152697da4f2ef2242471ee43f36e6b64300;hp=27d0dd0bf337fecc037ac00e11d0a79bfaca2148;hpb=1b29c0944a7eba1c88cfd25c94e4dd7ed0f82dc7;p=portal.git diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessPerms.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessPerms.java index 27d0dd0b..aeb2ad36 100644 --- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessPerms.java +++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessPerms.java @@ -1,8 +1,45 @@ +/*- + * ============LICENSE_START========================================== + * ONAP Portal + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ package org.openecomp.portalapp.portal.transport; import java.io.Serializable; -public class ExternalAccessPerms implements Serializable, Comparable{ +public class ExternalAccessPerms implements Serializable, Comparable { /** * @@ -12,14 +49,11 @@ public class ExternalAccessPerms implements Serializable, Comparable{ public String instance; public String action; public String description; - - + public ExternalAccessPerms() { super(); } - - - + public ExternalAccessPerms(String type, String instance, String action, String description) { super(); this.type = type; @@ -35,39 +69,46 @@ public class ExternalAccessPerms implements Serializable, Comparable{ this.action = action; } - /** * @return the type */ public String getType() { return type; } + /** - * @param type the type to set + * @param type + * the type to set */ public void setType(String type) { this.type = type; } + /** * @return the instance */ public String getInstance() { return instance; } + /** - * @param instance the instance to set + * @param instance + * the instance to set */ public void setInstance(String instance) { this.instance = instance; } + /** * @return the action */ public String getAction() { return action; } + /** - * @param action the action to set + * @param action + * the action to set */ public void setAction(String action) { this.action = action; @@ -81,19 +122,16 @@ public class ExternalAccessPerms implements Serializable, Comparable{ this.description = description; } - @Override - public int compareTo(Object obj){ - ExternalAccessPerms other = (ExternalAccessPerms)obj; + public int compareTo(Object obj) { + ExternalAccessPerms other = (ExternalAccessPerms) obj; - String c1 = getInstance(); - String c2 = other.getInstance(); + String c1 = getInstance(); + String c2 = other.getInstance(); - return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2); + return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2); } - - @Override public int hashCode() { final int prime = 31; @@ -105,8 +143,6 @@ public class ExternalAccessPerms implements Serializable, Comparable{ return result; } - - @Override public boolean equals(Object obj) { if (this == obj) @@ -138,6 +174,5 @@ public class ExternalAccessPerms implements Serializable, Comparable{ return false; return true; } - - + }