Package com.streamreduce.core.model

Examples of com.streamreduce.core.model.Account


    }

    @Test
    @Ignore
    public void testDisableAccount() throws Exception {
        Account account = applicationManager.getUserService().getAccount(testAccount.getId());
        assertFalse(account.getConfigValue(Account.ConfigKey.ACCOUNT_LOCKED));

        String url = getUrl() + "/" + testUser.getAccount().getId() + "/disable/";
        makeRequest(url, "PUT", null, authToken);


        account = applicationManager.getUserService().getAccount(testAccount.getId());
        assertTrue(account.getConfigValue(Account.ConfigKey.ACCOUNT_LOCKED));

        url = getUrl() + "/" + testUser.getAccount().getId() + "/enable/";
        makeRequest(url, "PUT", null, authToken);

        account = applicationManager.getUserService().getAccount(testAccount.getId());
        assertFalse(account.getConfigValue(Account.ConfigKey.ACCOUNT_LOCKED));

    }
View Full Code Here


    @Override
    public Account getAccount(ObjectId accountId) throws AccountNotFoundException {
        if (accountId == null) {
            throw new AccountNotFoundException("Passed account ID was null.");
        }
        Account a = accountDAO.get(accountId);
        if (a == null) {
            throw new AccountNotFoundException(accountId.toString());
        }
        // Create the event stream entry
        eventService.createEvent(EventId.READ, a, null);
View Full Code Here

            User superUser = getSuperUser();
            if (superUser.getAccount().getId().equals(accountId)) {
                logger.error("You can not delete the Nodeable account");
                return;
            }
            Account toBeDeleted = getAccount(accountId);
            // Create the event stream entry
            eventService.createEvent(EventId.DELETE, toBeDeleted, null);
            accountDAO.deleteById(accountId);
        } catch (AccountNotFoundException anf) {
            logger.error("AccountNotFoundException", anf);
View Full Code Here

TOP

Related Classes of com.streamreduce.core.model.Account

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.