Package com.opensymphony.xwork2

Examples of com.opensymphony.xwork2.ActionProxyFactory


   
    // ------- ActionObject accessors -------

    protected String getActionObjectName(ActionContext context, String name)
    {
        ActionProxy proxy = getActionProxy(context);
        if (proxy==null)
            return null;
        return proxy.getActionName() + "." + name;
    }
View Full Code Here


        if (invocation==null)
        {
            log.error("Action Invocation cannot be obtained. Calling from action constructor?");
            return null;
        }
        ActionProxy proxy = invocation.getProxy();
        if (proxy==null)
        {
            log.error("ActionProxy cannot be obtained. Calling from action constructor?");
            return null;
        }
View Full Code Here

        return proxy;
    }
   
    protected String getActionBeanName(ActionContext context, Class objClass, String ownerProperty)
    {
        ActionProxy proxy = getActionProxy(context);
        if (proxy==null)
            return null;
        if (ownerProperty==null)
            return proxy.getActionName()+ "." + objClass.getName();
        // Default
        return proxy.getActionName()+ "." + ownerProperty + "." + objClass.getName();
    }
View Full Code Here

   
    // ------- ActionObject accessors -------

    protected String getActionObjectName(ActionContext context, String name)
    {
        ActionProxy proxy = getActionProxy(context);
        if (proxy==null)
            return null;
        return proxy.getActionName() + "." + name;
    }
View Full Code Here

        if (invocation==null)
        {
            log.error("Action Invocation cannot be obtained. Calling from action constructor?");
            return null;
        }
        ActionProxy proxy = invocation.getProxy();
        if (proxy==null)
        {
            log.error("ActionProxy cannot be obtained. Calling from action constructor?");
            return null;
        }
View Full Code Here

        return proxy;
    }
   
    protected String getActionBeanName(ActionContext context, Class<?> objClass, String ownerProperty)
    {
        ActionProxy proxy = getActionProxy(context);
        if (proxy==null)
            return null;
        if (ownerProperty==null)
            return proxy.getActionName()+ "." + objClass.getName();
        // Default
        return proxy.getActionName()+ "." + ownerProperty + "." + objClass.getName();
    }
View Full Code Here

            for (String factory : factories) {
                String[] thisFactory = factory.split(":");
                if ((thisFactory != null) && (thisFactory.length == 2)) {
                    String factoryPrefix = thisFactory[0].trim();
                    String factoryName = thisFactory[1].trim();
                    ActionProxyFactory obj = container.getInstance(ActionProxyFactory.class, factoryName);
                    if (obj != null) {
                        actionProxyFactories.put(factoryPrefix, obj);
                    } else if (LOG.isWarnEnabled()) {
                        LOG.warn("Invalid PrefixBasedActionProxyFactory config entry: [#0]", factory);
                    }
View Full Code Here

                                         Map<String, Object> extraContext, boolean executeResult, boolean cleanupContext) {

        String uri = namespace + (namespace.endsWith("/") ? actionName : "/" + actionName);
        for (int lastIndex = uri.lastIndexOf('/'); lastIndex > (-1); lastIndex = uri.lastIndexOf('/', lastIndex - 1)) {
            String key = uri.substring(0, lastIndex);
            ActionProxyFactory actionProxyFactory = actionProxyFactories.get(key);
            if (actionProxyFactory != null) {
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Using ActionProxyFactory [#0] for prefix [#1]", actionProxyFactory, key);
                }
                return actionProxyFactory.createActionProxy(namespace, actionName, methodName, extraContext, executeResult, cleanupContext);
            } else if (LOG.isDebugEnabled()) {
                LOG.debug("No ActionProxyFactory defined for [#1]", key);
            }
        }
        if (LOG.isDebugEnabled()){
View Full Code Here

                req,
                res,
                servletContext);

        try {
            ActionProxyFactory actionProxyFactory = du.getContainer().getInstance(ActionProxyFactory.class);
            ActionProxy proxy = actionProxyFactory.createActionProxy(namespace, actionName, null, ctx, true, true);
            proxy.execute();
            Object action = proxy.getAction();

            if (action instanceof ValidationAware) {
                ValidationAware aware = (ValidationAware) action;
View Full Code Here

        try {
            ActionMapper actionMapper = du.getContainer().getInstance(ActionMapper.class);
            ActionMapping mapping = actionMapper.getMappingFromActionName(action);
            ActionInvocation inv = new ValidatorActionInvocation(ctx, true);
            ActionProxyFactory actionProxyFactory = du.getContainer().getInstance(ActionProxyFactory.class);
            ActionProxy proxy = actionProxyFactory.createActionProxy(inv, namespace, mapping.getName(), mapping.getMethod(), true, true);
            proxy.execute();
            Object a = proxy.getAction();

            if (a instanceof ValidationAware) {
                ValidationAware aware = (ValidationAware) a;
View Full Code Here

TOP

Related Classes of com.opensymphony.xwork2.ActionProxyFactory

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.