summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain')
-rw-r--r--ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRole.java68
-rw-r--r--ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRoleDescription.java (renamed from ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalRoleDescription.java)18
-rw-r--r--ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRolePerms.java66
-rw-r--r--ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessUserRoleDetail.java51
4 files changed, 80 insertions, 123 deletions
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRole.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRole.java
index 8c191181..2c6f3ff7 100644
--- a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRole.java
+++ b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRole.java
@@ -2,7 +2,7 @@
* ============LICENSE_START==========================================
* ONAP Portal SDK
* ===================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
@@ -38,23 +38,25 @@
package org.onap.portalsdk.external.authorization.domain;
import java.io.Serializable;
+import java.util.List;
public class ExternalAccessRole implements Serializable {
- /**
- *
- */
private static final long serialVersionUID = 3439986826362436339L;
+
public String name;
- public String description;
+ private List<ExternalAccessPerms> perms;
+ public ExternalAccessRoleDescription description;
- public ExternalAccessRole() {
+ public ExternalAccessRole() {
+ super();
}
-
- public ExternalAccessRole(String name, String description) {
+
+ public ExternalAccessRole(String name, List<ExternalAccessPerms> ecPerms, ExternalAccessRoleDescription description) {
super();
this.name = name;
+ this.perms = ecPerms;
this.description = description;
}
@@ -65,12 +67,58 @@ public class ExternalAccessRole implements Serializable {
public void setName(String name) {
this.name = name;
}
+
+ public List<ExternalAccessPerms> getPerms() {
+ return perms;
+ }
- public String getDescription() {
+ public void setPerms(List<ExternalAccessPerms> perms) {
+ this.perms = perms;
+ }
+
+ public ExternalAccessRoleDescription getDescription() {
return description;
}
- public void setDescription(String description) {
+ public void setDescription(ExternalAccessRoleDescription description) {
this.description = description;
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((description == null) ? 0 : description.hashCode());
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ result = prime * result + ((perms == null) ? 0 : perms.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ExternalAccessRole other = (ExternalAccessRole) obj;
+ if (description == null) {
+ if (other.description != null)
+ return false;
+ } else if (!description.equals(other.description))
+ return false;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+ if (perms == null) {
+ if (other.perms != null)
+ return false;
+ } else if (!perms.equals(other.perms))
+ return false;
+ return true;
+ }
+
}
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalRoleDescription.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRoleDescription.java
index 68effb0c..e7e18749 100644
--- a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalRoleDescription.java
+++ b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRoleDescription.java
@@ -2,7 +2,7 @@
* ============LICENSE_START==========================================
* ONAP Portal SDK
* ===================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
@@ -37,9 +37,7 @@
*/
package org.onap.portalsdk.external.authorization.domain;
-import java.util.List;
-
-public class ExternalRoleDescription {
+public class ExternalAccessRoleDescription {
private String id;
private String name;
@@ -47,7 +45,6 @@ public class ExternalRoleDescription {
private String priority;
private String appId;
private String appRoleId;
- private List<ExternalAccessPerms> permissions;
public String getId() {
return id;
@@ -85,13 +82,6 @@ public class ExternalRoleDescription {
public void setAppRoleId(String appRoleId) {
this.appRoleId = appRoleId;
}
-
- public List<ExternalAccessPerms> getPermissions() {
- return permissions;
- }
- public void setPermissions(List<ExternalAccessPerms> permissions) {
- this.permissions = permissions;
- }
@Override
public int hashCode() {
final int prime = 31;
@@ -112,7 +102,7 @@ public class ExternalRoleDescription {
return false;
if (getClass() != obj.getClass())
return false;
- ExternalRoleDescription other = (ExternalRoleDescription) obj;
+ ExternalAccessRoleDescription other = (ExternalAccessRoleDescription) obj;
if (active == null) {
if (other.active != null)
return false;
@@ -146,5 +136,7 @@ public class ExternalRoleDescription {
return true;
}
+
+
}
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRolePerms.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRolePerms.java
deleted file mode 100644
index 95b4f0c4..00000000
--- a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRolePerms.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*-
- * ============LICENSE_START==========================================
- * ONAP Portal SDK
- * ===================================================================
- * Copyright (C) 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============================================
- *
- *
- */
-package org.onap.portalsdk.external.authorization.domain;
-
-public class ExternalAccessRolePerms {
-
- private ExternalAccessPerms perm;
- private String role;
-
-
- public ExternalAccessRolePerms(ExternalAccessPerms perm, String role) {
- super();
- this.perm = perm;
- this.role = role;
- }
-
- public ExternalAccessPerms getPerm() {
- return perm;
- }
- public void setPerm(ExternalAccessPerms perm) {
- this.perm = perm;
- }
- public String getRole() {
- return role;
- }
- public void setRole(String role) {
- this.role = role;
- }
-
-
-}
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessUserRoleDetail.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessUserRoleDetail.java
index 929bd351..5e189e5c 100644
--- a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessUserRoleDetail.java
+++ b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessUserRoleDetail.java
@@ -2,7 +2,7 @@
* ============LICENSE_START==========================================
* ONAP Portal SDK
* ===================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
@@ -39,42 +39,30 @@ package org.onap.portalsdk.external.authorization.domain;
public class ExternalAccessUserRoleDetail {
- private String name;
- private ExternalRoleDescription description;
-
+ private ExternalAccessRole role;
+
+ public ExternalAccessRole getRole() {
+ return role;
+ }
+
+ public void setRole(ExternalAccessRole role) {
+ this.role = role;
+ }
- /**
- *
- */
public ExternalAccessUserRoleDetail() {
super();
- }
+ }
- public ExternalAccessUserRoleDetail(String name, ExternalRoleDescription description) {
+ public ExternalAccessUserRoleDetail(ExternalAccessRole role) {
super();
- this.name = name;
- this.description = description;
- }
-
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public ExternalRoleDescription getDescription() {
- return description;
- }
- public void setDescription(ExternalRoleDescription description) {
- this.description = description;
+ this.role = role;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
- result = prime * result + ((description == null) ? 0 : description.hashCode());
- result = prime * result + ((name == null) ? 0 : name.hashCode());
+ result = prime * result + ((role == null) ? 0 : role.hashCode());
return result;
}
@@ -87,15 +75,10 @@ public class ExternalAccessUserRoleDetail {
if (getClass() != obj.getClass())
return false;
ExternalAccessUserRoleDetail other = (ExternalAccessUserRoleDetail) obj;
- if (description == null) {
- if (other.description != null)
- return false;
- } else if (!description.equals(other.description))
- return false;
- if (name == null) {
- if (other.name != null)
+ if (role == null) {
+ if (other.role != null)
return false;
- } else if (!name.equals(other.name))
+ } else if (!role.equals(other.role))
return false;
return true;
}