Examples of XMLElementBuilder


Examples of org.springframework.roo.support.util.XmlElementBuilder

            return false;
        }
        final String userId = options.get("userId");
        final String albumId = options.get("albumId");
        installTagx("photos");
        final Element photos = new XmlElementBuilder("embed:photos", XmlUtils
                .getDocumentBuilder().newDocument())
                .addAttribute("id", "photos_" + userId + "_" + albumId)
                .addAttribute("albumId", albumId)
                .addAttribute("userId", userId)
                .addAttribute("provider", provider.toLowerCase()).build();
View Full Code Here

Examples of org.springframework.roo.support.util.XmlElementBuilder

            location = URLDecoder.decode(location, "UTF-8");
        }
        catch (final UnsupportedEncodingException ignore) {
        }
        installTagx("map");
        final Element map = new XmlElementBuilder("embed:map", XmlUtils
                .getDocumentBuilder().newDocument())
                .addAttribute("id", "map_" + viewName)
                .addAttribute("location", location).build();
        map.setAttribute("z", XmlRoundTripUtils.calculateUniqueKeyFor(map));
        installJspx(
View Full Code Here

Examples of org.springframework.roo.support.util.XmlElementBuilder

                || !options.containsKey("id")) {
            return false;
        }
        final String id = options.get("id");
        installTagx("wave");
        final Element wave = new XmlElementBuilder("embed:wave", XmlUtils
                .getDocumentBuilder().newDocument())
                .addAttribute("id", "wave_" + id).addAttribute("waveId", id)
                .build();
        wave.setAttribute("z", XmlRoundTripUtils.calculateUniqueKeyFor(wave));
        installJspx(
View Full Code Here

Examples of org.springframework.roo.support.util.XmlElementBuilder

            searchTerm = URLDecoder.decode(searchTerm, "UTF-8");
        }
        catch (final UnsupportedEncodingException ignore) {
        }
        installTagx("microblogging");
        final Element twitter = new XmlElementBuilder("embed:microblogging",
                XmlUtils.getDocumentBuilder().newDocument())
                .addAttribute("id", "twitter_" + searchTerm)
                .addAttribute("searchTerm", searchTerm).build();
        twitter.setAttribute("z",
                XmlRoundTripUtils.calculateUniqueKeyFor(twitter));
View Full Code Here

Examples of org.springframework.roo.support.util.XmlElementBuilder

        installTagx("document");
        if (DocumentProvider.SLIDESHARE.name().equals(provider)
                && id.startsWith("http")) {
            id = getSlideShareId(id);
        }
        final Element document = new XmlElementBuilder("embed:document",
                XmlUtils.getDocumentBuilder().newDocument())
                .addAttribute("id", "doc_" + id).addAttribute("documentId", id)
                .addAttribute("provider", provider.toLowerCase()).build();
        document.setAttribute("z",
                XmlRoundTripUtils.calculateUniqueKeyFor(document));
View Full Code Here

Examples of org.springframework.roo.support.util.XmlElementBuilder

        if (!isProviderSupported(provider, VideoStreamProvider.values())) {
            return false;
        }
        final String id = options.get("id");
        installTagx("videostream");
        final Element video = new XmlElementBuilder("embed:videostream",
                XmlUtils.getDocumentBuilder().newDocument())
                .addAttribute("id", "video_stream_" + id)
                .addAttribute("streamId", id)
                .addAttribute("provider", provider.toLowerCase()).build();
        video.setAttribute("z", XmlRoundTripUtils.calculateUniqueKeyFor(video));
View Full Code Here

Examples of org.springframework.roo.support.util.XmlElementBuilder

        final Element scopeElement = XmlUtils.findFirstElement("scope",
                dependencyElement);
        final String descriptionOfChange;
        if (scopeElement == null) {
            if (dependencyScope != null) {
                dependencyElement.appendChild(new XmlElementBuilder("scope",
                        document).setText(dependencyScope.name().toLowerCase())
                        .build());
                descriptionOfChange = highlight(ADDED + " scope") + " "
                        + dependencyScope.name().toLowerCase()
                        + " to dependency " + dependency.getSimpleDescription();
View Full Code Here

Examples of org.springframework.roo.support.util.XmlElementBuilder

            return;
        }
        annotationDriven.setAttribute("conversion-service",
                CONVERSION_SERVICE_BEAN_NAME);

        final Element conversionServiceBean = new XmlElementBuilder("bean",
                document)
                .addAttribute("id", CONVERSION_SERVICE_BEAN_NAME)
                .addAttribute(
                        "class",
                        destinationPackage.getFullyQualifiedPackageName() + "."
View Full Code Here

Examples of org.springframework.roo.support.util.XmlElementBuilder

                .getInputStream(webFlowConfigPath));
        final Element root = document.getDocumentElement();

        if (XmlUtils.findFirstElement("/beans/bean[@id='"
                + CONVERSION_SERVICE_EXPOSING_INTERCEPTOR_NAME + "']", root) == null) {
            final Element conversionServiceExposingInterceptor = new XmlElementBuilder(
                    "bean", document)
                    .addAttribute(
                            "class",
                            CONVERSION_SERVICE_EXPOSING_INTERCEPTOR
                                    .getFullyQualifiedTypeName())
                    .addAttribute("id",
                            CONVERSION_SERVICE_EXPOSING_INTERCEPTOR_NAME)
                    .addChild(
                            new XmlElementBuilder("constructor-arg", document)
                                    .addAttribute("ref",
                                            CONVERSION_SERVICE_BEAN_NAME)
                                    .build()).build();
            root.appendChild(conversionServiceExposingInterceptor);
        }
        final Element flowHandlerMapping = XmlUtils.findFirstElement(
                "/beans/bean[@class='"
                        + FLOW_HANDLER_MAPPING.getFullyQualifiedTypeName()
                        + "']", root);
        if (flowHandlerMapping != null) {
            if (XmlUtils.findFirstElement(
                    "property[@name='interceptors']/array/ref[@bean='"
                            + CONVERSION_SERVICE_EXPOSING_INTERCEPTOR_NAME
                            + "']", flowHandlerMapping) == null) {
                final Element interceptors = new XmlElementBuilder("property",
                        document)
                        .addAttribute("name", "interceptors")
                        .addChild(
                                new XmlElementBuilder("array", document)
                                        .addChild(
                                                new XmlElementBuilder("ref",
                                                        document)
                                                        .addAttribute("bean",
                                                                CONVERSION_SERVICE_EXPOSING_INTERCEPTOR_NAME)
                                                        .build()).build())
                        .build();
View Full Code Here

Examples of org.springframework.roo.support.util.XmlElementBuilder

                root.setAttribute(
                        "xsi:schemaLocation",
                        root.getAttribute("xsi:schemaLocation")
                                + "  http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.1.xsd");
            }
            root.appendChild(new XmlElementBuilder("task:annotation-driven",
                    appContext).addAttribute("executor", "asyncExecutor")
                    .build());
            root.appendChild(new XmlElementBuilder("task:executor", appContext)
                    .addAttribute("id", "asyncExecutor")
                    .addAttribute("pool-size", "${executor.poolSize}").build());

            fileManager.createOrUpdateTextFileIfRequired(contextPath,
                    XmlUtils.nodeToString(appContext), false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.