1 /**
2 * Copyright 2005-2006 the original author or authors.
3 *
4 * Licensed under the Gnu General Pubic License, Version 2.0 (the
5 * "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/gpl-license.php
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the Gnu General Public License for more details.
14 */
15 package org.figure8.join.services.remoting;
16
17 import org.figure8.join.services.remoting.beans.RemoteStatus;
18
19 import java.rmi.RemoteException;
20 /**
21 * Remote service interface definition. This service allows you to monitor and
22 * control the different process managed by the Join application. Such process
23 * are : the construction of an <code>Assembly</code>, the deployments on integration
24 * environments and the construction of a <code>Build</code>. Typically, this service
25 * is called by scripts executing these process and reporting success/failures
26 * by setting <code>Status</code> upon this artifacts and process.
27 * <br/>
28 * All this service methods require authentication through the usage of the
29 * <code>login()</code> method. The security token returned by this method should
30 * then be used as a parameter of every service call.
31 *
32 * @author <a href="mailto:laurent.broudoux@free.fr">Laurent Broudoux</a>
33 * @version $Revision: 1.1 $
34 */
35 public interface ProcessControlService extends AuthenticatedService{
36
37
38
39 /**
40 * Retrieve the status of a specified <code>Build</code>.
41 * @param token Authentication token provided earlier by login() method
42 * @param key The unique key identifier of Build to retrieve status for
43 * @return A {@link RemoteStatus} corresponding to status of build identified by <b>key</b>
44 * @throws InvalidSessionException if user has no valid session on server-side
45 * @throws RemoteException if an exception occurs during the remote conversation
46 */
47 public abstract RemoteStatus getBuildStatus(String token, String key) throws InvalidSessionException, RemoteException;
48
49 /**
50 * Set the specified status to a specified <code>Build</code>.
51 * @param token Authentication token provided earlier by login() method
52 * @param statusKey Unique key idenitifer of the status to set to build
53 * @param buildKey The unique key idenitifer of Build to update status
54 * @throws InvalidSessionException if user has no valid session on server-side
55 * @throws RemoteException if an exception occurs during the remote conversation
56 */
57 public abstract void setBuildStatus(String token, String statusKey, String buildKey) throws InvalidSessionException, RemoteException;
58
59 /**
60 * Retrieve the status of a specified <code>Assembly</code>.
61 * @param token Authentication token provided earlier by login() method
62 * @param key The unique key identifier of Assembly to retrieve status for
63 * @return A {@link RemoteStatus} corresponding to status of assembly identified by <b>key</b>
64 * @throws InvalidSessionException if user has no valid session on server-side
65 * @throws RemoteException if an exception occurs during the remote conversation
66 */
67 public abstract RemoteStatus getAssemblyStatus(String token, String key) throws InvalidSessionException, RemoteException;
68
69 /**
70 * Set the specified status to a specified <code>Assembly</code>.
71 * @param token Authentication token provided earlier by login() method
72 * @param statusKey Unique key idenitifer of the status to set to assembly
73 * @param assemblyKey The unique key idenitifer of Assembly to update status
74 * @throws InvalidSessionException if user has no valid session on server-side
75 * @throws RemoteException if an exception occurs during the remote conversation
76 */
77 public abstract void setAssemblyStatus(String token, String statusKey, String assemblyKey) throws InvalidSessionException, RemoteException;
78
79 /**
80 * Retrieve the status of a specified <code>Deployment</code>.
81 * @param token Authentication token provided earlier by login() method
82 * @param deploymentId The unique identifier of Deployment to retrieve status for
83 * @return A {@link RemoteStatus} corresponding to status of deployment identified by <b>deploymentId</b>
84 * @throws InvalidSessionException if user has no valid session on server-side
85 * @throws RemoteException if an exception occurs during the remote conversation
86 */
87 public RemoteStatus getDeploymentStatus(String token, long deploymentId) throws InvalidSessionException, RemoteException;
88
89 /**
90 * Set the specified status to a specified <code>Deployment</code>.
91 * @param token Authentication token provided earlier by login() method
92 * @param statusKey Unique key idenitifer of the status to set to deployment
93 * @param deploymentId The unique identifier of Deployment to retrieve status for
94 * @throws InvalidSessionException if user has no valid session on server-side
95 * @throws RemoteException if an exception occurs during the remote conversation
96 */
97 public abstract void setDeploymentStatus(String token, String statusKey, long deploymentId) throws InvalidSessionException, RemoteException;
98 }