pom, upgrade script changes, AAF role desc fix 23/78523/1
authorKishore Reddy, Gujja (kg811t) <kishore.reddy.gujja@att.com>
Thu, 14 Feb 2019 20:16:30 +0000 (15:16 -0500)
committerKishore Reddy, Gujja (kg811t) <kishore.reddy.gujja@att.com>
Thu, 14 Feb 2019 20:16:30 +0000 (15:16 -0500)
Issue-ID: PORTAL-356

portal/SDK release 2.5.1, POM, upgrade script

Change-Id: If71a1bbbcf31699ed424c86a8fead2e3c704373f
Signed-off-by: Kishore Reddy, Gujja (kg811t) <kishore.reddy.gujja@att.com>
22 files changed:
ecomp-sdk/epsdk-aaf/pom.xml
ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessPerms.java
ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRole.java
ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRoleDescription.java [deleted file]
ecomp-sdk/epsdk-aaf/src/test/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessPermsTest.java
ecomp-sdk/epsdk-aaf/src/test/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRoleDescriptionTest.java [deleted file]
ecomp-sdk/epsdk-aaf/src/test/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRoleTest.java
ecomp-sdk/epsdk-aaf/src/test/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessUserRoleDetailTest.java
ecomp-sdk/epsdk-aaf/src/test/java/org/onap/portalsdk/external/authorization/util/EcompExternalAuthUtilsTest.java
ecomp-sdk/epsdk-analytics/pom.xml
ecomp-sdk/epsdk-app-common/pom.xml
ecomp-sdk/epsdk-app-os/pom.xml
ecomp-sdk/epsdk-app-overlay/pom.xml
ecomp-sdk/epsdk-core/pom.xml
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserApiServiceImpl.java
ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/UserApiServiceImplTest.java
ecomp-sdk/epsdk-domain/pom.xml
ecomp-sdk/epsdk-fw/pom.xml
ecomp-sdk/epsdk-logger/pom.xml
ecomp-sdk/epsdk-music/pom.xml
ecomp-sdk/epsdk-workflow/pom.xml
ecomp-sdk/pom.xml

index 0ad8ac6..0ed95f0 100644 (file)
@@ -7,12 +7,12 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>2.5.0</version>
+               <version>2.5.1</version>
        </parent>
        
        <groupId>org.onap.portal.sdk</groupId>
        <artifactId>epsdk-aaf</artifactId>
-       <version>2.5.0</version>
+       <version>2.5.1</version>
        <packaging>jar</packaging>
 
        <name>ONAP Portal SDK AAF Authorization</name>
index a598a4c..50496b5 100644 (file)
@@ -39,7 +39,7 @@ package org.onap.portalsdk.external.authorization.domain;
 
 import java.io.Serializable;
 
