Docker changes and Music Integration
[portal.git] / ecomp-portal-BE-common / src / main / java / org / onap / portalapp / portal / service / ExternalAccessRolesService.java
index d65f115..2f72bab 100644 (file)
@@ -49,7 +49,9 @@ import org.onap.portalapp.portal.domain.EPApp;
 import org.onap.portalapp.portal.domain.EPRole;
 import org.onap.portalapp.portal.domain.EPUser;
 import org.onap.portalapp.portal.domain.ExternalRoleDetails;
+import org.onap.portalapp.portal.exceptions.InvalidUserException;
 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;
@@ -100,7 +102,7 @@ public interface ExternalAccessRolesService {
         * @return EPUser object
         * @throws Exception
         */
-       List<EPUser> getUser(String loginId) throws Exception;
+       List<EPUser> getUser(String loginId) throws InvalidUserException;
        
        /**
         * It returns complete user information including application roles permissions
@@ -131,11 +133,11 @@ public interface ExternalAccessRolesService {
        CentralV2Role getRoleInfo(Long roleId, String uebkey) throws Exception;
        
        /**
-        *  It returns the CentralRoleFunction object 
+        *  It returns the CentralV2RoleFunction object 
         *   
         * @param functionCode
         * @param uebkey 
-        * @return CentralRoleFunction
+        * @return CentralV2RoleFunction
         * @throws Exception 
         */
        public CentralV2RoleFunction getRoleFunction(String functionCode, String uebkey) throws Exception;
@@ -149,7 +151,7 @@ public interface ExternalAccessRolesService {
         * @throws Exception 
         */
        public boolean saveCentralRoleFunction(CentralV2RoleFunction domainCentralRoleFunction, EPApp requestedApp) throws Exception;
-
+       
        /**
         * It deletes role function in the DB
         * 
@@ -334,11 +336,11 @@ public interface ExternalAccessRolesService {
        public  List<EPRole> getGlobalRolesOfPortal();
        
        /**
-        * It converts list of CentralRoleFunction objects to RoleFunction objects
+        * It converts list of CentralV2RoleFunction objects to older version of CentralRoleFunction objects
         * @param answer contains list of CentralRoleFunction objects
-        * @return List of RoleFunction objects
+        * @return List of CentralRoleFunction objects
         */
-       public List<RoleFunction> convertCentralRoleFunctionToRoleFunctionObject(List<CentralV2RoleFunction> answer);
+       public List<CentralRoleFunction> convertCentralRoleFunctionToRoleFunctionObject(List<CentralV2RoleFunction> answer);
        
        /**
         * 
@@ -432,5 +434,23 @@ public interface ExternalAccessRolesService {
                        ObjectMapper mapper, JSONArray extRole) throws IOException, JsonParseException, JsonMappingException;
        
        public JSONArray getAllUsersByRole(String roleName) throws Exception;
+       
+       /**
+        * 
+        * It check function code has any pipes, if found return function type
+        * 
+        * @param roleFuncItem
+        * @param type
+        * @return function type
+        */
+       String getFunctionCodeType(String roleFuncItem);
+       
+       /**
+        * It return function action
+        * 
+        * @param roleFuncItem
+        * @return String action
+        */
+       String getFunctionCodeAction(String roleFuncItem);
 
 }