本文整理汇总了Java中hudson.model.UserProperty类的典型用法代码示例。如果您正苦于以下问题:Java UserProperty类的具体用法?Java UserProperty怎么用?Java UserProperty使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UserProperty类属于hudson.model包,在下文中一共展示了UserProperty类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: newInstance
import hudson.model.UserProperty; //导入依赖的package包/类
/**
* Creates a new instance of the GitLabUserInformation object containing information about the logged in user.
*
* @return the UserPropery object
*/
@Override
public UserProperty newInstance(User user) {
Authentication auth = Jenkins.getAuthentication();
if (auth instanceof GitLabUserDetails) {
GitLabUserInfo gitLabUser;
try {
gitLabUser = GitLab.getUser(((GitLabUserDetails) auth.getPrincipal()).getId());
return new GitLabUserProperty(gitLabUser);
} catch (GitLabApiException e) {
LOGGER.warning(e.getMessage());
}
}
return new GitLabUserProperty();
}
开发者ID:enil,项目名称:gitlab-auth-plugin,代码行数:21,代码来源:GitLabUserProperty.java
示例2: TestGitRepo
import hudson.model.UserProperty; //导入依赖的package包/类
public TestGitRepo(String name, File tmpDir, TaskListener listener) throws IOException, InterruptedException {
this.name = name;
this.listener = listener;
envVars = new EnvVars();
gitDir = tmpDir;
User john = User.get(johnDoe.getName(), true);
UserProperty johnsMailerProperty = new Mailer.UserProperty(johnDoe.getEmailAddress());
john.addProperty(johnsMailerProperty);
User jane = User.get(janeDoe.getName(), true);
UserProperty janesMailerProperty = new Mailer.UserProperty(janeDoe.getEmailAddress());
jane.addProperty(janesMailerProperty);
// initialize the git interface.
gitDirPath = new FilePath(gitDir);
git = Git.with(listener, envVars).in(gitDir).getClient();
// finally: initialize the repo
git.init();
}
开发者ID:jenkinsci,项目名称:flaky-test-handler-plugin,代码行数:23,代码来源:TestGitRepo.java
示例3: newInstance
import hudson.model.UserProperty; //导入依赖的package包/类
@Override
public UserProperty newInstance(User user) {
return new RRHudsonUserProperty();
}
开发者ID:inFullMobile,项目名称:restricted-register-plugin,代码行数:5,代码来源:RRHudsonUserProperty.java
示例4: newInstance
import hudson.model.UserProperty; //导入依赖的package包/类
@Override
public UserProperty newInstance(User user) {
return new PreferredProviderUserProperty(ProviderOption.DEFAULT_OPTION.getId());
}
开发者ID:jenkinsci,项目名称:display-url-api-plugin,代码行数:5,代码来源:PreferredProviderUserPropertyDescriptor.java
示例5: reconfigure
import hudson.model.UserProperty; //导入依赖的package包/类
@Override
public UserProperty reconfigure(StaplerRequest red, net.sf.json.JSONObject form) throws Descriptor.FormException {
return this;
}
开发者ID:ElevenPaths,项目名称:latch-plugin-jenkins,代码行数:5,代码来源:LatchAccountProperty.java
示例6: newInstance
import hudson.model.UserProperty; //导入依赖的package包/类
@Override
public UserProperty newInstance(User user) {
return new P4UserProperty(null);
}
开发者ID:p4paul,项目名称:p4-jenkins,代码行数:5,代码来源:P4UserProperty.java
示例7: P4UserProperty
import hudson.model.UserProperty; //导入依赖的package包/类
@Override
public UserProperty
newInstance(StaplerRequest req, JSONObject formData)
throws FormException {
return new P4UserProperty(formData.optString("email"));
}
开发者ID:p4paul,项目名称:p4-jenkins,代码行数:7,代码来源:P4UserProperty.java
注:本文中的hudson.model.UserProperty类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论