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;
13 import org.openecomp.portalsdk.core.restful.domain.EcompUser;
15 public interface ExternalAccessRolesService {
18 * It gets list of application roles
24 public List<EPRole> getAppRoles(Long appId) throws Exception;
27 * It returns single app record
33 public List<EPApp> getApp(String uebkey) throws Exception;
36 * Adds role in the external access system if fails throws exception
43 public boolean addRole(Role addRoles, String uebkey) throws Exception;
46 * It returns complete user information
49 * @return EPUser object
52 List<EPUser> getUser(String loginId) throws Exception;
55 * It returns complete user information including application roles permissions
62 String getUserWithRoles(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
97 * @return true else false
100 public boolean saveCentralRoleFunction(CentralRoleFunction domainCentralRoleFunction, EPApp requestedApp) throws Exception;
103 * It deletes role function in the DB
108 public boolean deleteCentralRoleFunction(String code, EPApp app);
111 * It gets all roles the applications
117 public List<CentralRole> getRolesForApp(String uebkey) throws Exception;
120 * It saves role function in the DB
126 boolean saveRoleForApplication(Role saveRole, String uebkey) throws Exception;
129 * It deletes role in the DB
133 * @return true else false
136 boolean deleteRoleForApplication(String code, String uebkey) throws Exception;
139 * It gets all active roles for single application
145 List<CentralRole> getActiveRoles(String uebkey) throws Exception;
148 * It deletes user related roles for an application in the table
152 * @return true else false
155 public boolean deleteDependencyRoleRecord(Long roleId, String uebkey, String LoginId) throws Exception;
158 * It sync new functions codes and names from and updates role functions from external access system
163 public void syncRoleFunctionFromExternalAccessSystem(EPApp app) throws Exception;
166 * It uploads portal functions into external auth system
171 public Integer bulkUploadFunctions(String uebkey) throws Exception;
174 * It uploads portal roles into external auth system
179 public Integer bulkUploadRoles(String uebkey) throws Exception;
182 * It uploads partner application role functions into external auth system
188 public void bulkUploadPartnerFunctions(String uebkey, List<RoleFunction> upload) throws Exception;
191 * It uploads partner application role functions into external auth system
197 public void bulkUploadPartnerRoles(String uebkey, List<Role> upload) throws Exception;
200 * It returns total no. of portal application role functions records added in external auth system
205 Integer bulkUploadRolesFunctions(String uebkey) throws Exception;
208 * It syncs the roles and rolefunctions to the ecomp DB from AAF
212 void syncApplicationRolesWithEcompDB(EPApp app) throws Exception;
215 * It uploads list of user roles of the application into external auth system
221 public Integer bulkUploadUserRoles(String uebkey) throws Exception;
224 * It Uploads partner application role functions into external auth system
230 void bulkUploadPartnerRoleFunctions(String uebkey, List<Role> roleList) throws Exception;
233 * it deletes all dependency role records
235 * @param localSession
240 public void deleteRoleDependencyRecords(Session localSession, Long roleId, Long appId) throws Exception;
243 * It returns list of applications functions along with functions associated with global role
249 List<String> getMenuFunctionsList(String uebkey) throws Exception;
253 * @param uebkey applications UebKey
256 * Method getAllUsers returns all the active users of application
258 List<EcompUser> getAllAppUsers(String uebkey) throws Exception;