Package com.volantis.mcs.interaction.impl

Examples of com.volantis.mcs.interaction.impl.InternalProxy


public class Prepare4Validation
        extends ProxyVisitorAdapter {

    protected void visitAll(Proxy proxy) {
        final InternalProxy internalProxy = (InternalProxy) proxy;
        internalProxy.prepareForValidation();
    }
View Full Code Here


        // =====================================================================
        //   Create Test Objects
        // =====================================================================

        InternalProxy proxy = createProxy(parentProxyMock);

        Object modelObject = new Object();

        // =====================================================================
        //   Set Test Object Specific Expectations
        // =====================================================================

        parentProxyMock.expects.getEmbeddedModelObject(proxy, false)
                .returns(modelObject);

        // =====================================================================
        //   Test Expectations
        // =====================================================================

        // Get the model object before removing.
        Object itemModelObjectBefore = proxy.getModelObject();

        proxy.detach();

        // Get the model object after removing.
        Object itemModelObjectAfter = proxy.getModelObject();

        assertEquals(
                "Model object changed by removal", itemModelObjectBefore,
                itemModelObjectAfter);
    }
View Full Code Here

                itemModelObjectAfter);
    }

    protected InternalProxy createProxy(
            InternalParentProxyMock parentProxyMock) {
        InternalProxy proxy = createProxy();
        proxy.attach(parentProxyMock);
        return proxy;
    }
View Full Code Here

        // the relevant proxy.
        List diagnostics = validator.getDiagnostics();
        for (int i = 0; i < diagnostics.size(); i++) {
            Diagnostic diagnostic = (Diagnostic) diagnostics.get(i);
            Path path = diagnostic.getPath();
            InternalProxy internalProxy = (InternalProxy)
                    proxy.getEnclosingProxy(path);
            if (internalProxy == null) {
                // System.out.println("Unknown path: " + path.getAsString());
            } else {
                ProxyDiagnostic proxyDiagnostic = new ProxyDiagnosticImpl(
                        diagnostic.getLevel(), internalProxy,
                        diagnostic.getMessage());
                internalProxy.addDiagnostic(proxyDiagnostic);
            }
        }

        // Walk back over the proxies generating events if the diagnostics
        // have changed.
View Full Code Here

TOP

Related Classes of com.volantis.mcs.interaction.impl.InternalProxy

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.