summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakozak2011-11-23 10:53:29 (EST)
committer Winston Prakash2011-12-01 20:47:20 (EST)
commit061bb29afb445c98b84c286c2325e830a97519a1 (patch)
tree73c8d1247c90e04c482f4e8858d917f05e33b25c
parent1c0d10c7b80f62788c9f0a9e44d0ad7e48b37439 (diff)
downloadorg.eclipse.hudson.core-061bb29afb445c98b84c286c2325e830a97519a1.zip
org.eclipse.hudson.core-061bb29afb445c98b84c286c2325e830a97519a1.tar.gz
org.eclipse.hudson.core-061bb29afb445c98b84c286c2325e830a97519a1.tar.bz2
doResetProjectProperty method was relocated to Job class.
Signed-off-by: Winston Prakash <winston.prakash@gmail.com>
-rw-r--r--hudson-core/src/main/java/hudson/model/AbstractProject.java19
-rw-r--r--hudson-core/src/main/java/hudson/model/Job.java20
2 files changed, 19 insertions, 20 deletions
diff --git a/hudson-core/src/main/java/hudson/model/AbstractProject.java b/hudson-core/src/main/java/hudson/model/AbstractProject.java
index 5d995bd..e603805 100644
--- a/hudson-core/src/main/java/hudson/model/AbstractProject.java
+++ b/hudson-core/src/main/java/hudson/model/AbstractProject.java
@@ -131,7 +131,6 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
public static final String SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME = "scmCheckoutRetryCount";
public static final String CUSTOM_WORKSPACE_PROPERTY_NAME = "customWorkspace";
public static final String JDK_PROPERTY_NAME = "jdk";
- public static final String PROPERTY_NAME_SEPARATOR = ";";
public static final String SCM_PROPERTY_NAME = "scm";
public static final String HAS_QUIET_PERIOD_PROPERTY_NAME = "hasQuietPeriod";
public static final String HAS_SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME = "hasScmCheckoutRetryCount";
@@ -1949,24 +1948,6 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
}
}
- /**
- * Resets overridden properties to the values defined in parent.
- *
- * @param propertyName the name of the properties. It possible to pass several names
- * separated with {@link #PROPERTY_NAME_SEPARATOR}.
- * @throws java.io.IOException exception.
- */
- public void doResetProjectProperty(@QueryParameter final String propertyName) throws IOException {
- checkPermission(CONFIGURE);
- for (String name : StringUtils.split(propertyName, PROPERTY_NAME_SEPARATOR)) {
- final IProjectProperty property = getProperty(name);
- if (null != property) {
- property.resetValue();
- }
- }
- save();
- }
-
public boolean cleanWorkspace() throws IOException, InterruptedException{
checkPermission(BUILD);
R b = getSomeBuildWithWorkspace();
diff --git a/hudson-core/src/main/java/hudson/model/Job.java b/hudson-core/src/main/java/hudson/model/Job.java
index fa0a51a..be07e24 100644
--- a/hudson-core/src/main/java/hudson/model/Job.java
+++ b/hudson-core/src/main/java/hudson/model/Job.java
@@ -123,7 +123,7 @@ public abstract class Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
extends AbstractItem implements ExtensionPoint, StaplerOverridable, IJob {
private static transient final String HUDSON_BUILDS_PROPERTY_KEY = "HUDSON_BUILDS";
private static transient final String PROJECT_PROPERTY_KEY_PREFIX = "has";
-
+ public static final String PROPERTY_NAME_SEPARATOR = ";";
public static final String LOG_ROTATOR_PROPERTY_NAME = "logRotator";
/**
@@ -362,6 +362,24 @@ public abstract class Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
buildProjectProperties();
}
+ /**
+ * Resets overridden properties to the values defined in parent.
+ *
+ * @param propertyName the name of the properties. It possible to pass several names
+ * separated with {@link #PROPERTY_NAME_SEPARATOR}.
+ * @throws java.io.IOException exception.
+ */
+ public void doResetProjectProperty(@QueryParameter final String propertyName) throws IOException {
+ checkPermission(CONFIGURE);
+ for (String name : StringUtils.split(propertyName, PROPERTY_NAME_SEPARATOR)) {
+ final IProjectProperty property = getProperty(name);
+ if (null != property) {
+ property.resetValue();
+ }
+ }
+ save();
+ }
+
protected void initAllowSave() {
allowSave = new ThreadLocal<Boolean>() {
@Override