本文整理了Java中hudson.model.Project.getPublishersList()
方法的一些代码示例,展示了Project.getPublishersList()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Project.getPublishersList()
方法的具体详情如下:
包路径:hudson.model.Project
类名称:Project
方法名:getPublishersList
暂无
代码示例来源:origin: jenkinsci/jenkins
/**
* @deprecated as of 1.463
* We will be soon removing the restriction that only one instance of publisher is allowed per type.
* Use {@link #getPublishersList()} instead.
*/
@Deprecated
public Map<Descriptor<Publisher>,Publisher> getPublishers() {
return getPublishersList().toMap();
}
代码示例来源:origin: jenkinsci/jenkins
/**
* Adds a new {@link BuildStep} to this {@link Project} and saves the configuration.
*
* @deprecated as of 1.290
* Use {@code getPublishersList().add(x)}
*/
@Deprecated
public void addPublisher(Publisher buildStep) throws IOException {
getPublishersList().add(buildStep);
}
代码示例来源:origin: jenkinsci/jenkins
/**
* Removes a publisher from this project, if it's active.
*
* @deprecated as of 1.290
* Use {@code getPublishersList().remove(x)}
*/
@Deprecated
public void removePublisher(Descriptor<Publisher> descriptor) throws IOException {
getPublishersList().remove(descriptor);
}
代码示例来源:origin: jenkinsci/jenkins
public Publisher getPublisher(Descriptor<Publisher> descriptor) {
for (Publisher p : getPublishersList()) {
if(p.getDescriptor()==descriptor)
return p;
}
return null;
}
代码示例来源:origin: jenkinsci/jenkins
@Override
public boolean isFingerprintConfigured() {
return getPublishersList().get(Fingerprinter.class)!=null;
}
代码示例来源:origin: jenkinsci/jenkins
@Override
protected Set<ResourceActivity> getResourceActivities() {
final Set<ResourceActivity> activities = new HashSet<ResourceActivity>();
activities.addAll(super.getResourceActivities());
activities.addAll(Util.filter(getBuildersList(),ResourceActivity.class));
activities.addAll(Util.filter(getPublishersList(),ResourceActivity.class));
activities.addAll(Util.filter(getBuildWrappersList(),ResourceActivity.class));
return activities;
}
代码示例来源:origin: jenkinsci/jenkins
for (BuildStep step : getPublishersList()) {
try {
r.addAll(step.getProjectActions(this));
代码示例来源:origin: jenkinsci/jenkins
private void locationChanged(Item item, String oldFullName, String newFullName) {
// update BuildTrigger of other projects that point to this object.
// can't we generalize this?
for( Project<?,?> p : Jenkins.getInstance().allItems(Project.class) ) {
BuildTrigger t = p.getPublishersList().get(BuildTrigger.class);
if(t!=null) {
String cp2 = Items.computeRelativeNamesAfterRenaming(oldFullName, newFullName, t.childProjects, p.getParent());
if (!cp2.equals(t.childProjects)) {
t.childProjects = cp2;
try {
p.save();
} catch (IOException e) {
LOGGER.log(Level.WARNING, "Failed to persist project setting during rename from "+oldFullName+" to "+newFullName,e);
}
}
}
}
}
}
代码示例来源:origin: jenkinsci/jenkins
@Override
public void onLoad(ItemGroup<? extends Item> parent, String name) throws IOException {
super.onLoad(parent, name);
getBuildersList().setOwner(this);
getPublishersList().setOwner(this);
getBuildWrappersList().setOwner(this);
}
代码示例来源:origin: jenkinsci/jenkins
@Override protected void buildDependencyGraph(DependencyGraph graph) {
super.buildDependencyGraph(graph);
getPublishersList().buildDependencyGraph(this,graph);
getBuildersList().buildDependencyGraph(this,graph);
getBuildWrappersList().buildDependencyGraph(this,graph);
}
代码示例来源:origin: jenkinsci/jenkins
@Override
protected void submit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException {
super.submit(req,rsp);
JSONObject json = req.getSubmittedForm();
getBuildWrappersList().rebuild(req,json, BuildWrappers.getFor(this));
getBuildersList().rebuildHetero(req,json, Builder.all(), "builder");
getPublishersList().rebuildHetero(req, json, Publisher.all(), "publisher");
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
public Publisher getPublisher(Descriptor<Publisher> descriptor) {
for (Publisher p : getPublishersList()) {
if(p.getDescriptor()==descriptor)
return p;
}
return null;
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Adds a new {@link BuildStep} to this {@link Project} and saves the configuration.
*
* @deprecated as of 1.290
* Use {@code getPublishersList().add(x)}
*/
@Deprecated
public void addPublisher(Publisher buildStep) throws IOException {
getPublishersList().add(buildStep);
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Removes a publisher from this project, if it's active.
*
* @deprecated as of 1.290
* Use {@code getPublishersList().remove(x)}
*/
@Deprecated
public void removePublisher(Descriptor<Publisher> descriptor) throws IOException {
getPublishersList().remove(descriptor);
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
@Override
protected Set<ResourceActivity> getResourceActivities() {
final Set<ResourceActivity> activities = new HashSet<ResourceActivity>();
activities.addAll(super.getResourceActivities());
activities.addAll(Util.filter(getBuildersList(),ResourceActivity.class));
activities.addAll(Util.filter(getPublishersList(),ResourceActivity.class));
activities.addAll(Util.filter(getBuildWrappersList(),ResourceActivity.class));
return activities;
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
@Override
protected Set<ResourceActivity> getResourceActivities() {
final Set<ResourceActivity> activities = new HashSet<ResourceActivity>();
activities.addAll(super.getResourceActivities());
activities.addAll(Util.filter(getBuildersList(), ResourceActivity.class));
activities.addAll(Util.filter(getPublishersList(), ResourceActivity.class));
activities.addAll(Util.filter(getBuildWrappersList(), ResourceActivity.class));
return activities;
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
@Override
public void onLoad(ItemGroup<? extends Item> parent, String name) throws IOException {
super.onLoad(parent, name);
getBuildersList().setOwner(this);
getPublishersList().setOwner(this);
getBuildWrappersList().setOwner(this);
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-plugin-utils
/**
* @throws UnsupportedProjectException if the Project type is {@link Type#UNSUPPORTED}.
*/
public DescribableList<Publisher,Descriptor<Publisher>> getPublishersList() {
switch (getType()) {
case NORMAL:
return asNormal().getPublishersList();
case MULTICONFIG:
return asMultiConfig().getPublishersList();
}
throw new UnsupportedProjectException(getDelegate());
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
@Override protected void buildDependencyGraph(DependencyGraph graph) {
super.buildDependencyGraph(graph);
getPublishersList().buildDependencyGraph(this,graph);
getBuildersList().buildDependencyGraph(this,graph);
getBuildWrappersList().buildDependencyGraph(this,graph);
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
@Override
protected void submit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException {
super.submit(req,rsp);
JSONObject json = req.getSubmittedForm();
getBuildWrappersList().rebuild(req,json, BuildWrappers.getFor(this));
getBuildersList().rebuildHetero(req,json, Builder.all(), "builder");
getPublishersList().rebuildHetero(req, json, Publisher.all(), "publisher");
}
内容来源于网络,如有侵权,请联系作者删除!