Package com.gwtplatform.dispatch.server.actionvalidator

Examples of com.gwtplatform.dispatch.server.actionvalidator.ActionValidator


     */
    private <A extends Action<R>, R extends Result> R doExecute(A action,
            ExecutionContext ctx) throws ActionException, ServiceException {
        ActionHandler<A, R> handler = findHandler(action);

        ActionValidator actionValidator = findActionValidator(action);

        try {
            if (actionValidator.isValid(action)) {
                return handler.execute(action, ctx);
            } else {
                throw new ServiceException(actionValidator.getClass().getName() + actionValidatorMessage + action
                        .getClass().getName());
            }
        } catch (ActionException e) {
            throw e;
        } catch (Exception e) {
View Full Code Here


    }

    private <A extends Action<R>, R extends Result> void doUndo(A action, R result,
            ExecutionContext ctx) throws ActionException, ServiceException {

        ActionValidator actionValidator = findActionValidator(action);

        ActionHandler<A, R> handler = findHandler(action);
        try {
            if (actionValidator.isValid(action)) {
                handler.undo(action, result, ctx);
            } else {
                throw new ServiceException(actionValidator.getClass().getName() + actionValidatorMessage + action
                        .getClass().getName());
            }
        } catch (ActionException e) {
            throw e;
        } catch (Exception cause) {
View Full Code Here

                        .getActionHandlerValidatorClass().getActionValidatorClass();
                Class<? extends ActionHandler<?, ?>> handlerClass =
                        binding.getBean().getActionHandlerValidatorClass().getActionHandlerClass();

                ActionHandlerValidatorInstance actionHandlerValidatorInstance;
                ActionValidator actionValidator = instanceRegistry.findActionValidator(actionValidatorClass);

                if (actionValidator == null) {
                    actionValidator = beanProvider.getInstance(actionValidatorClass);
                }
View Full Code Here

    private ActionHandlerValidatorInstance createInstance(
            ActionHandlerValidatorClass<? extends Action<?>, ? extends Result> actionHandlerValidatorClass) {

        ActionHandlerValidatorInstance actionHandlerValidatorInstance = null;
        ActionValidator actionValidator = findActionValidator(actionHandlerValidatorClass.getActionValidatorClass());

        if (actionValidator == null) {
            actionValidator = injector.getInstance(actionHandlerValidatorClass.getActionValidatorClass());

            actionHandlerValidatorInstance = new ActionHandlerValidatorInstance(
                    actionValidator,
                    injector.getInstance(actionHandlerValidatorClass.getActionHandlerClass()));

            validators.put(actionValidator.getClass(), actionValidator);
        } else {
            actionHandlerValidatorInstance = new ActionHandlerValidatorInstance(
                    actionValidator,
                    injector.getInstance(actionHandlerValidatorClass.getActionHandlerClass()));
        }
View Full Code Here

    private ActionHandlerValidatorInstance createInstance(ActionHandlerValidatorClass<? extends Action<?>,
            ? extends Result> actionHandlerValidatorClass) {

        ActionHandlerValidatorInstance actionHandlerValidatorInstance = null;
        ActionValidator actionValidator = findActionValidator(actionHandlerValidatorClass.getActionValidatorClass());

        ActionHandler<?, ?> actionHandler = SpringUtils.getInstance(applicationContext,
                actionHandlerValidatorClass.getActionHandlerClass());

        if (actionValidator == null) {
            actionValidator = SpringUtils.getInstance(applicationContext,
                    actionHandlerValidatorClass.getActionValidatorClass());
            actionHandlerValidatorInstance = new ActionHandlerValidatorInstance(actionValidator, actionHandler);

            validators.put(actionValidator.getClass(), actionValidator);
        } else {
            actionHandlerValidatorInstance = new ActionHandlerValidatorInstance(actionValidator, actionHandler);
        }

        if (actionHandlerValidatorInstance.getActionHandler() == null
View Full Code Here

TOP

Related Classes of com.gwtplatform.dispatch.server.actionvalidator.ActionValidator

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.