Package org.gatein.common.xml.stax.writer.builder

Examples of org.gatein.common.xml.stax.writer.builder.StaxWriterBuilder


public class NavigationMarshaller implements Marshaller<PageNavigation> {

    @Override
    public void marshal(PageNavigation navigation, OutputStream outputStream, boolean pretty) throws BindingException {
        try {
            StaxWriterBuilder builder = buildDefaultWriter(outputStream);
            if (!pretty) {
                builder.withFormatting(null);
            }

            StaxWriter<Element> writer = builder.build(Element.class);
            marshalNavigation(writer, navigation);
        } catch (StaxNavException e) {
            throw new BindingException(e);
        } catch (XMLStreamException e) {
            throw new BindingException(e);
View Full Code Here


    private final PortalRedirectXmlHandler redirectXmlHandler = new PortalRedirectXmlHandler();

    @Override
    public void marshal(PortalConfig object, OutputStream outputStream, boolean pretty) throws BindingException {
        try {
            StaxWriterBuilder builder = buildDefaultWriter(outputStream);
            if (!pretty) {
                builder.withFormatting(null);
            }

            StaxWriter<Element> writer = builder.build(Element.class);

            // root element
            writer.writeStartElement(Element.PORTAL_CONFIG);
            writeGateinObjectsNamespace(writer);
View Full Code Here

*/
public class PageMarshaller extends AbstractMarshaller<Page.PageSet> {
    @Override
    public void marshal(Page.PageSet pageSet, OutputStream outputStream, boolean pretty) throws BindingException {
        try {
            StaxWriterBuilder builder = buildDefaultWriter(outputStream);
            if (!pretty) {
                builder.withFormatting(null);
            }

            StaxWriter<Element> writer = builder.build(Element.class);

            writer.writeStartElement(Element.PAGE_SET);
            writeGateinObjectsNamespace(writer);

            // Marshal pages
View Full Code Here

*/
public class PageMarshaller extends AbstractMarshaller<Page.PageSet> {
    @Override
    public void marshal(Page.PageSet pageSet, OutputStream outputStream, boolean pretty) throws BindingException {
        try {
            StaxWriterBuilder builder = buildDefaultWriter(outputStream);
            if (!pretty) {
                builder.withFormatting(null);
            }

            StaxWriter<Element> writer = builder.build(Element.class);

            writer.writeStartElement(Element.PAGE_SET);
            writeGateinObjectsNamespace(writer);

            // Marshal pages
View Full Code Here

public class NavigationMarshaller implements Marshaller<PageNavigation> {

    @Override
    public void marshal(PageNavigation navigation, OutputStream outputStream, boolean pretty) throws BindingException {
        try {
            StaxWriterBuilder builder = buildDefaultWriter(outputStream);
            if (!pretty) {
                builder.withFormatting(null);
            }

            StaxWriter<Element> writer = builder.build(Element.class);
            marshalNavigation(writer, navigation);
        } catch (StaxNavException e) {
            throw new BindingException(e);
        } catch (XMLStreamException e) {
            throw new BindingException(e);
View Full Code Here

    private final PortalRedirectXmlHandler redirectXmlHandler = new PortalRedirectXmlHandler();

    @Override
    public void marshal(PortalConfig object, OutputStream outputStream, boolean pretty) throws BindingException {
        try {
            StaxWriterBuilder builder = buildDefaultWriter(outputStream);
            if (!pretty) {
                builder.withFormatting(null);
            }

            StaxWriter<Element> writer = builder.build(Element.class);

            // root element
            writer.writeStartElement(Element.PORTAL_CONFIG);
            writeGateinObjectsNamespace(writer);
View Full Code Here

    private final PortalRedirectXmlHandler redirectXmlHandler = new PortalRedirectXmlHandler();

    @Override
    public void marshal(PortalConfig object, OutputStream outputStream, boolean pretty) throws BindingException {
        try {
            StaxWriterBuilder builder = buildDefaultWriter(outputStream);
            if (!pretty) {
                builder.withFormatting(null);
            }

            StaxWriter<Element> writer = builder.build(Element.class);

            // root element
            writer.writeStartElement(Element.PORTAL_CONFIG);
            writeGateinObjectsNamespace(writer);
View Full Code Here

public class NavigationMarshaller implements Marshaller<PageNavigation> {

    @Override
    public void marshal(PageNavigation navigation, OutputStream outputStream, boolean pretty) throws BindingException {
        try {
            StaxWriterBuilder builder = buildDefaultWriter(outputStream);
            if (!pretty) {
                builder.withFormatting(null);
            }

            StaxWriter<Element> writer = builder.build(Element.class);
            marshalNavigation(writer, navigation);
        } catch (StaxNavException e) {
            throw new BindingException(e);
        } catch (XMLStreamException e) {
            throw new BindingException(e);
View Full Code Here

TOP

Related Classes of org.gatein.common.xml.stax.writer.builder.StaxWriterBuilder

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.