Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakozak2011-11-23 03:09:57 -0500
committerWinston Prakash2011-12-01 20:47:06 -0500
commit855eeb6d786fbc5e26301bd1ce61f462eadf5fec (patch)
treeb3225c9361858ec487b702792b143a90375566a0 /hudson-core/src/main/java/org/eclipse
parent676aa16da2d3d432afac6e1da9ff24a269f7e9e9 (diff)
downloadorg.eclipse.hudson.core-855eeb6d786fbc5e26301bd1ce61f462eadf5fec.tar.gz
org.eclipse.hudson.core-855eeb6d786fbc5e26301bd1ce61f462eadf5fec.tar.xz
org.eclipse.hudson.core-855eeb6d786fbc5e26301bd1ce61f462eadf5fec.zip
Improve IJob interface (extend from Item). Draft implementation of DescribableProjectProperty. Implement unit test for property constructor.
Signed-off-by: Winston Prakash <winston.prakash@gmail.com>
Diffstat (limited to 'hudson-core/src/main/java/org/eclipse')
-rw-r--r--hudson-core/src/main/java/org/eclipse/hudson/api/model/IJob.java3
-rw-r--r--hudson-core/src/main/java/org/eclipse/hudson/api/model/project/property/DescribableListProjectProperty.java36
2 files changed, 38 insertions, 1 deletions
diff --git a/hudson-core/src/main/java/org/eclipse/hudson/api/model/IJob.java b/hudson-core/src/main/java/org/eclipse/hudson/api/model/IJob.java
index 11be85da..fd262b54 100644
--- a/hudson-core/src/main/java/org/eclipse/hudson/api/model/IJob.java
+++ b/hudson-core/src/main/java/org/eclipse/hudson/api/model/IJob.java
@@ -14,6 +14,7 @@
*******************************************************************************/
package org.eclipse.hudson.api.model;
+import hudson.model.Item;
import hudson.model.JobProperty;
import hudson.model.JobPropertyDescriptor;
import hudson.tasks.LogRotator;
@@ -26,7 +27,7 @@ import java.util.Map;
*
* @author Nikita Levyankov
*/
-public interface IJob<T extends IJob> {
+public interface IJob<T extends IJob> extends Item {
/**
* Returns cascading project name.
diff --git a/hudson-core/src/main/java/org/eclipse/hudson/api/model/project/property/DescribableListProjectProperty.java b/hudson-core/src/main/java/org/eclipse/hudson/api/model/project/property/DescribableListProjectProperty.java
new file mode 100644
index 00000000..f6c76886
--- /dev/null
+++ b/hudson-core/src/main/java/org/eclipse/hudson/api/model/project/property/DescribableListProjectProperty.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ *
+ * Copyright (c) 2011 Oracle Corporation.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Nikita Levyankov
+ *
+ *******************************************************************************/
+package org.eclipse.hudson.api.model.project.property;
+
+import hudson.util.DescribableList;
+import org.eclipse.hudson.api.model.IJob;
+
+/**
+ * Property represents DescribableList object.
+ * <p/>
+ * Date: 10/3/11
+ *
+ * @author Nikita Levyankov
+ */
+public class DescribableListProjectProperty extends BaseProjectProperty<DescribableList> {
+ public DescribableListProjectProperty(IJob job) {
+ super(job);
+ }
+
+ @Override
+ public DescribableList getDefaultValue() {
+ return new DescribableList(getJob());
+ }
+}

Back to the top