1 package org.openecomp.portalapp.portal.service;
5 import org.hibernate.Session;
6 import org.openecomp.portalapp.portal.domain.CentralRoleFunction;
7 import org.openecomp.portalapp.portal.domain.EPApp;
8 import org.openecomp.portalapp.portal.domain.EPRole;
9 import org.openecomp.portalapp.portal.transport.CentralRole;
10 import org.openecomp.portalsdk.core.domain.Role;
11 import org.openecomp.portalsdk.core.domain.RoleFunction;
13 public interface ExternalAccessRolesService {
16 * It gets all application roles
19 * @param extRequestValue
23 public List<EPRole> getAppRoles(Long appId, Boolean extRequestValue) throws Exception;
26 * It returns application details
32 public List<EPApp> getApp(String uebkey) throws Exception;
35 * Adds role in the external access system if fails throws exception
42 public boolean addRole(Role addRoles, String uebkey) throws Exception;
45 * Updates role in the external access system otherwise throws exception
52 void updateRole(Role updateRole, EPApp app) throws Exception;
55 * It returns complete user information including application roles permissions
62 String getUser(String loginId, String uebkey) throws Exception;
65 * It returns list of all role functions
70 List<CentralRoleFunction> getRoleFuncList(String string) throws Exception;
73 * It return list of role provided by the app uebkey and roleId
80 CentralRole getRoleInfo(Long roleId, String uebkey) throws Exception;
83 * It returns the CentralRoleFunction object
87 * @return CentralRoleFunction
90 public CentralRoleFunction getRoleFunction(String functionCode, String uebkey) throws Exception;
93 * It saves role function in the DB
95 * @param domainCentralRoleFunction
99 public void saveCentralRoleFunction(CentralRoleFunction domainCentralRoleFunction, EPApp requestedApp) throws Exception;
102 * It deletes role function in the DB
107 public void deleteCentralRoleFunction(String code, String string);
110 * It gets all roles the applications
116 public List<CentralRole> getRolesForApp(String uebkey) throws Exception;
119 * It saves role function in the DB
125 void saveRoleForApplication(Role saveRole, String uebkey) throws Exception;
128 * It deletes role in the DB
134 void deleteRoleForApplication(String code, String uebkey) throws Exception;
137 * It gets all active roles for single application
143 List<CentralRole> getActiveRoles(String uebkey) throws Exception;
146 * It deletes user related roles for an application in the table
153 public void deleteDependcyRoleRecord(Long roleId, String uebkey, String LoginId) throws Exception;
156 * It sync new functions codes and names from and updates role functions from external access system
161 public void syncRoleFunctionFromExternalAccessSystem(EPApp app) throws Exception;
163 public Integer bulkUploadFunctions(String uebkey) throws Exception;
165 public Integer bulkUploadRoles(String uebkey) throws Exception;
167 public void bulkUploadPartnerFunctions(String header, List<RoleFunction> upload) throws Exception;
169 public void bulkUploadPartnerRoles(String header, List<Role> upload) throws Exception;
171 Integer bulkUploadRolesFunctions(String uebkey) throws Exception;
174 * SyncApplicationRolesWithEcompDB sync the roles and rolefunctions to the ecomp DB from AAF
179 void SyncApplicationRolesWithEcompDB(EPApp app) throws Exception;
181 public Integer bulkUploadUserRoles(String uebkey) throws Exception;
183 void bulkUploadPartnerRoleFunctions(String uebkey, List<Role> roleList) throws Exception;
185 public void deleteRoleDependeciesRecord(Session localSession, Long roleId) throws Exception;
187 List<String> getMenuFunctionsList(String uebkey) throws Exception;