private APISession login(LoginAPI loginAPI) throws LoginException { return loginAPI.login(TestEngineImpl.TECHNICAL_USER_NAME, TestEngineImpl.TECHNICAL_USER_PASSWORD); }
private void logout(LoginAPI loginAPI, APISession session) throws SessionNotFoundException, LogoutException { loginAPI.logout(session); }
/** * Connects a user, identified by his (her) username and password, in order to use API methods of a tenant. * * @param username * the user name * @param password * the password * @throws LoginException * occurs when an exception is thrown during the login (userName does not exist, or couple (userName, password) is incorrect) * @since 7.2 */ public void login(String username, String password) throws LoginException { session = getLoginAPI(LoginAPI.class).login(username, password); }
/** * Disconnect user from tenant APIs. * * @since 7.2 */ public void logout() throws LogoutException { try { if (session != null) { getLoginAPI().logout(session); session = null; } } catch (SessionNotFoundException ignored) { // If the session is not found on server, then the client is already logged out. // Do nothing } }
/** * Connects a user, identified by his (her) username and password, in order to use API methods of a tenant. * * @param username * the user name * @param password * the password * @throws LoginException * occurs when an exception is thrown during the login (userName does not exist, or couple (userName, password) is incorrect) * @since 7.2 */ public void login(String username, String password) throws LoginException { session = getLoginAPI(LoginAPI.class).login(username, password); }
/** * Disconnect user from tenant APIs. * * @since 7.2 */ public void logout() throws LogoutException { try { if (session != null) { getLoginAPI().logout(session); session = null; } } catch (SessionNotFoundException ignored) { // If the session is not found on server, then the client is already logged out. // Do nothing } }
public void loginOnDefaultTenantWithDefaultTechnicalUser() throws BonitaException { final LoginAPI loginAPI = getLoginAPI(); setSession(loginAPI.login(TestEngineImpl.TECHNICAL_USER_NAME, TestEngineImpl.TECHNICAL_USER_NAME)); setAPIs(); }
public void logoutOnTenant() throws BonitaException { final LoginAPI loginAPI = getLoginAPI(); loginAPI.logout(session); setSession(null); setIdentityAPI(null); setProcessAPI(null); setCommandAPI(null); setProfileAPI(null); setThemeAPI(null); setPermissionAPI(null); setApplicationAPI(null); setTenantManagementCommunityAPI(null); setPageAPI(null); setBusinessDataAPI(null); }