Package org.geogrid.aist.tsukubagama.services.request

Examples of org.geogrid.aist.tsukubagama.services.request.AccountRequestResult


            throw new Exception("No AccountRequest found for " + username);
        }
        Map params = new HashMap();
        params.put("operator", username);
        params.put("renewPIN", pinNumber);
        AccountRequestResult result =
            accountService.updateAccount(accountRequest,
                                         AccountRequest.Status.RENEW,
                                         params);
        if (result.isError()) {
            throw new Exception(result.getMessage());
        }
    }
View Full Code Here


        link += REQUEST_URI_FOR_ACTIVATION;
        Map params = new HashMap();
        params.put("activation_url", link);
        params.put("operator", req.getRemoteUser());

        AccountRequestResult result =
            accountService.updateAccount(accountRequest, nextStatus, params);

        event.getAction().addParameter("oid", accountRequest.getOid());
        if (result.isError()) {
            String updateMessage = result.getMessage();
            event.getAction().addParameter("message", updateMessage);
        }

        viewRequest(event);
    }
View Full Code Here

            res.setRenderParameter("message", "Account was already deleted.");
            return ;
        }

        if ( validateOid(accountRequest, oid) ) {
            AccountRequestResult result =
                accountService.cancelRenewRequest(accountRequest);
            res.setRenderParameter("message", result.getMessage());
            if (result.isError()) {
                res.setRenderParameter("isError", "true");
            }
        }

        viewRequest(event);
View Full Code Here

            res.setRenderParameter("message", "Account was already deleted.");
            return ;
        }

        if ( validateOid(accountRequest, oid) ) {
            AccountRequestResult result =
                accountService.cancelResetRequest(accountRequest);
            res.setRenderParameter("message", result.getMessage());
            if (result.isError()) {
                res.setRenderParameter("isError", "true");
            }
        }

        viewRequest(event);
View Full Code Here

            log.error("Invalid Reset Request for \"" + username + "\", Ignored");
            return "There was an error processing your request.";
        }
        Map params = new HashMap();
        params.put("resetPIN", pinNumber);
        AccountRequestResult result =
            accountService.updateAccount(accountRequest,
                                         AccountRequest.Status.RESET,
                                         params);
        if (result.isError()) {
            log.error("Cannot reset request: " + result.getMessage());
            return "There was an error processing your request.";
        }
        return null;
    }
View Full Code Here

        }

        // activation proc
        Map params = new HashMap();
        params.put("password", password1);
        AccountRequestResult result =
            accountService.updateAccount(accountRequest,
                                         AccountRequest.Status.ACTIVATED,
                                         params);
        if (result.isError()) {
            errorMessage.setValue( result.getMessage() );
            setNextState(req, ERROR_JSP);
            return ;
        }

        errorMessage.setValue(null);
View Full Code Here

        if (request.status().equals(nextStatus)) {
            log.error("This account has been already " + nextStatus.toString());
            return AccountRequestResult.error("This account has been already "
                + nextStatus.toString());
        }
        AccountRequestResult result = null;
        switch (nextStatus) {
            case NEW:
                result = updateAccountStatus(request, nextStatus, params);
            case RENEW:
                result = updateAccountToRenew(request, params);
View Full Code Here

        request.setAttribute("renewPIN", renewPIN);

        String dn = buildUserDN(request);
        request.setAttribute("predictedSubject", dn);

        AccountRequestResult result =
            updateAccountStatus(request,
                                AccountRequest.Status.RENEW, params);
        if ( emailToAdmin ) {
            try {
                accountRequestMail.sendAccountRequestRenewNotice(request);
View Full Code Here

        if (pin == null) {
            return AccountRequestResult.error("PIN for reset is null");
        }
        request.setAttribute("resetPIN", pin);

        AccountRequestResult result =
            updateAccountStatus(request,
                                AccountRequest.Status.RESET, params);
        if ( emailToAdmin ) {
            try {
                accountRequestMail.sendAccountRequestResetNotice(request);
View Full Code Here

        String operator = (String)params.get("operator");
        request.appendAdminComments("Emailed link");
        request.appendAdminComments("Request approved by " + operator);

        request.changeStatus(AccountRequest.Status.APPROVED);
        return new AccountRequestResult();
    }
View Full Code Here

TOP

Related Classes of org.geogrid.aist.tsukubagama.services.request.AccountRequestResult

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.