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.core.DuplicateEntityException;
18 import org.figure8.join.core.InvalidParameterException;
19 import org.figure8.join.services.remoting.beans.RemoteRelease;
20 import org.figure8.join.services.remoting.beans.RemoteComponent;
21 import org.figure8.join.services.remoting.beans.RemoteDeliverable;
22 import org.figure8.join.services.remoting.beans.RemoteDeliverableType;
23
24 import java.io.File;
25 import java.rmi.RemoteException;
26 /**
27 * Remote service interface definition. This service allows to interact
28 * with project artifacts managed by the Join application. All this service
29 * requires authentication through the usage of the <code>login()</code>
30 * method. The security token returned by this method should then be used
31 * as a parameter of every service call.
32 *
33 * @author <a href="mailto:laurent.broudoux@free.fr">Laurent Broudoux</a>
34 * @version $Revision: 1.2 $
35 */
36 public interface ArtifactService extends AuthenticatedService{
37
38
39
40 /**
41 * Retrieve all the releases managed within the project.
42 * @param token Authentication token provided earlier by login() method
43 * @return An array of {@link RemoteRelease} objects
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 RemoteRelease[] getReleases(String token)
48 throws InvalidSessionException, RemoteException;
49
50 /**
51 * Retrieve all the deliverable categories (or types) managed within the project.
52 * @param token Authentication token provided earlier by login() method
53 * @return An array of {@link RemoteDeliverableType} objects
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 RemoteDeliverableType[] getDeliverableTypes(String token)
58 throws InvalidSessionException, RemoteException;
59
60 /**
61 * Get the deliverable categories where authenticated user can supply deliverables for.
62 * @param token Authentication token provided earlier by login() method
63 * @return An array of authorized {@link RemoteDeliverableType} objects for deliverables supplying
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 RemoteDeliverableType[] getDeliverableTypesForDelivery(String token)
68 throws InvalidSessionException, RemoteException;
69
70 /**
71 * Supply a new deliverable using the remote wrapper. This wrapper must contains
72 * release and type informations. This delivery may include a File object as deliverable
73 * content if deliverables from this type are not retrieved using direct VCS or SCM connection.
74 * @param token Authentication token provided earlier by login() method
75 * @param deliverable The remote wrapper for deliverable to create into Join
76 * @param content The deliverable content if not VCS dleiverable
77 * @throws InvalidParameterException if deliverable is already registered or parameter is missing
78 * @throws DuplicateEntityException if another deliverable with same key already exists
79 * @throws InvalidSessionException if user has no valid session on server-side
80 * @throws RemoteException if an exception occurs during the remote conversation
81 */
82 public abstract void supplyDeliverable(String token, RemoteDeliverable deliverable, File content)
83 throws InvalidParameterException, DuplicateEntityException, InvalidSessionException, RemoteException;
84
85 /**
86 * Bind a component to a given assembly.
87 * @param token Authentication token provided earlier by login() method
88 * @param component The remote wrapper for component to bind to assembly/build
89 * @param assemblyKey The key of assembly to bind component to
90 * @throws InvalidParameterException if parameter is missing
91 * @throws InvalidSessionException if user has no valid session on server-side
92 * @throws RemoteException if an exception occurs during the remote conversation
93 */
94 public abstract void bindComponent(String token, RemoteComponent component, String assemblyKey)
95 throws InvalidParameterException, InvalidSessionException, RemoteException;
96 }