本文整理了Java中hudson.triggers.Trigger.for_()
方法的一些代码示例,展示了Trigger.for_()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Trigger.for_()
方法的具体详情如下:
包路径:hudson.triggers.Trigger
类名称:Trigger
方法名:for_
[英]Returns a subset of TriggerDescriptors that applys to the given item.
[中]返回应用于给定项的触发器描述符的子集。
代码示例来源:origin: jenkinsci/jenkins
/**
* Returns a subset of {@link TriggerDescriptor}s that applys to the given item.
*
* @deprecated as of 1.286
* Use {@link Trigger#for_(Item)}.
*/
@Deprecated
public static List<TriggerDescriptor> getApplicableTriggers(Item i) {
return Trigger.for_(i);
}
}
代码示例来源:origin: jenkinsci/jenkins
triggers.replaceBy(buildDescribable(req, Trigger.for_(this)));
for (Trigger t : triggers())
t.start(this,true);
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Returns a subset of {@link TriggerDescriptor}s that applys to the given
* item.
*
* @deprecated as of 1.286 Use {@link Trigger#for_(Item)}.
*/
public static List<TriggerDescriptor> getApplicableTriggers(Item i) {
return Trigger.for_(i);
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Returns a subset of {@link TriggerDescriptor}s that applys to the given item.
*
* @deprecated as of 1.286
* Use {@link Trigger#for_(Item)}.
*/
public static List<TriggerDescriptor> getApplicableTriggers(Item i) {
return Trigger.for_(i);
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Returns a subset of {@link TriggerDescriptor}s that applys to the given item.
*
* @deprecated as of 1.286
* Use {@link Trigger#for_(Item)}.
*/
public static List<TriggerDescriptor> getApplicableTriggers(Item i) {
return Trigger.for_(i);
}
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Returns a subset of {@link TriggerDescriptor}s that applys to the given item.
*
* @deprecated as of 1.286
* Use {@link Trigger#for_(Item)}.
*/
public static List<TriggerDescriptor> getApplicableTriggers(Item i) {
return Trigger.for_(i);
}
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Returns a subset of {@link TriggerDescriptor}s that applys to the given item.
*
* @deprecated as of 1.286
* Use {@link Trigger#for_(Item)}.
*/
@Deprecated
public static List<TriggerDescriptor> getApplicableTriggers(Item i) {
return Trigger.for_(i);
}
}
代码示例来源:origin: hudson/hudson-2.x
/**
* @return describable list of trigger elements.
*/
public DescribableList<Trigger<?>, TriggerDescriptor> getTriggerDescribableList() {
return DescribableListUtil.convertToDescribableList(Trigger.for_(this), this, TriggerProjectProperty.class);
}
代码示例来源:origin: org.jenkins-ci.plugins/cloudbees-folder
@Restricted(NoExternalUse.class) // currently used only by jelly / stapler
public List<TriggerDescriptor> getTriggerDescriptors() {
// TODO remove this once core has support for DescriptorVisibilityFilter on Trigger.for_(Item)
List<TriggerDescriptor> result = new ArrayList<TriggerDescriptor>();
for (TriggerDescriptor d: Trigger.for_(this)) {
if (d instanceof TimerTrigger.DescriptorImpl) {
continue;
}
result.add(d);
}
return result;
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* @return describable list of trigger elements.
*/
public DescribableList<Trigger<?>, TriggerDescriptor> getTriggerDescribableList() {
return DescribableListUtil.convertToDescribableList(Trigger.for_(this), this, TriggerProjectProperty.class);
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* @return describable list of trigger elements.
*/
public DescribableList<Trigger<?>, TriggerDescriptor> getTriggerDescribableList() {
return DescribableListUtil.convertToDescribableList(Trigger.for_(this), this, TriggerProjectProperty.class);
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* @return describable list of trigger elements.
*/
public DescribableList<Trigger<?>, TriggerDescriptor> getTriggerDescribableList() {
return DescribableListUtil.convertToDescribableList(Trigger.for_(this), this, TriggerProjectProperty.class);
}
代码示例来源:origin: jenkinsci/cloudbees-folder-plugin
@Restricted(NoExternalUse.class) // currently used only by jelly / stapler
public List<TriggerDescriptor> getTriggerDescriptors() {
// TODO remove this once core has support for DescriptorVisibilityFilter on Trigger.for_(Item)
List<TriggerDescriptor> result = new ArrayList<TriggerDescriptor>();
for (TriggerDescriptor d: Trigger.for_(this)) {
if (d instanceof TimerTrigger.DescriptorImpl) {
continue;
}
result.add(d);
}
return result;
}
代码示例来源:origin: org.jenkins-ci.plugins.workflow/workflow-job
triggerSection = form.getJSONObject("triggers");
trigList.rebuild(req, triggerSection, Trigger.for_(owner));
} catch (IOException e) {
throw new Descriptor.FormException(e, "triggers");
代码示例来源:origin: org.jenkins-ci.plugins/cloudbees-folder
t.stop();
triggers.rebuild(req, json, Trigger.for_(this));
for (Trigger t : triggers) {
t.start(this, true);
代码示例来源:origin: jenkinsci/cloudbees-folder-plugin
t.stop();
triggers.rebuild(req, json, Trigger.for_(this));
for (Trigger t : triggers) {
t.start(this, true);
代码示例来源:origin: org.eclipse.hudson/hudson-core
buildTriggers(req, req.getSubmittedForm(), Trigger.for_(this));
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
@Override
protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException {
super.submit(req, rsp);
makeDisabled(null != req.getParameter("disable"));
setJDK(req.getParameter("jdk"));
setQuietPeriod(null != req.getParameter(HAS_QUIET_PERIOD_PROPERTY_NAME)
? req.getParameter("quiet_period") : null);
setScmCheckoutRetryCount(null != req.getParameter(HAS_SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME)
? req.getParameter("scmCheckoutRetryCount") : null);
setBlockBuildWhenDownstreamBuilding(null != req.getParameter("blockBuildWhenDownstreamBuilding"));
setBlockBuildWhenUpstreamBuilding(null != req.getParameter("blockBuildWhenUpstreamBuilding"));
if (req.getParameter(APPOINTED_NODE_PROPERTY_NAME) != null) {
// New logic for handling whether this choice came from the dropdown or textfield.
if (BASIC_KEY.equals(req.getParameter(AFFINITY_CHO0SER_KEY))) {
setAppointedNode(
new AppointedNode(Util.fixEmptyAndTrim(req.getParameter(SLAVE_KEY)), false));
} else {
setAppointedNode(
new AppointedNode(Util.fixEmptyAndTrim(req.getParameter(ASSIGNED_LABEL_KEY)), true));
}
} else {
setAppointedNode(null);
}
setCleanWorkspaceRequired(null != req.getParameter("cleanWorkspaceRequired"));
setConcurrentBuild(req.getSubmittedForm().has("concurrentBuild"));
authToken = BuildAuthorizationToken.create(req);
setScm(SCMS.parseSCM(req, this));
buildTriggers(req, req.getSubmittedForm(), Trigger.for_(this));
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
@Override
protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException {
super.submit(req,rsp);
makeDisabled(null != req.getParameter("disable"));
setJDK(req.getParameter("jdk"));
setQuietPeriod(null != req.getParameter(HAS_QUIET_PERIOD_PROPERTY_NAME)
? req.getParameter("quiet_period") : null);
setScmCheckoutRetryCount(null != req.getParameter(HAS_SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME)
? req.getParameter("scmCheckoutRetryCount") : null);
setBlockBuildWhenDownstreamBuilding(null != req.getParameter("blockBuildWhenDownstreamBuilding"));
setBlockBuildWhenUpstreamBuilding(null != req.getParameter("blockBuildWhenUpstreamBuilding"));
if (req.getParameter(APPOINTED_NODE_PROPERTY_NAME) != null) {
// New logic for handling whether this choice came from the dropdown or textfield.
if (BASIC_KEY.equals(req.getParameter(AFFINITY_CHO0SER_KEY))) {
setAppointedNode(
new AppointedNode(Util.fixEmptyAndTrim(req.getParameter(SLAVE_KEY)), false));
} else {
setAppointedNode(
new AppointedNode(Util.fixEmptyAndTrim(req.getParameter(ASSIGNED_LABEL_KEY)), true));
}
} else {
setAppointedNode(null);
}
setCleanWorkspaceRequired(null != req.getParameter("cleanWorkspaceRequired"));
setConcurrentBuild(req.getSubmittedForm().has("concurrentBuild"));
authToken = BuildAuthorizationToken.create(req);
setScm(SCMS.parseSCM(req,this));
buildTriggers(req, req.getSubmittedForm(), Trigger.for_(this));
}
代码示例来源:origin: hudson/hudson-2.x
@Override
protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException {
super.submit(req,rsp);
makeDisabled(null != req.getParameter("disable"));
setJDK(req.getParameter("jdk"));
setQuietPeriod(null != req.getParameter(HAS_QUIET_PERIOD_PROPERTY_NAME)
? req.getParameter("quiet_period") : null);
setScmCheckoutRetryCount(null != req.getParameter(HAS_SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME)
? req.getParameter("scmCheckoutRetryCount") : null);
setBlockBuildWhenDownstreamBuilding(null != req.getParameter("blockBuildWhenDownstreamBuilding"));
setBlockBuildWhenUpstreamBuilding(null != req.getParameter("blockBuildWhenUpstreamBuilding"));
if (req.getParameter(APPOINTED_NODE_PROPERTY_NAME) != null) {
// New logic for handling whether this choice came from the dropdown or textfield.
if (BASIC_KEY.equals(req.getParameter(AFFINITY_CHO0SER_KEY))) {
setAppointedNode(
new AppointedNode(Util.fixEmptyAndTrim(req.getParameter(SLAVE_KEY)), false));
} else {
setAppointedNode(
new AppointedNode(Util.fixEmptyAndTrim(req.getParameter(ASSIGNED_LABEL_KEY)), true));
}
} else {
setAppointedNode(null);
}
setCleanWorkspaceRequired(null != req.getParameter("cleanWorkspaceRequired"));
setConcurrentBuild(req.getSubmittedForm().has("concurrentBuild"));
authToken = BuildAuthorizationToken.create(req);
setScm(SCMS.parseSCM(req,this));
buildTriggers(req, req.getSubmittedForm(), Trigger.for_(this));
}
内容来源于网络,如有侵权,请联系作者删除!