Package com.volantis.mcs.protocols

Examples of com.volantis.mcs.protocols.VolantisProtocol


    }

    // Javadoc inherited
    protected void callCloseOnProtocol(XDIMEContextInternal context) {

        VolantisProtocol protocol = getProtocol(context);

        protocol.writeCloseParagraph((ParagraphAttributes)protocolAttributes);
    }
View Full Code Here


        if (pageContext.getPageTagId() != null) {
            a.setId(pageContext.getPageTagId());
        }

        VolantisProtocol protocol = pageContext.getProtocol();
        try {
            protocol.writeDefaultSegmentLink(a);
        } catch (ProtocolException e) {
            throw new RendererException(
                        exceptionLocalizer.format(
                                    "default-segment-link-rendering-error"),
                        e);
View Full Code Here

    // Javadoc inherited
    protected XDIMEResult callOpenOnProtocol(
            XDIMEContextInternal context, XDIMEAttributes attributes)
        throws XDIMEException {

        VolantisProtocol protocol = getProtocol(context);

        try {
            protocol.writeOpenTableDataCell(
                (TableCellAttributes)protocolAttributes);
        } catch (ProtocolException e) {
            logger.error("rendering-error", getTagName(), e);

            throw new XDIMEException(exceptionLocalizer.format(
View Full Code Here

    }

    // Javadoc inherited
    protected void callCloseOnProtocol(XDIMEContextInternal context) {

        VolantisProtocol protocol = getProtocol(context);

        protocol.writeCloseTableDataCell(
            (TableCellAttributes)protocolAttributes);
    }
View Full Code Here

            // remove srcType which contains list of device independent mime
            // types
            attributes.setSrcType(null);
        }

        VolantisProtocol protocol = ContextInternals.getMarinerPageContext(
                context.getInitialRequestContext()).getProtocol();

        try {
      protocol.writeOpenObject(attributes);
          // copy containedContent to current buffer
          pageContext.getCurrentOutputBuffer().transferContentsFrom(bodyBuffer);
          protocol.writeCloseObject(attributes);
    } catch (ProtocolException e) {
      throw new XDIMEException(e);
    }
    }
View Full Code Here

        if (parent instanceof ValidateElement) {
            ValidateElement validateElement = (ValidateElement) parent;
           
            ValidateAttributes validateAttributes = validateElement.getValidateAttributes();

            VolantisProtocol protocol = getProtocol(context);
           
            // Generate ID for the message element
            if (messageAttributes.getId() == null) {
                messageAttributes.setId(protocol.getMarinerPageContext()
                        .generateUniqueFCID());
            }
           
            // Process the 'type' attribute, and propagate it to the enclosing validate element.
            if ((messageType == null) || messageType.equals("invalid")) {
View Full Code Here

    // Javadoc inherited
    protected XDIMEResult doFallbackOpen(XDIMEContextInternal context, XDIMEAttributes attributes)
            throws ProtocolException {

        VolantisProtocol protocol = getProtocol(context);
        protocol.writeOpenDiv(new DivAttributes());

        // render label
        renderTabLabel(protocol);

        protocol.writeCloseDiv(new DivAttributes());

        // process body
        return XDIMEResult.PROCESS_ELEMENT_BODY;
    }
View Full Code Here

    public void testWriteOpenBody() throws Exception {
        final BodyAttributes attributes =
                (BodyAttributes) ProtocolIntegrationTestHelper.
                provideAttributes(BodyAttributes.class);

        final VolantisProtocol protocol = getProtocol();

        MethodInvoker invoker = new MethodInvoker() {
            public void invoke() throws Exception {
                protocol.writeOpenBody(attributes);
                protocol.writeCloseBody(attributes);
            }
        };
        String expecting = getExpectedWriteOpenBodyResult();
        ProtocolIntegrationTestHelper.doTest(expectations, protocol, invoker, expecting);
    }
View Full Code Here

    public void testWriteOpenCanvas() throws Exception {
        final CanvasAttributes attributes =
                (CanvasAttributes) ProtocolIntegrationTestHelper.
                provideAttributes(CanvasAttributes.class);

        final VolantisProtocol protocol = getProtocol();

        MethodInvoker invoker = new MethodInvoker() {
            public void invoke() throws Exception {
                protocol.writeOpenCanvas(attributes);
            }
        };
        String expecting = getExpectedWriteOpenCanvasResult();
        ProtocolIntegrationTestHelper.doTest(expectations, protocol, invoker, expecting);
    }
View Full Code Here

    public void testWriteOpenInclusion() throws Exception {
        final CanvasAttributes attributes =
                (CanvasAttributes) ProtocolIntegrationTestHelper.
                provideAttributes(CanvasAttributes.class);

        final VolantisProtocol protocol = getProtocol();

        MethodInvoker invoker = new MethodInvoker() {
            public void invoke() throws Exception {
                protocol.writeOpenInclusion(attributes);
                protocol.writeCloseInclusion(attributes);
            }
        };
        String expecting = getExpectedWriteOpenInclusionResult();
        ProtocolIntegrationTestHelper.doTest(expectations, protocol, invoker, expecting);
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.VolantisProtocol

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.