Examples of Directives


Examples of org.xembly.Directives

        try {
            number = 1 + this.storage.xml().xpath(
                String.format("%s/issue/number/text()", this.xpath())
            ).size();
            this.storage.apply(
                new Directives().xpath(this.xpath()).add("issue")
                    .add("number").set(Integer.toString(number)).up()
                    .add("state").set(Issue.OPEN_STATE).up()
                    .add("title").set(title).up()
                    .add("body").set(body).up()
                    .add("created_at").set(new Github.Time().toString()).up()
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("tags")
View Full Code Here

Examples of org.xembly.Directives

    @Override
    @NotNull(message = "created tag is never NULL")
    public Tag create(
        @NotNull(message = "params can't be NULL") final JsonObject params
    ) throws IOException {
        final Directives dirs = new Directives().xpath(this.xpath()).add("tag");
        for (final Entry<String, JsonValue> entry : params.entrySet()) {
            dirs.add(entry.getKey()).set(entry.getValue().toString()).up();
        }
        this.storage.apply(dirs);
        new MkReferences(this.storage, this.self, this.coords).create(
            new StringBuilder().append("refs/tags/").append(
                params.getString("name")
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("milestones")
        );
    }
View Full Code Here

Examples of org.xembly.Directives

        final int number;
        number = 1 + this.storage.xml().xpath(
            String.format("%s/milestone/number/text()", this.xpath())
        ).size();
        this.storage.apply(
            new Directives().xpath(this.xpath()).add("milestone")
                .add("number").set(Integer.toString(number)).up()
                .add("title").set(title).up()
                .add("state").set(Milestone.OPEN_STATE).up()
                .add("description").set("mock milestone").up()
        );
View Full Code Here

Examples of org.xembly.Directives

    }

    @Override
    public void remove(final int number) throws IOException {
        this.storage.apply(
            new Directives().xpath(
                String.format("%s/milestone[number='%d']", this.xpath(), number)
            ).remove()
        );
    }
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("labels")
View Full Code Here

Examples of org.xembly.Directives

                    color
                )
            );
        }
        this.storage.apply(
            new Directives().xpath(this.xpath()).add("label")
                .add("name").set(name).up()
                .add("color").set(color).up()
        );
        return this.get(name);
    }
View Full Code Here

Examples of org.xembly.Directives

    @Override
    public void delete(@NotNull(message = "name should not be NULL")
        final String name
    ) throws IOException {
        this.storage.apply(
            new Directives().xpath(this.xpath())
                .xpath(String.format("label[name='%s']", name))
                .remove()
                .xpath("/github/repos")
                .xpath(String.format("repo[@coords='%s']", this.coords))
                .xpath(String.format("issues/issue/labels/label[.='%s']", name))
View Full Code Here

Examples of org.xembly.Directives

        this.storage = stg;
        this.self = login;
        this.repo = rep;
        this.ticket = issue;
        this.storage.apply(
            new Directives().xpath(
                String.format(
                    // @checkstyle LineLength (1 line)
                    "/github/repos/repo[@coords='%s']/issues/issue[number='%d']",
                    this.repo, this.ticket
                )
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.