• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Whitelisted类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted的典型用法代码示例。如果您正苦于以下问题:Java Whitelisted类的具体用法?Java Whitelisted怎么用?Java Whitelisted使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Whitelisted类属于org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists包,在下文中一共展示了Whitelisted类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createStatus

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public CommitStatusGroovyObject createStatus(final String status,
                                             final String context,
                                             final String description,
                                             final String targetUrl) {
    Objects.requireNonNull(status, "status is a required argument");

    CommitStatus commitStatus = new CommitStatus();
    commitStatus.setState(status);
    commitStatus.setContext(context);
    commitStatus.setDescription(description);
    commitStatus.setTargetUrl(targetUrl);
    try {
        return new CommitStatusGroovyObject(
                commitService.createStatus(base, commit.getSha(), commitStatus));
    } catch (final IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:20,代码来源:CommitGroovyObject.java


示例2: createStatus

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public CommitStatusGroovyObject createStatus(final String status,
                                             final String context,
                                             final String description,
                                             final String targetUrl) {
    Objects.requireNonNull(status, "status is a required argument");

    CommitStatus commitStatus = new CommitStatus();
    commitStatus.setState(status);
    commitStatus.setContext(context);
    commitStatus.setDescription(description);
    commitStatus.setTargetUrl(targetUrl);
    try {
        return new CommitStatusGroovyObject(
                commitService.createStatus(head, pullRequest.getHead().getSha(), commitStatus));
    } catch (final IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:20,代码来源:PullRequestGroovyObject.java


示例3: reviewComment

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public ReviewCommentGroovyObject reviewComment(final String commitId,
                                               final String path,
                                               final int position,
                                               final String body) {
    Objects.requireNonNull(commitId, "commitId is a required argument");
    Objects.requireNonNull(path, "path is a required argument");
    Objects.requireNonNull(body, "body is a required argument");

    ExtendedCommitComment comment = new ExtendedCommitComment();
    comment.setCommitId(commitId);
    comment.setPath(path);
    comment.setPosition(position);
    comment.setBody(body);
    try {
        return new ReviewCommentGroovyObject(
                pullRequestService.createComment2(base, pullRequestHead.getNumber(), comment),
                base,
                commitService);
    } catch (final IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:24,代码来源:PullRequestGroovyObject.java


示例4: editComment

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public IssueCommentGroovyObject editComment(final long commentId, final String body) {
    Objects.requireNonNull(body, "body is a required argument");

    Comment comment = new Comment();
    comment.setId(commentId);
    comment.setBody(body);
    try {
        return new IssueCommentGroovyObject(
                issueService.editComment(base, comment),
                base,
                issueService);
    } catch (final IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:17,代码来源:PullRequestGroovyObject.java


示例5: merge

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public String merge(final String commitTitle,
                    final String commitMessage,
                    final String sha,
                    final String mergeMethod) {
    try {
        ExtendedMergeStatus status = pullRequestService.merge(base,
                pullRequestHead.getNumber(),
                commitTitle,
                commitMessage,
                sha,
                mergeMethod);
        if (status.isMerged()) {
            return status.getSha();
        } else {
            throw new RuntimeException(status.getMessage());
        }
    } catch (final IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:22,代码来源:PullRequestGroovyObject.java


示例6: delete

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void delete() {
    try {
        commitService.deleteComment(base, commitComment.getId());
    } catch (final IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:9,代码来源:ReviewCommentGroovyObject.java


示例7: delete

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void delete() {
    try {
        issueService.deleteComment(base, comment.getId());
    } catch (final IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:9,代码来源:IssueCommentGroovyObject.java


示例8: createReviewRequests

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void createReviewRequests(final String...reviewers) {
    Objects.requireNonNull(reviewers, "reviewers cannot be null");
    try {
        pullRequestService.createReviewRequests(base, pullRequest.getNumber(), reviewers);
    } catch (final IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:10,代码来源:PullRequestGroovyObject.java


示例9: deleteReviewRequests

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void deleteReviewRequests(final String...reviewers) {
    Objects.requireNonNull(reviewers, "reviewers cannot be null");
    try {
        pullRequestService.deleteReviewRequests(base, pullRequest.getNumber(), reviewers);
    } catch (final IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:10,代码来源:PullRequestGroovyObject.java


示例10: addLabels

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void addLabels(final String...labels) {
    Objects.requireNonNull(labels, "labels is a required argument");
    try {
        issueService.addLabels(base, pullRequest.getNumber(), labels);
    } catch (final IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:10,代码来源:PullRequestGroovyObject.java


示例11: removeLabel

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void removeLabel(final String label) {
    Objects.requireNonNull(label, "label is a required argument");
    try {
        issueService.removeLabel(base, pullRequest.getNumber(), label);
    } catch (final IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:10,代码来源:PullRequestGroovyObject.java


示例12: addAssignees

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void addAssignees(final String...assignees) {
    Objects.requireNonNull(assignees, "assignees is a required argument");
    try {
        issueService.addAssignees(base, pullRequest.getNumber(), assignees);
    } catch (final IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:10,代码来源:PullRequestGroovyObject.java


示例13: removeAssignees

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void removeAssignees(final String...assignees) {
    Objects.requireNonNull(assignees, "assignees is a required argument");
    try {
        issueService.removeAssignees(base, pullRequest.getNumber(), assignees);
    } catch (final IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:10,代码来源:PullRequestGroovyObject.java


示例14: replyToReviewComment

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public ReviewCommentGroovyObject replyToReviewComment(final long commentId, final String body) {
    Objects.requireNonNull(body, "body is a required argument");
    try {
        return new ReviewCommentGroovyObject(
                pullRequestService.replyToComment2(base, pullRequestHead.getNumber(), (int) commentId, body),
                base,
                commitService);
    } catch (final IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:13,代码来源:PullRequestGroovyObject.java


示例15: deleteReviewComment

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void deleteReviewComment(final long commentId) {
    try {
        pullRequestService.deleteComment(base, commentId);
    } catch (final IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:9,代码来源:PullRequestGroovyObject.java


示例16: editReviewComment

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public ReviewCommentGroovyObject editReviewComment(final long commentId, final String body) {
    Objects.requireNonNull(body, "body is a required argument");

    ExtendedCommitComment comment = new ExtendedCommitComment();
    comment.setId(commentId);
    comment.setBody(body);
    try {
        return new ReviewCommentGroovyObject(pullRequestService.editComment2(base, comment), base, commitService);
    } catch (final IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:14,代码来源:PullRequestGroovyObject.java


示例17: comment

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public IssueCommentGroovyObject comment(final String body) {
    Objects.requireNonNull(body, "body is a required argument");

    try {
        return new IssueCommentGroovyObject(
                issueService.createComment(base, pullRequestHead.getNumber(), body),
                base,
                issueService);
    } catch (final IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:14,代码来源:PullRequestGroovyObject.java


示例18: deleteComment

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void deleteComment(final long commentId) {
    try {
        issueService.deleteComment(base, commentId);
    } catch (final IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:9,代码来源:PullRequestGroovyObject.java


示例19: refresh

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void refresh() {
    try {
        pullRequest = pullRequestService.getPullRequest(base, pullRequest.getNumber());
    } catch (final IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:9,代码来源:PullRequestGroovyObject.java


示例20: getHostClusterApiServerUrl

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
/**
 * @return Returns a URL to contact the API server of the OpenShift cluster
 *         running this node or throws an Exception if it cannot be
 *         determined.
 */
@Whitelisted
public static String getHostClusterApiServerUrl() {
    String serviceHost = System.getenv("KUBERNETES_SERVICE_HOST");
    if (serviceHost == null) {
        throw new IllegalStateException(
                "No clusterName information specified and unable to find `KUBERNETES_SERVICE_HOST` environment variable.");
    }
    String servicePort = System.getenv("KUBERNETES_SERVICE_PORT_HTTPS");
    if (servicePort == null) {
        throw new IllegalStateException(
                "No clusterName information specified and unable to find `KUBERNETES_SERVICE_PORT_HTTPS` environment variable.");
    }
    return "https://" + serviceHost + ":" + servicePort;
}
 
开发者ID:openshift,项目名称:jenkins-client-plugin,代码行数:20,代码来源:ClusterConfig.java



注:本文中的org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SingleRootFileSource类代码示例发布时间:2022-05-22
下一篇:
Java ContainerStartDataProtoOrBuilder类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap