KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > cruisecontrol > jmx > ProjectMBean


1 /********************************************************************************
2  * CruiseControl, a Continuous Integration Toolkit
3  * Copyright (c) 2001-2003, ThoughtWorks, Inc.
4  * 651 W Washington Ave. Suite 600
5  * Chicago, IL 60661 USA
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * + Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  *
15  * + Redistributions in binary form must reproduce the above
16  * copyright notice, this list of conditions and the following
17  * disclaimer in the documentation and/or other materials provided
18  * with the distribution.
19  *
20  * + Neither the name of ThoughtWorks, Inc., CruiseControl, nor the
21  * names of its contributors may be used to endorse or promote
22  * products derived from this software without specific prior
23  * written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
29  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  ********************************************************************************/

37 package net.sourceforge.cruisecontrol.jmx;
38
39 import net.sourceforge.cruisecontrol.CruiseControlException;
40
41 public interface ProjectMBean {
42
43     /**
44      * Pauses the controlled project.
45      */

46     public void pause();
47
48     /**
49      * Resumes the controlled project.
50      */

51     public void resume();
52
53     /**
54      * Runs a build now
55      */

56     public void build();
57
58     /**
59      * Runs a build now, overriding the target of the used builder
60      *
61      */

62     public void buildWithTarget(String JavaDoc target);
63     
64     /**
65      * Serialize the project
66      */

67     public void serialize();
68
69
70 // /**
71
// * Returns the duration the managed project process has been executing.
72
// *
73
// * @return Execution duration.
74
// */
75
// public long getUpTime();
76
//
77
// /**
78
// * Returns the number of successful builds performed by the managed
79
// * project.
80
// *
81
// * @return Successful build count.
82
// */
83
// public long getSuccessfulBuildCount();
84

85     /**
86      * Is the project paused?
87      *
88      * @return Pause state
89      */

90     public boolean isPaused();
91
92     /**
93      *
94      * @return start time of the last build, using the format 'yyyyMMddHHmmss'
95      */

96     public String JavaDoc getBuildStartTime();
97
98     /**
99      * Change the Project label
100      *
101      * @param label a new label; should be valid for the current
102      * LabelIncrementer
103      */

104     public void setLabel(String JavaDoc label);
105
106     public String JavaDoc getLabel();
107
108     /**
109      * Change the Project label incrementer; will only succeed if the existing
110      * label is valid for the new label incrementer
111      *
112      * @param classname fully qualified class name of the new label incrementer
113      */

114     public void setLabelIncrementer(String JavaDoc classname) throws CruiseControlException;
115
116     /**
117      * @return name of the current label incrementer
118      */

119     public String JavaDoc getLabelIncrementer();
120
121     /**
122      * Change the last built date. This can be used to manipulate whether
123      * builds will be initiated.
124      *
125      * @param date date string in the form yyyyMMddHHmmss
126      */

127     public void setLastBuild(String JavaDoc date) throws CruiseControlException;
128
129     public String JavaDoc getLastBuild();
130
131     /**
132      * Change the last built date. This can be used to manipulate whether
133      * builds will be initiated.
134      *
135      * @param date date string in the form yyyyMMddHHmmss
136      */

137     public void setLastSuccessfulBuild(String JavaDoc date) throws CruiseControlException;
138
139     public String JavaDoc getLastSuccessfulBuild();
140
141     /**
142      * Change the directory where CruiseControl logs are kept
143      *
144      * @param logdir Relative or absolute path to the log directory
145      */

146     public void setLogDir(String JavaDoc logdir) throws CruiseControlException;
147
148     public String JavaDoc getLogDir();
149
150     /**
151      * Change the project name. May cause problems if configuration file is
152      * not also changed
153      */

154     public void setProjectName(String JavaDoc name);
155
156     public String JavaDoc getProjectName();
157
158     /**
159      * Change the interval between builds
160      *
161      * @param buildInterval Build interval in milliseconds
162      */

163     public void setBuildInterval(long buildInterval);
164
165     public long getBuildInterval();
166     
167     /**
168      * Gets the human-readable version of the project status
169      */

170     public String JavaDoc getStatus();
171 }
172
Popular Tags