Subversion Repositories XServices

Rev

Rev 70 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 70 Rev 72
1
/*
1
/*
2
 *   Copyright 2011 Brian Rosenberger (Brutex Network)
2
 *   Copyright 2011 Brian Rosenberger (Brutex Network)
3
 *
3
 *
4
 *   Licensed under the Apache License, Version 2.0 (the "License");
4
 *   Licensed under the Apache License, Version 2.0 (the "License");
5
 *   you may not use this file except in compliance with the License.
5
 *   you may not use this file except in compliance with the License.
6
 *   You may obtain a copy of the License at
6
 *   You may obtain a copy of the License at
7
 *
7
 *
8
 *       http://www.apache.org/licenses/LICENSE-2.0
8
 *       http://www.apache.org/licenses/LICENSE-2.0
9
 *
9
 *
10
 *   Unless required by applicable law or agreed to in writing, software
10
 *   Unless required by applicable law or agreed to in writing, software
11
 *   distributed under the License is distributed on an "AS IS" BASIS,
11
 *   distributed under the License is distributed on an "AS IS" BASIS,
12
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 *   See the License for the specific language governing permissions and
13
 *   See the License for the specific language governing permissions and
14
 *   limitations under the License.
14
 *   limitations under the License.
15
 */
15
 */
16
 
16
 
17
package net.brutex.xservices.ws;
17
package net.brutex.xservices.ws;
18
 
-
 
19
import java.math.BigInteger;
-
 
20
import java.util.GregorianCalendar;
18
 
21
import java.util.List;
19
import java.util.List;
22
 
20
 
23
import javax.jws.WebMethod;
21
import javax.jws.WebMethod;
24
import javax.jws.WebParam;
22
import javax.jws.WebParam;
25
import javax.jws.WebService;
23
import javax.jws.WebService;
26
import javax.xml.bind.annotation.XmlElement;
24
import javax.xml.bind.annotation.XmlElement;
27
 
-
 
28
import net.brutex.xservices.types.DateFormatType;
-
 
29
import net.brutex.xservices.types.DateTimeUnits;
25
 
30
import net.brutex.xservices.types.ScheduledJob;
26
import net.brutex.xservices.types.ScheduledJob;
31
import net.brutex.xservices.util.BrutexNamespaces;
27
import net.brutex.xservices.util.BrutexNamespaces;
32
 
28
 
33
import org.apache.cxf.annotations.WSDLDocumentation;
29
import org.apache.cxf.annotations.WSDLDocumentation;
34
import org.apache.cxf.annotations.WSDLDocumentationCollection;
-
 
35
 
30
 
36
/**
31
/**
37
 * Job management services.
32
 * Job management services.
38
 * @author Brian Rosenberger
33
 * @author Brian Rosenberger
39
 * @since 0.5.0
34
 * @since 0.5.0
40
 *
35
 *
41
 */
36
 */
42
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
37
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
43
public interface JobService {
38
public interface JobService {
44
	
39
	
45
	public static final String SERVICE_NAME = "JobService";
40
	public static final String SERVICE_NAME = "JobService";
46
	final String OPERATION_GETJOBLIST = "getJobs";
41
	final String OPERATION_GETJOBLIST = "getJobs";
47
	final String OPERATION_SCHEDULEJOB = "scheduleJob";
42
	final String OPERATION_SCHEDULEJOB = "scheduleJob";
48
	final String OPERATION_GETJOB = "getJob";
43
	final String OPERATION_GETJOB = "getJob";
49
	final String OPERATION_DELETEJOB = "deleteJob";
44
	final String OPERATION_DELETEJOB = "deleteJob";
50
	
45
	
51
	final String PARAM_JOB = "job";
46
	final String PARAM_JOB = "job";
52
	
47
	
53
	
48
	
54
	/**
49
	/**
55
	 * Get a full list of all scheduled jobs.
50
	 * Get a full list of all scheduled jobs.
56
	 * 
51
	 * 
57
	 * @return List of scheduled jobs
52
	 * @return List of scheduled jobs
58
	 * @throws XServicesFault
53
	 * @throws XServicesFault
59
	 */
54
	 */
60
	@WebMethod(operationName=OPERATION_GETJOBLIST)
55
	@WebMethod(operationName=OPERATION_GETJOBLIST)
61
	@WSDLDocumentation(value="Get list of scheduled jobs")
56
	@WSDLDocumentation(value="Get list of scheduled jobs")
62
	public abstract List<ScheduledJob> getJobList() throws XServicesFault;
57
	public abstract List<ScheduledJob> getJobList() throws XServicesFault;
63
	
58
	
64
	/**
59
	/**
65
	 * Add a job to the scheduler.
60
	 * Add a job to the scheduler.
66
	 * 
61
	 * 
67
	 * @param job
62
	 * @param job
68
	 * @return The unique identifier of the job.
63
	 * @return The unique identifier of the job.
69
	 * @throws XServicesFault
64
	 * @throws XServicesFault
70
	 */
65
	 */
71
	@WebMethod(operationName=OPERATION_SCHEDULEJOB)
66
	@WebMethod(operationName=OPERATION_SCHEDULEJOB)
72
	@WSDLDocumentation(value="Schedule a job")
67
	@WSDLDocumentation(value="Schedule a job")
73
	public abstract String scheduleJob(
68
	public abstract String scheduleJob(
74
			@WebParam(name=PARAM_JOB) @XmlElement(required=true) ScheduledJob job)
69
			@WebParam(name=PARAM_JOB) @XmlElement(required=true) ScheduledJob job)
75
			throws XServicesFault;
70
			throws XServicesFault;
76
	
71
	
77
	/**
72
	/**
78
	 * Get a job by id.
73
	 * Get a job by id.
79
	 * 
74
	 * 
80
	 * @param uuid
75
	 * @param uuid
81
	 * @return Job details
76
	 * @return Job details
82
	 * @throws XServicesFault
77
	 * @throws XServicesFault
83
	 */
78
	 */
84
	@WebMethod(operationName=OPERATION_GETJOB)
79
	@WebMethod(operationName=OPERATION_GETJOB)
85
	@WSDLDocumentation(value="Get a job by id")
80
	@WSDLDocumentation(value="Get a job by id")
86
	public abstract ScheduledJob getJob(
81
	public abstract ScheduledJob getJob(
87
			@WebParam(name="id") @XmlElement(required=true) String uuid) throws XServicesFault;
82
			@WebParam(name="id") @XmlElement(required=true) String uuid) throws XServicesFault;
88
	
83
	
89
	/**
84
	/**
90
	 * Delete a job from scheduler.
85
	 * Delete a job from scheduler.
91
	 * 
86
	 * 
92
	 * @param uuid Id of the job that should be deleted
87
	 * @param uuid Id of the job that should be deleted
93
	 * @throws XServicesFault
88
	 * @throws XServicesFault
94
	 */
89
	 */
95
	@WebMethod(operationName=OPERATION_DELETEJOB)
90
	@WebMethod(operationName=OPERATION_DELETEJOB)
96
	@WSDLDocumentation(value="Delete a scheduled job.")
91
	@WSDLDocumentation(value="Delete a scheduled job.")
97
	public abstract void deleteJob(
92
	public abstract void deleteJob(
98
			@WebParam(name="id") @XmlElement(required=true) String uuid) throws XServicesFault;
93
			@WebParam(name="id") @XmlElement(required=true) String uuid) throws XServicesFault;
99
	
94
	
100
	
95
	
101
	
96
	
102
}
97
}