Skip to content
Permalink
Browse files

[FIXED JENKINS-28094] Removed ca:selectorList.

  • Loading branch information...
ikedam committed Apr 25, 2015
1 parent 11705ee commit 6ad2f22d9b83d6e5fad28fa98e6bf1f4c64265da
@@ -23,6 +23,9 @@
*/
package hudson.plugins.copyartifact;

import java.util.List;

import jenkins.model.Jenkins;
import hudson.DescriptorExtensionList;
import hudson.Extension;
import hudson.model.Descriptor;
@@ -35,6 +38,10 @@
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.StaplerRequest;

import com.google.common.base.Predicate;
import com.google.common.collect.Collections2;
import com.google.common.collect.Lists;

/**
* @author Alan Harder
*/
@@ -90,6 +97,20 @@ public String getDisplayName() {
public DescriptorExtensionList<BuildSelector,Descriptor<BuildSelector>> getBuildSelectors() {
return Hudson.getInstance().<BuildSelector,Descriptor<BuildSelector>>getDescriptorList(BuildSelector.class);
}

/**
* @return {@link BuildSelector}s available for BuildSelectorParameter.
*/
public List<Descriptor<BuildSelector>> getAvailableBuildSelectorList() {
return Lists.newArrayList(Collections2.filter(
Jenkins.getInstance().getDescriptorList(BuildSelector.class),
new Predicate<Descriptor<BuildSelector>>() {
public boolean apply(Descriptor<BuildSelector> input) {
return !"ParameterizedBuildSelector".equals(input.clazz.getSimpleName());
};
}
));
}
}

private static final XStream2 XSTREAM = new XStream2();
@@ -22,12 +22,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:f="/lib/form" xmlns:ca="/hudson/plugins/copyartifact">
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:f="/lib/form">
<f:entry title="${%Name}" field="name" help="/help/parameter/name.html">
<f:textbox/>
</f:entry>
<ca:selectorList currentSelector="${instance.defaultSelector}"
name="defaultSelector" title="${%Default Selector}" omit="ParameterizedBuildSelector"/>
<f:dropdownDescriptorSelector field="defaultSelector" help="/plugin/copyartifact/help-buildSelector.html"
title="${%Default Selector}" descriptors="${descriptor.availableBuildSelectorList}" />
<f:entry title="${%Description}" field="description" help="/help/parameter/description.html">
<f:textarea/>
</f:entry>
@@ -22,10 +22,13 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:ca="/hudson/plugins/copyartifact">
<ca:selectorList currentSelector="${it.defaultSelector}" descriptor="${it.descriptor}"
name="parameter" title="${it.name}" description="${it.description}"
omit="ParameterizedBuildSelector">
<tr><td><input type="hidden" name="name" value="${it.name}"/></td></tr>
</ca:selectorList>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:f="/lib/form">
<f:dropdownDescriptorSelector field="parameter" help="/plugin/copyartifact/help-buildSelector.html"
title="${it.name}" description="${it.description}"
default="${it.defaultSelector}"
descriptors="${it.descriptor.availableBuildSelectorList}">
<j:if test="${dropdownListMode=='generateEntries'}">
<tr><td><input type="hidden" name="name" value="${it.name}"/></td></tr>
</j:if>
</f:dropdownDescriptorSelector>
</j:jelly>
@@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:f="/lib/form" xmlns:ca="/hudson/plugins/copyartifact">
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:f="/lib/form">
<f:entry title="${%Project name}" field="projectName">
<f:editableComboBox items="${app.topLevelItemNames}" clazz="setting-input"/>
</f:entry>

This file was deleted.

No changes.

0 comments on commit 6ad2f22

Please sign in to comment.
You can’t perform that action at this time.