Examples of Directives


Examples of org.xembly.Directives

    ) throws IOException {
        this.storage = stg;
        this.self = login;
        this.coords = rep;
        this.storage.apply(
            new Directives().xpath(
                String.format(
                    "/github/repos/repo[@coords='%s']",
                    this.coords
                )
            ).addIf("releases")
View Full Code Here

Examples of org.xembly.Directives

        try {
            number = 1 + this.storage.xml().xpath(
                String.format("%s/release/id/text()", this.xpath())
            ).size();
            this.storage.apply(
                new Directives().xpath(this.xpath()).add("release")
                    .add("id").set(Integer.toString(number)).up()
                    .add("tag_name").set(tag).up()
                    .add("target_commitish").set("master").up()
                    .add("name").set("v1.0.0").up()
                    .add("body").set("Description of the release").up()
View Full Code Here

Examples of org.xembly.Directives

    @Override
    public void remove(final int number) throws IOException {
        this.storage.lock();
        try {
            this.storage.apply(
                new Directives().xpath(
                    String.format("%s/release[id='%d']", this.xpath(), number)
                ).remove()
            );
        } finally {
            this.storage.unlock();
View Full Code Here

Examples of org.xembly.Directives

    ) throws IOException {
        this.storage = stg;
        this.self = login;
        this.coords = rep;
        this.storage.apply(
            new Directives().xpath(
                String.format("/github/repos/repo[@coords='%s']", this.coords)
            ).addIf("deploykeys")
        );
    }
View Full Code Here

Examples of org.xembly.Directives

        try {
            number = 1 + this.storage.xml().xpath(
                String.format("%s/deploykey/id/text()", this.xpath())
            ).size();
            this.storage.apply(
                new Directives().xpath(this.xpath())
                    .add("deploykey")
                    .add("id").set(String.valueOf(number)).up()
                    .add("title").set(title).up()
                    .add("key").set(key)
            );
View Full Code Here

Examples of org.xembly.Directives

    ) throws IOException {
        this.storage = stg;
        this.self = login;
        this.coords = rep;
        this.storage.apply(
            new Directives().xpath(
                String.format(
                    "/github/repos/repo[@coords='%s']/git",
                    this.coords
                )
            ).addIf("blobs")
View Full Code Here

Examples of org.xembly.Directives

        throws IOException {
        this.storage.lock();
        final String sha = fakeSha();
        try {
            this.storage.apply(
                new Directives().xpath(this.xpath()).add("blob")
                    .add("sha").set(sha).up()
                    .add("url").set("http://localhost/1").up()
                    .attr("content", content)
                    .attr("encoding", encoding)
            );
View Full Code Here

Examples of org.xembly.Directives

    ) throws IOException {
        this.storage = stg;
        this.self = login;
        this.coords = rep;
        this.storage.apply(
            new Directives().xpath(
                String.format("/github/repos/repo[@coords='%s']", this.coords)
            ).addIf("contents").up().addIf("commits")
        );
    }
View Full Code Here

Examples of org.xembly.Directives

                branch = json.getString("ref");
            } else {
                branch = "master";
            }
            this.storage.apply(
                new Directives().xpath(this.xpath()).add("content")
                    .attr("ref", branch)
                    .add("name").set(json.getString("path")).up()
                    .add("path").set(json.getString("path")).up()
                    .add("content").set(json.getString("content")).up()
                    .add("type").set("file").up()
View Full Code Here

Examples of org.xembly.Directives

                branch = content.getString("ref");
            } else {
                branch = "master";
            }
            this.storage.apply(
                new Directives()
                    .xpath(this.xpath())
                    .xpath(String.format("content[path='%s']", path))
                    .attr("ref", branch)
                    .remove()
            );
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.