本文整理汇总了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();
}
示例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();
}
示例3: newInstance
import hudson.model.UserProperty; //导入依赖的package包/类
@Override
public UserProperty newInstance(User user) {
return new RRHudsonUserProperty();
}
示例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;
}
示例6: newInstance
import hudson.model.UserProperty; //导入依赖的package包/类
@Override
public UserProperty newInstance(User user) {
return new P4UserProperty(null);
}
示例7: P4UserProperty
import hudson.model.UserProperty; //导入依赖的package包/类
@Override
public UserProperty
newInstance(StaplerRequest req, JSONObject formData)
throws FormException {
return new P4UserProperty(formData.optString("email"));
}