Package com.volantis.mcs.xdime

Examples of com.volantis.mcs.xdime.XDIMEContextImpl


    protected XDIMEContextInternal prepareEnvironment(
            String eventName,
            String referencedSubmission)
            throws XDIMEException {

        XDIMEContextInternal context = new XDIMEContextImpl();
        final XFormBuilder xFormBuilder = context.getXFormBuilder();
        EmulatedXFormDescriptor fd = new EmulatedXFormDescriptor();
        xFormBuilder.addModel(MODEL_ID, fd);
        context.setInitialRequestContext(requestContext);

        attributes = new XDIMEAttributesImpl(XFormElements.SETVALUE);
        attributes.setValue(XDIMESchemata.XML_EVENTS_NAMESPACE, "event", eventName);
        attributes.setValue("", XDIMEAttribute.REF.toString(), referencedSubmission);
        attributes.setValue("", XDIMEAttribute.VALUE.toString(), VALUE_FROM_ATTRIBUTE);
View Full Code Here


            NoSuchFieldException {

        // Create test objects.
        XFormBuilderMock builderMock =
                new XFormBuilderMock("builder", expectations);
        XDIMEContextImpl context = new XDIMEContextImpl();
        MarinerRequestContextMock requestContext =
                new MarinerRequestContextMock("requestContext", expectations);
        MarinerPageContextMock pageContext =
                new MarinerPageContextMock("pageContext", expectations);

        // Set expectations.
        context.setInitialRequestContext(requestContext);
        requestContext.expects.getMarinerPageContext().returns(pageContext);
        pageContext.expects.getProtocol().returns(null);

        PrivateAccessor.setField(context, "xformBuilder", builderMock);
        assertTrue(element.getProtocolAttributes() instanceof
View Full Code Here

    protected XDIMEContextInternal prepareForCallCloseOnProtocol()
            throws XDIMEException {

        // callCloseOnProtocol assumes that callOpenOnProtocol and
        // initialiseAttributes will have been called first, so duplicate this
        XDIMEContextInternal context = new XDIMEContextImpl();
        final XFormBuilder xFormBuilder = context.getXFormBuilder();
        final String modelID = "modelID";
        EmulatedXFormDescriptor fd = new EmulatedXFormDescriptor();
        xFormBuilder.addModel(modelID, fd);
        XDIMEAttributes attributes = new XDIMEAttributesImpl(getElementType());
        attributes.setValue("", XDIMEAttribute.ID.toString(), "controlID");
        attributes.setValue("", XDIMEAttribute.MODEL.toString(), modelID);
        xFormBuilder.registerControl(attributes);

        context.setInitialRequestContext(marinerRequestContextMock);

        return context;
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.xdime.XDIMEContextImpl

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.