Update license; improve coverage; add docs dir
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / transport / ExternalAccessPerms.java
index 27d0dd0..aeb2ad3 100644 (file)
@@ -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;
        }
-       
-       
+
 }