Examples of elem()


Examples of com.jamesmurty.utils.XMLBuilder.elem()

        XMLBuilder builder = XMLBuilder.create("AccessControlList");

        // Owner
        if (owner != null) {
            XMLBuilder ownerBuilder = builder.elem("Owner");
            ownerBuilder.elem("ID").text(owner.getId()).up();
            if (owner.getDisplayName() != null) {
                ownerBuilder.elem("Name").text(owner.getDisplayName());
            }
        }
View Full Code Here

Examples of com.jamesmurty.utils.XMLBuilder.elem()

        // Owner
        if (owner != null) {
            XMLBuilder ownerBuilder = builder.elem("Owner");
            ownerBuilder.elem("ID").text(owner.getId()).up();
            if (owner.getDisplayName() != null) {
                ownerBuilder.elem("Name").text(owner.getDisplayName());
            }
        }

        XMLBuilder accessControlList = builder.elem("Entries");
        for (GrantAndPermission gap: grants) {
View Full Code Here

Examples of com.jamesmurty.utils.XMLBuilder.elem()

        XMLBuilder accessControlList = builder.elem("Entries");
        for (GrantAndPermission gap: grants) {
            GranteeInterface grantee = gap.getGrantee();
            Permission permission = gap.getPermission();
            accessControlList
                .elem("Entry")
                    .importXMLBuilder(grantee.toXMLBuilder())
                    .elem("Permission").text(permission.toString());
        }
        return builder;
View Full Code Here

Examples of com.jamesmurty.utils.XMLBuilder.elem()

        XMLBuilder accessControlList = builder.elem("AccessControlList");
        for (GrantAndPermission gap: grants) {
            GranteeInterface grantee = gap.getGrantee();
            Permission permission = gap.getPermission();
            accessControlList
                .elem("Grant")
                    .importXMLBuilder(grantee.toXMLBuilder())
                    .elem("Permission").text(permission.toString());
        }
        return builder;
View Full Code Here

Examples of com.jamesmurty.utils.XMLBuilder.elem()

    public String toXml() throws ParserConfigurationException,
        FactoryConfigurationError, TransformerException
    {
        XMLBuilder builder = XMLBuilder.create("NotificationConfiguration");
        for (TopicConfig topicConfig: this.topicConfigs) {
            builder
                .elem("TopicConfiguration")
                    .elem("Topic").text(topicConfig.topic).up()
                    .elem("Event").text(topicConfig.event);
        }
        return builder.asString();
View Full Code Here

Examples of com.jamesmurty.utils.XMLBuilder.elem()

            for (ObjectKeyAndVersion nav: objectNameAndVersions) {
                XMLBuilder objectBuilder =
                    builder.elem("Object")
                        .elem("Key").text(nav.getKey()).up();
                if (nav.getVersion() != null) {
                    objectBuilder.elem("VersionId").text(nav.getVersion());
                }
            }
            xml = builder.asString();
            xmlMd5Hash = ServiceUtils.toBase64(
                ServiceUtils.computeMD5Hash(xml.getBytes(Constants.DEFAULT_ENCODING)));
View Full Code Here

Examples of com.jamesmurty.utils.XMLBuilder.elem()

    {
        XMLBuilder builder = XMLBuilder.create("LifecycleConfiguration");
        for (Rule rule: this.getRules()) {
            XMLBuilder b = builder.elem("Rule");
            if (rule.id != null && rule.id.length() > 0) {
                b.elem("ID").t(rule.id);
            }
            b.elem("Prefix").t(rule.prefix).up()
             .elem("Status").t(rule.enabled ? "Enabled" : "Disabled").up();

            if (rule.transition != null) {
View Full Code Here

Examples of com.jamesmurty.utils.XMLBuilder.elem()

        for (Rule rule: this.getRules()) {
            XMLBuilder b = builder.elem("Rule");
            if (rule.id != null && rule.id.length() > 0) {
                b.elem("ID").t(rule.id);
            }
            b.elem("Prefix").t(rule.prefix).up()
             .elem("Status").t(rule.enabled ? "Enabled" : "Disabled").up();

            if (rule.transition != null) {
                XMLBuilder tBuilder = b.elem("Transition");
                if (rule.transition.date != null) {
View Full Code Here

Examples of com.jamesmurty.utils.XMLBuilder.elem()

             .elem("Status").t(rule.enabled ? "Enabled" : "Disabled").up();

            if (rule.transition != null) {
                XMLBuilder tBuilder = b.elem("Transition");
                if (rule.transition.date != null) {
                    tBuilder.elem("Date").t(ServiceUtils.formatIso8601Date(rule.transition.date));
                }
                if (rule.transition.days != null) {
                    tBuilder.elem("Days").t(Integer.toString(rule.transition.days));
                }
                tBuilder.elem("StorageClass").t(rule.transition.storageClass);
View Full Code Here

Examples of com.jamesmurty.utils.XMLBuilder.elem()

                XMLBuilder tBuilder = b.elem("Transition");
                if (rule.transition.date != null) {
                    tBuilder.elem("Date").t(ServiceUtils.formatIso8601Date(rule.transition.date));
                }
                if (rule.transition.days != null) {
                    tBuilder.elem("Days").t(Integer.toString(rule.transition.days));
                }
                tBuilder.elem("StorageClass").t(rule.transition.storageClass);
            }
            if (rule.expiration != null) {
                XMLBuilder eBuilder = b.elem("Expiration");
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.