1 /**
2 * Copyright 2005-2007 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.RemoteResourceVersion;
20
21 import java.rmi.RemoteException;
22 /**
23 * Remote service interface definition. This service allows to retrieve
24 * and update informations onto environment resources.
25 * @author <a href="mailto:laurent.broudoux@free.fr">Laurent Broudoux</a>
26 * @version $Revision: 1.1 $
27 */
28 public interface ResourceService extends AuthenticatedService{
29
30
31
32 /**
33 * Create a new resource version for a specified type. This operation
34 * reqires a valid authentication done first and the permissions corresponding
35 * to Joiner security role.
36 * @param token Authentication token provided earlier by login() method
37 * @param version The remote wrapper for resource version to create into Join
38 * @throws InvalidParameterException if one of supplied parameters is invalid
39 * @throws DuplicateEntityException if another resource version with same name already exists
40 * @throws InvalidSessionException if user has no valid session on server-side
41 * @throws RemoteException if an exception occurs during the remote conversation
42 */
43 public abstract void createResourceVersion(String token, RemoteResourceVersion version)
44 throws InvalidParameterException, DuplicateEntityException, InvalidSessionException, RemoteException;
45
46
47 /**
48 * Update an existing resource with an existing reosurce version. Resource and
49 * version are specified using their names that should be unique within Join system.
50 * This operations requires a valid authentication done first and the persmissions
51 * corresponding to Joiner security role.
52 * @param token Authentication token provided earlier by login() method
53 * @param resourceName The unique name of the resource to update
54 * @param versionName The unique name of the version to update resource with
55 * @throws InvalidParameterException if one of supplied parameters is invalid
56 * @throws InvalidSessionException if user has no valid session on server-side
57 * @throws RemoteException if an exception occurs during the remote conversation
58 */
59 public abstract void updateResource(String token, String resourceName, String versionName)
60 throws InvalidParameterException, InvalidSessionException, RemoteException;
61 }