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.domain.EPUser;
10 import org.openecomp.portalapp.portal.transport.CentralRole;
11 import org.openecomp.portalsdk.core.domain.Role;
12 import org.openecomp.portalsdk.core.domain.RoleFunction;
14 public interface ExternalAccessRolesService {
17 * It gets list of application roles
23 public List<EPRole> getAppRoles(Long appId) throws Exception;
26 * It returns single app record
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 * It returns complete user information
48 * @return EPUser object
51 List<EPUser> getUser(String loginId) throws Exception;
54 * It returns complete user information including application roles permissions
61 String getUserWithRoles(String loginId, String uebkey) throws Exception;
64 * It returns list of all role functions
69 List<CentralRoleFunction> getRoleFuncList(String string) throws Exception;
72 * It return list of role provided by the app uebkey and roleId
79 CentralRole getRoleInfo(Long roleId, String uebkey) throws Exception;
82 * It returns the CentralRoleFunction object
86 * @return CentralRoleFunction
89 public CentralRoleFunction getRoleFunction(String functionCode, String uebkey) throws Exception;
92 * It saves role function in the DB
94 * @param domainCentralRoleFunction
96 * @return true else false
99 public boolean saveCentralRoleFunction(CentralRoleFunction domainCentralRoleFunction, EPApp requestedApp) throws Exception;
102 * It deletes role function in the DB
107 public boolean deleteCentralRoleFunction(String code, EPApp app);
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 boolean saveRoleForApplication(Role saveRole, String uebkey) throws Exception;
128 * It deletes role in the DB
132 * @return true else false
135 boolean deleteRoleForApplication(String code, String uebkey) throws Exception;
138 * It gets all active roles for single application
144 List<CentralRole> getActiveRoles(String uebkey) throws Exception;
147 * It deletes user related roles for an application in the table
151 * @return true else false
154 public boolean deleteDependencyRoleRecord(Long roleId, String uebkey, String LoginId) throws Exception;
157 * It sync new functions codes and names from and updates role functions from external access system
162 public void syncRoleFunctionFromExternalAccessSystem(EPApp app) throws Exception;
165 * It uploads portal functions into external auth system
170 public Integer bulkUploadFunctions(String uebkey) throws Exception;
173 * It uploads portal roles into external auth system
178 public Integer bulkUploadRoles(String uebkey) throws Exception;
181 * It uploads partner application role functions into external auth system
187 public void bulkUploadPartnerFunctions(String uebkey, List<RoleFunction> upload) throws Exception;
190 * It uploads partner application role functions into external auth system
196 public void bulkUploadPartnerRoles(String uebkey, List<Role> upload) throws Exception;
199 * It returns total no. of portal application role functions records added in external auth system
204 Integer bulkUploadRolesFunctions(String uebkey) throws Exception;
207 * It syncs the roles and rolefunctions to the ecomp DB from AAF
211 void syncApplicationRolesWithEcompDB(EPApp app) throws Exception;
214 * It uploads list of user roles of the application into external auth system
220 public Integer bulkUploadUserRoles(String uebkey) throws Exception;
223 * It Uploads partner application role functions into external auth system
229 void bulkUploadPartnerRoleFunctions(String uebkey, List<Role> roleList) throws Exception;
232 * it deletes all dependency role records
234 * @param localSession
239 public void deleteRoleDependencyRecords(Session localSession, Long roleId, Long appId) throws Exception;
242 * It returns list of applications functions along with functions associated with global role
248 List<String> getMenuFunctionsList(String uebkey) throws Exception;