Skip to content
Permalink
Browse files

[JENKINS-19843] Removed setters frpm RebuildParameterPage. Developers…

… set its properties with the constructor.
  • Loading branch information...
ikedam committed Oct 8, 2013
1 parent 9da2497 commit c91995e14dc288efb54d3b2351cd320acefd1567
@@ -459,9 +459,10 @@ public RebuildParameterPage getRebuildParameterPage(ParameterValue value) {
}

// No provider available, use a view provided by rebuild plugin.
RebuildParameterPage page = new RebuildParameterPage();
page.setClazz(getClass());
page.setPage(String.format("%s.jelly", value.getClass().getSimpleName()));
RebuildParameterPage page = new RebuildParameterPage(
getClass(),
String.format("%s.jelly", value.getClass().getSimpleName())
);
return page;
}
}
@@ -25,34 +25,31 @@
package com.sonyericsson.rebuild;

/**
* A bean contains information of the view to show parameters in rebuild page.
* An object contains information of the view to show parameters in rebuild page.
*/
public class RebuildParameterPage {
private Class<?> clazz = null;
private final Class<?> clazz;
/**
* @return the class for the view.
*/
public Class<?> getClazz() {
return clazz;
}
/**
* @param clazz the class for the view.
*/
public void setClazz(Class<?> clazz) {
this.clazz = clazz;
}

private String page = null;
private final String page;
/**
* @return the path of jelly(or groovy) file.
*/
public String getPage() {
return page;
}

/**
* @param clazz the class for the view.
* @param page the path of jelly(or groovy) file.
*/
public void setPage(String page) {
public RebuildParameterPage(Class<?> clazz, String page) {
this.clazz = clazz;
this.page = page;
}
}
@@ -318,9 +318,7 @@ public RebuildParameterPage getRebuildPage(ParameterValue value) {
if (!(value instanceof SupportedUnknownParameterValue)) {
return null;
}
RebuildParameterPage page = new RebuildParameterPage();
page.setClazz(SupportedUnknownParameterValue.class);
page.setPage("rebuild.groovy");
RebuildParameterPage page = new RebuildParameterPage(SupportedUnknownParameterValue.class, "rebuild.groovy");
return page;
}
}

0 comments on commit c91995e

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