X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-BE-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fportalapp%2Fportal%2Fservice%2FExternalAccessRolesService.java;h=53a7a5f5b7ba13afc629ba65e49937ccfea5d6ab;hb=83de9db899ebf7ec87220670d6f5cf35a10d087b;hp=170d432389d810bccc5772e5ec8983f0e6401154;hpb=2edaa4d6a5f7066e0c718f85a7bf7b8dabd0c59b;p=portal.git diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ExternalAccessRolesService.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ExternalAccessRolesService.java index 170d4323..53a7a5f5 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ExternalAccessRolesService.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ExternalAccessRolesService.java @@ -40,6 +40,7 @@ package org.onap.portalapp.portal.service; import java.io.IOException; import java.util.List; import java.util.Map; +import java.util.Set; import org.hibernate.Session; import org.json.JSONArray; @@ -51,12 +52,14 @@ import org.onap.portalapp.portal.domain.EPUser; import org.onap.portalapp.portal.domain.ExternalRoleDetails; import org.onap.portalapp.portal.ecomp.model.UploadRoleFunctionExtSystem; import org.onap.portalapp.portal.exceptions.InvalidUserException; +import org.onap.portalapp.portal.exceptions.RoleFunctionException; import org.onap.portalapp.portal.transport.CentralRole; import org.onap.portalapp.portal.transport.CentralRoleFunction; import org.onap.portalapp.portal.transport.CentralUser; import org.onap.portalapp.portal.transport.CentralV2Role; import org.onap.portalapp.portal.transport.ExternalRequestFieldsValidator; import org.onap.portalsdk.core.domain.Role; +import org.onap.portalsdk.core.restful.domain.EcompRole; import org.onap.portalsdk.core.restful.domain.EcompUser; import org.springframework.http.HttpEntity; import org.springframework.http.ResponseEntity; @@ -387,7 +390,7 @@ public interface ExternalAccessRolesService { * @param app * @return List of EPRole objects */ - Map getCurrentRolesInDB(EPApp app); + Map getAppRoleNamesWithUnderscoreMap(EPApp app); /** @@ -412,13 +415,6 @@ public interface ExternalAccessRolesService { */ public JSONArray getAppRolesJSONFromExtAuthSystem(EPApp app) throws Exception; - /** - * It encodes the function code based on Hex encoding - * @param funCode - * - */ - public String encodeFunctionCode(String funCode); - /** * * It returns list of ExternalRoleDetails which is converted from JSON array of roles @@ -482,4 +478,37 @@ public interface ExternalAccessRolesService { */ ResponseEntity getUserRolesFromExtAuthSystem(String orgUserId, HttpEntity getUserRolesEntity) throws Exception; + /** + * + * Updates app role description in external auth system + * + * @param uebkey + * @return number of updates + */ + public Integer updateAppRoleDescription(String uebkey); + + /** + * Creates centralRoleObject + * @param app + * @param roleInfo + * @param roleList + * @param params + * @return returns List + * @throws RoleFunctionException + */ + public List createCentralRoleObject(List app, List roleInfo, + List roleList, Map params) throws RoleFunctionException; + + /** + * + * @param uebkey + * @param loginId + * @param CurrentUserRoles + * @return returns list of user roles + * @throws Exception + */ + public List missingUserApplicationRoles(String uebkey, String loginId, Set CurrentUserRoles) throws Exception; + + List getPortalAppRoleInfo(Long roleId); + }