-public class ExternalAccessPerms implements Serializable, Comparable {
+public class ExternalAccessPerms implements Serializable {
 
        /**
         * 
@@ -122,16 +122,6 @@ public class ExternalAccessPerms implements Serializable, Comparable {
                this.description = description;
        }
 
-       @Override
-       public int compareTo(Object obj) {
-               ExternalAccessPerms other = (ExternalAccessPerms) obj;
-
-               String c1 = getInstance();
-               String c2 = other.getInstance();
-
-               return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);
-       }
-
        @Override
        public int hashCode() {
                final int prime = 31;
index 2c6f3ff..21c33ed 100644 (file)
@@ -46,18 +46,16 @@ public class ExternalAccessRole implements Serializable {
        
        public String name;
        private List<ExternalAccessPerms> perms;
-       public ExternalAccessRoleDescription description;
        
        
        public ExternalAccessRole() {
                super();
        }
 
-       public ExternalAccessRole(String name, List<ExternalAccessPerms> ecPerms, ExternalAccessRoleDescription description) {
+       public ExternalAccessRole(String name, List<ExternalAccessPerms> ecPerms) {
                super();
                this.name = name;
                this.perms = ecPerms;
-               this.description = description;
        }
        
        public String getName() {
@@ -76,18 +74,10 @@ public class ExternalAccessRole implements Serializable {
                this.perms = perms;
        }
 
-       public ExternalAccessRoleDescription getDescription() {
-               return 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;
@@ -102,11 +92,6 @@ public class ExternalAccessRole implements Serializable {
                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;
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRoleDescription.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRoleDescription.java
deleted file mode 100644 (file)
index e7e1874..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/*-
- * ============LICENSE_START==========================================
- * ONAP Portal SDK
- * ===================================================================
- * Copyright (C) 2017-2018 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 ExternalAccessRoleDescription {
-
-       private String id;
-       private String  name;
-    private String active;
-    private String priority;
-    private String appId;
-    private String appRoleId;
-    
-       public String getId() {
-               return id;
-       }
-       public void setId(String id) {
-               this.id = id;
-       }
-       public String getName() {
-               return name;
-       }
-       public void setName(String name) {
-               this.name = name;
-       }
-       public String getActive() {
-               return active;
-       }
-       public void setActive(String active) {
-               this.active = active;
-       }
-       public String getPriority() {
-               return priority;
-       }
-       public void setPriority(String priority) {
-               this.priority = priority;
-       }
-       public String getAppId() {
-               return appId;
-       }
-       public void setAppId(String appId) {
-               this.appId = appId;
-       }
-       public String getAppRoleId() {
-               return appRoleId;
-       }
-       public void setAppRoleId(String appRoleId) {
-               this.appRoleId = appRoleId;
-       }
-       @Override
-       public int hashCode() {
-               final int prime = 31;
-               int result = 1;
-               result = prime * result + ((active == null) ? 0 : active.hashCode());
-               result = prime * result + ((appId == null) ? 0 : appId.hashCode());
-               result = prime * result + ((appRoleId == null) ? 0 : appRoleId.hashCode());
-               result = prime * result + ((id == null) ? 0 : id.hashCode());
-               result = prime * result + ((name == null) ? 0 : name.hashCode());
-               result = prime * result + ((priority == null) ? 0 : priority.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;
-               ExternalAccessRoleDescription other = (ExternalAccessRoleDescription) obj;
-               if (active == null) {
-                       if (other.active != null)
-                               return false;
-               } else if (!active.equals(other.active))
-                       return false;
-               if (appId == null) {
-                       if (other.appId != null)
-                               return false;
-               } else if (!appId.equals(other.appId))
-                       return false;
-               if (appRoleId == null) {
-                       if (other.appRoleId != null)
-                               return false;
-               } else if (!appRoleId.equals(other.appRoleId))
-                       return false;
-               if (id == null) {
-                       if (other.id != null)
-                               return false;
-               } else if (!id.equals(other.id))
-                       return false;
-               if (name == null) {
-                       if (other.name != null)
-                               return false;
-               } else if (!name.equals(other.name))
-                       return false;
-               if (priority == null) {
-                       if (other.priority != null)
-                               return false;
-               } else if (!priority.equals(other.priority))
-                       return false;
-               return true;
-       }
-    
-       
-    
-    
-}
index b118811..b564524 100644 (file)
@@ -86,18 +86,6 @@ public class ExternalAccessPermsTest {
                 .equals(new ExternalAccessPerms("test_type", "test_instance", "*", "test_name")));
     }
     
-    @Test
-    public void testCompareTo()
-    {
-        ExternalAccessPerms extPermsDetailTest1 = new ExternalAccessPerms("test_type", "test_instance", "*");
-        ExternalAccessPerms extPermsDetailTest2 = new ExternalAccessPerms("test_type", "test_instance", "*",
-                "test_name");
-        extPermsDetailTest1.setInstance("test_instance");
-        extPermsDetailTest2.setInstance("test_instance");
-        int result= extPermsDetailTest1.compareTo(extPermsDetailTest2);
-        assertEquals(0, result);
-    }
-    
     @Test
     public void testHashCode()
     {
diff --git a/ecomp-sdk/epsdk-aaf/src/test/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRoleDescriptionTest.java b/ecomp-sdk/epsdk-aaf/src/test/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRoleDescriptionTest.java
deleted file mode 100644 (file)
index 9e7970b..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-
- * ============LICENSE_START==========================================
- * ONAP Portal SDK
- * ===================================================================
- * Copyright (C) 2018 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;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-
-public class ExternalAccessRoleDescriptionTest {
-
-       public ExternalAccessRoleDescription mockExternalRoleDescriptionTest() {
-               ExternalAccessRoleDescription mockExtRoleDesc =  new ExternalAccessRoleDescription();
-               mockExtRoleDesc.setActive("true");
-               mockExtRoleDesc.setAppRoleId("1");
-               mockExtRoleDesc.setAppId("1");
-               mockExtRoleDesc.setId("1");
-               mockExtRoleDesc.setName("test");
-               mockExtRoleDesc.setPriority("1");
-               return mockExtRoleDesc;
-       }
-
-       @Test
-       public void externalRoleDescriptionTest() {
-               ExternalAccessRoleDescription extRoleDesc =  new ExternalAccessRoleDescription();
-               extRoleDesc.setActive("true");
-               extRoleDesc.setAppRoleId("1");
-               extRoleDesc.setAppId("1");
-               extRoleDesc.setId("1");
-               extRoleDesc.setName("test");
-               extRoleDesc.setPriority("1");
-               assertEquals(extRoleDesc.getActive(), mockExternalRoleDescriptionTest().getActive());
-               assertEquals(extRoleDesc.getAppId(), mockExternalRoleDescriptionTest().getAppId());
-               assertEquals(extRoleDesc.getAppRoleId(), mockExternalRoleDescriptionTest().getAppRoleId());
-               assertEquals(extRoleDesc.getId(), mockExternalRoleDescriptionTest().getId());
-               assertEquals(extRoleDesc.getName(), mockExternalRoleDescriptionTest().getName());
-               assertEquals(extRoleDesc.getPriority(), mockExternalRoleDescriptionTest().getPriority());
-               assertEquals(true, extRoleDesc.equals(mockExternalRoleDescriptionTest()));
-       }
-}
index 557f544..c4595a6 100644 (file)
@@ -56,18 +56,15 @@ public class ExternalAccessRoleTest {
 
     public ExternalAccessRole mockExternalAccessRoleTest() {
         ExternalAccessRole mockRole = new ExternalAccessRole();
-        ExternalAccessRoleDescription roleDesc =  new ExternalAccessRoleDescription();
+        String roleDesc = "";
         ExternalAccessPerms ecPerm =  new ExternalAccessPerms();
         List<ExternalAccessPerms> ecPerms = new ArrayList<>();
         ecPerm.setAction("test_action");
         ecPerm.setType("test_type");
         ecPerm.setInstance("test_instance");
         ecPerm.setDescription("test_description");
-        roleDesc.setActive("true");
-        roleDesc.setAppId("1");
         mockRole.setName("test_role");
         mockRole.setPerms(ecPerms);
-        mockRole.setDescription(roleDesc);
         return mockRole;
     }
     
@@ -75,8 +72,8 @@ public class ExternalAccessRoleTest {
     public void setUp()
     {
         mockRole = mockExternalAccessRoleTest();
-        role = new ExternalAccessRole(mockRole.getName(), mockRole.getPerms(), mockRole.getDescription());
-        role1= new ExternalAccessRole(mockRole.getName(), mockRole.getPerms(), mockRole.getDescription());;
+        role = new ExternalAccessRole(mockRole.getName(), mockRole.getPerms());
+        role1= new ExternalAccessRole(mockRole.getName(), mockRole.getPerms());
     }
 
     @Test
@@ -84,7 +81,6 @@ public class ExternalAccessRoleTest {
         
         assertEquals(role.getName(), mockExternalAccessRoleTest().getName());
         assertEquals(role.getPerms(), mockExternalAccessRoleTest().getPerms());
-        assertEquals(role.getDescription(), mockExternalAccessRoleTest().getDescription());
     }
     
     @Test
index f0a0a69..fd6d530 100644 (file)
@@ -58,16 +58,7 @@ public class ExternalAccessUserRoleDetailTest {
         mockExtPermsTest.setType("test_type");
         mockExtPermsTest.setInstance("test_instance");
         mockPerms.add(mockExtPermsTest);
-        ExternalAccessRoleDescription mockRoleDesc = new ExternalAccessRoleDescription();
-        mockRoleDesc.setActive("true");
-        mockRoleDesc.setAppId("1");
-        mockRoleDesc.setAppRoleId("1");
-        mockRoleDesc.setId("1");
-        mockRoleDesc.setPriority("1");
-        mockRoleDesc.setName("test");
-        mockRoleDesc.setName("com.test.app.rolename");
         role.setPerms(mockPerms);
-        role.setDescription(mockRoleDesc);
         ExternalAccessUserRoleDetail mockExtUserRoleDetailTest = new ExternalAccessUserRoleDetail(role);
         return mockExtUserRoleDetailTest;
     }
@@ -78,7 +69,6 @@ public class ExternalAccessUserRoleDetailTest {
         ExternalAccessRole role =  extUserRoleDetailTest2.getRole();
         assertEquals(role.getName(), mockExternalAccessUserRoleDetailTest().getRole().getName());
         assertEquals(role.getPerms(), mockExternalAccessUserRoleDetailTest().getRole().getPerms());
-        assertEquals(role.getDescription(), mockExternalAccessUserRoleDetailTest().getRole().getDescription());
 
     }
     
index 98260e2..d2f6472 100644 (file)
@@ -37,9 +37,7 @@
  */
 package org.onap.portalsdk.external.authorization.util;
 
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
 
 import javax.xml.bind.DatatypeConverter;
 
@@ -108,16 +106,4 @@ public class EcompExternalAuthUtilsTest {
        public void checkNameSpaceMatchingLengthTest() throws Exception {
                EcompExternalAuthUtils.checkNameSpaceMatching("com.test.app2.role", "com.test.app2.role.test");
        }
-
-       @Test
-       public void isJsonValidTest() {
-               boolean actual = EcompExternalAuthUtils.isJSONValid("{\"test\":\"test\"}");
-               assertTrue(actual);
-       }
-
-       @Test
-       public void isJsonValidFailTest() {
-               boolean actual = EcompExternalAuthUtils.isJSONValid("{\"test\":\"test\"");
-               assertFalse(actual);
-       }
 }
index 8832dc6..5e442ac 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>2.5.0</version>
+               <version>2.5.1</version>
        </parent>
        
        <!-- GroupId is inherited from parent -->
index 0796228..6ae34ed 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>2.5.0</version>
+               <version>2.5.1</version>
        </parent>
 
        <!-- GroupId is inherited from parent -->
index 01ef6c3..5c9dd42 100644 (file)
@@ -9,7 +9,7 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>2.5.0</version>
+               <version>2.5.1</version>
        </parent>
 
        <!-- GroupId is inherited from parent -->
index a031711..036df01 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>2.5.0</version>
+               <version>2.5.1</version>
        </parent>
 
        <!-- GroupId is inherited from parent -->
index da32024..6990268 100644 (file)
@@ -6,7 +6,7 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>2.5.0</version>
+               <version>2.5.1</version>
        </parent>
 
        <!-- GroupId is inherited from parent -->
index 074419e..fd05c69 100644 (file)
@@ -1,5 +1,4 @@
 
-
 /*-
  * ============LICENSE_START==========================================
  * ONAP Portal SDK
@@ -62,7 +61,6 @@ import org.onap.portalsdk.core.onboarding.util.CipherUtil;
 import org.onap.portalsdk.core.util.SystemProperties;
 import org.onap.portalsdk.external.authorization.domain.ExternalAccessPerms;
 import org.onap.portalsdk.external.authorization.domain.ExternalAccessRole;
-import org.onap.portalsdk.external.authorization.domain.ExternalAccessRoleDescription;
 import org.onap.portalsdk.external.authorization.domain.ExternalAccessUserRoleDetail;
 import org.onap.portalsdk.external.authorization.exception.UserNotFoundException;
 import org.onap.portalsdk.external.authorization.service.AAFRestServiceImpl;
@@ -85,7 +83,6 @@ import com.fasterxml.jackson.databind.type.TypeFactory;
 @Service("userApiService")
 public class UserApiServiceImpl implements UserApiService {
 
-
        private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserApiServiceImpl.class);
 
        @Autowired
@@ -104,8 +101,7 @@ public class UserApiServiceImpl implements UserApiService {
 
        @Autowired
        private AppService appService;
-       
-       
+
        private AAFService aafService = new AAFRestServiceImpl();
 
        @Override
@@ -114,7 +110,7 @@ public class UserApiServiceImpl implements UserApiService {
                try {
                        String namespace = EcompExternalAuthProperties
                                        .getProperty(EcompExternalAuthProperties.EXTERNAL_AUTH_NAMESPACE);
-                       
+
                        HttpHeaders headers = getBasicAuthHeaders();
                        String userRoles = aafService.getUser(orgUserId, request, headers);
                        ObjectMapper mapper = new ObjectMapper();
@@ -148,12 +144,6 @@ public class UserApiServiceImpl implements UserApiService {
                                                .endsWith(EcompExternalAuthUtils.EXT_ROLE_FIELD_ADMIN)
                                                && !role.getString(EcompExternalAuthUtils.EXT_ROLE_FIELD_NAME)
                                                                .endsWith(EcompExternalAuthUtils.EXT_ROLE_FIELD_OWNER)) {
-                                       ExternalAccessRoleDescription ecDesc = new ExternalAccessRoleDescription();
-                                       if (role.has(EcompExternalAuthUtils.EXT_FIELD_DESCRIPTION) && EcompExternalAuthUtils
-                                                       .isJSONValid(role.getString(EcompExternalAuthUtils.EXT_FIELD_DESCRIPTION))) {
-                                               ecDesc = mapper.readValue(role.getString(EcompExternalAuthUtils.EXT_FIELD_DESCRIPTION),
-                                                               ExternalAccessRoleDescription.class);
-                                       }
                                        List<ExternalAccessPerms> ecPerms = new ArrayList<>();
                                        if (role.has(EcompExternalAuthUtils.EXT_FIELD_PERMS)) {
                                                JSONArray perms = role.getJSONArray(EcompExternalAuthUtils.EXT_FIELD_PERMS);
@@ -161,7 +151,7 @@ public class UserApiServiceImpl implements UserApiService {
                                                                .constructCollectionType(List.class, ExternalAccessPerms.class));
                                        }
                                        ExternalAccessRole ecRole = new ExternalAccessRole(
-                                                       role.getString(EcompExternalAuthUtils.EXT_ROLE_FIELD_NAME), ecPerms, ecDesc);
+                                                       role.getString(EcompExternalAuthUtils.EXT_ROLE_FIELD_NAME), ecPerms);
                                        userRoleDetail = new ExternalAccessUserRoleDetail(ecRole);
                                        userRoleDetailList.add(userRoleDetail);
                                }
@@ -203,21 +193,11 @@ public class UserApiServiceImpl implements UserApiService {
                Set userApps = new TreeSet();
                for (ExternalAccessUserRoleDetail userRoleDetail : userRoleDetailList) {
                        ExternalAccessRole ecRole = userRoleDetail.getRole();
-                       ExternalAccessRoleDescription roleDesc = ecRole.getDescription();
                        UserApp userApp = new UserApp();
                        Role role = new Role();
                        Set roleFunctions = new TreeSet<>();
-                       if (roleDesc.getName() == null) {
-                               role.setActive(true);
-                               role.setName(ecRole.getName());
-                       } else {
-                               role.setActive(Boolean.valueOf(roleDesc.getActive()));
-                               role.setId(Long.valueOf(roleDesc.getAppRoleId()));
-                               role.setName(roleDesc.getName());
-                               if (!roleDesc.getPriority().equals(EcompExternalAuthUtils.EXT_NULL_VALUE)) {
-                                       role.setPriority(Integer.valueOf(roleDesc.getPriority()));
-                               }
-                       }
+                       role.setActive(true);
+                       role.setName(ecRole.getName());
                        for (ExternalAccessPerms extPerm : ecRole.getPerms()) {
                                RoleFunction roleFunction = new RoleFunction();
                                roleFunction.setCode(extPerm.getInstance());
@@ -252,10 +232,10 @@ public class UserApiServiceImpl implements UserApiService {
        @Override
        public List<RoleFunction> getRoleFunctions(String orgUserId) throws Exception {
                HttpHeaders headers = getBasicAuthHeaders();
-               return aafService.getRoleFunctions(orgUserId,headers);
+               return aafService.getRoleFunctions(orgUserId, headers);
        }
 
-
+       @SuppressWarnings("unused")
        private ResponseEntity<String> getPermsFromExternalAuthSystem(HttpEntity<String> entity, String endPoint) {
                ResponseEntity<String> getResponse = template.exchange(
                                EcompExternalAuthProperties.getProperty(EcompExternalAuthProperties.EXTERNAL_AUTH_URL) + endPoint,
@@ -283,14 +263,13 @@ public class UserApiServiceImpl implements UserApiService {
                                result = CipherUtil.decryptPKC(encrypted,
                                                SystemProperties.getProperty(SystemProperties.Decryption_Key));
                        } catch (Exception e) {
-                               logger.error(EELFLoggerDelegate.errorLogger,"decryptedPassword failed", e);
+                               logger.error(EELFLoggerDelegate.errorLogger, "decryptedPassword failed", e);
                                throw e;
                        }
                }
                return result;
        }
-       
-       
+
        private SearchResult loadSearchResultData(PostSearchBean searchCriteria) throws NamingException {
                return ldapService.searchPost(searchCriteria.getUser(), searchCriteria.getSortBy1(),
                                searchCriteria.getSortBy2(), searchCriteria.getSortBy3(), searchCriteria.getPageNo(),
@@ -302,15 +281,13 @@ public class UserApiServiceImpl implements UserApiService {
                String encryptedPass = EcompExternalAuthProperties
                                .getProperty(EcompExternalAuthProperties.EXTERNAL_AUTH_PASSWORD);
                String appPassword = decryptPass(encryptedPass);
-               return aafService.checkUserExists(username,password, appPassword);
+               return aafService.checkUserExists(username, password, appPassword);
        }
 
-       
-
        @Override
        public List<ExternalAccessPerms> getIfUserPermsExists(String username) throws Exception {
                HttpHeaders headers = getBasicAuthHeaders();
-               return aafService.getIfUserPermsExists(username,headers);
+               return aafService.getIfUserPermsExists(username, headers);
        }
 
 }
\ No newline at end of file
index 7fa24ad..0d76b44 100644 (file)
@@ -230,7 +230,6 @@ public class UserApiServiceImplTest {
                userRolesList.add(mockJsonObjectRole4);
                userRolesList.add(mockJsonObjectRole5);
                mockJsonObjectFinalUserRole.put("role", userRolesList);
-               Mockito.when(EcompExternalAuthUtils.isJSONValid(addDesc)).thenReturn(true);
                ResponseEntity<String> response = new ResponseEntity<>(mockJsonObjectFinalUserRole.toString(), HttpStatus.OK);
                Mockito.when(template.exchange(Matchers.anyString(), Matchers.eq(HttpMethod.GET),
                                Matchers.<HttpEntity<String>>any(), Matchers.eq(String.class))).thenReturn(response);
@@ -240,6 +239,7 @@ public class UserApiServiceImplTest {
                String user = mapper.writeValueAsString(userObj());
                Mockito.when(aafService.getUser("test123", mockedRequest, headers)).thenReturn(user);
                User actual = UserApiServiceImpl.getUser("test123", mockedRequest);
+               assertNull(actual);
        }
 
        @Test
index e3c1e97..5bf776e 100644 (file)
@@ -5,12 +5,12 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>2.5.0</version>
+               <version>2.5.1</version>
        </parent>
 
        <groupId>org.onap.portal.sdk</groupId>
        <artifactId>epsdk-domain</artifactId>
-       <version>2.5.0</version>
+       <version>2.5.1</version>
        <packaging>jar</packaging>
        <name>ONAP Portal SDK Domain</name>
 
index 151a01e..019f19b 100644 (file)
@@ -6,7 +6,7 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>2.5.0</version>
+               <version>2.5.1</version>
        </parent>
 
        <!-- GroupId is inherited from parent -->
@@ -72,7 +72,7 @@
         <dependency>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-logger</artifactId>
-               <version>2.5.0</version>
+               <version>2.5.1</version>
        </dependency>
        <dependency>
        <groupId>org.onap.aaf.authz</groupId>
index 4d07982..a1f4c15 100644 (file)
@@ -4,12 +4,12 @@
   <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>2.5.0</version>
+               <version>2.5.1</version>
   </parent>
   
   <groupId>org.onap.portal.sdk</groupId>
   <artifactId>epsdk-logger</artifactId>
-  <version>2.5.0</version>
+  <version>2.5.1</version>
   
   <dependencies>
        <dependency>
index 6dc20dc..86955e5 100644 (file)
@@ -5,12 +5,12 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>2.5.0</version>
+               <version>2.5.1</version>
        </parent>
        
        <groupId>org.onap.portal.sdk</groupId>
        <artifactId>epsdk-music</artifactId>
-       <version>2.5.0</version>
+       <version>2.5.1</version>
        <packaging>jar</packaging>
 
        <name>ONAP Portal SDK Music</name>
index 300ed92..8590501 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>2.5.0</version>
+               <version>2.5.1</version>
        </parent>
        
        <!-- GroupId is inherited from parent -->
index 178e789..d298b7b 100644 (file)
@@ -13,7 +13,7 @@
        <!-- Portal SDK Maven parent project -->
        <groupId>org.onap.portal.sdk</groupId>
        <artifactId>epsdk-project</artifactId>
-       <version>2.5.0</version>
+       <version>2.5.1</version>
        <packaging>pom</packaging>
        <name>portal-sdk</name>
        <url>https://wiki.onap.org/display/DW/Portal</url>