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.InvalidParameterException;
18 import org.figure8.join.services.remoting.beans.RemoteMessage;
19 import org.figure8.join.services.remoting.beans.RemoteMailingList;
20 import org.figure8.join.services.remoting.beans.RemoteSubscriber;
21
22 import java.rmi.RemoteException;
23 /**
24 * Remote service interface definition. This service allows to interact with
25 * reporting related services of Join system such as informational messages
26 * creation and mailing list infos retrieval.
27 *
28 * @author <a href="mailto:laurent.broudoux@free.fr">Laurent Broudoux</a>
29 * @version $Revision: 1.1 $
30 */
31 public interface ReportingService extends AuthenticatedService{
32
33
34
35 /**
36 * Create an informational message within Join system. This message will be
37 * visible through home page 'news' box and RSS feeds until its expiry date.
38 * This method requires authentication and 'joiner' role.
39 * @param token Authentication token provided earlier by login() method
40 * @param message The lightweight bean representing message to create
41 * @throws InvalidParameterException if message is not complete for being created
42 * @throws InvalidSessionException if user has no valid session on server-side
43 * @throws RemoteException if an exception occurs during the remote conversation
44 */
45 public abstract void createMessage(String token, RemoteMessage message)
46 throws InvalidParameterException, InvalidSessionException, RemoteException;
47
48 /**
49 * Retrieve the mailing list corresponding to an event for a specified resource.
50 * It returns null if no corresponding mailing list exists. This method requires
51 * authentication.
52 * @param eventKey The unique business key of event to get mailing list for
53 * @param resourceId The identifier of resource concerned by event
54 * @return A lightweight bean representing searched mailing list.
55 * @throws RemoteException if an exception occurs during the remote conversation
56 */
57 public abstract RemoteMailingList getMailingList(String eventKey, String resourceId) throws RemoteException;
58
59 /**
60 * Retrieve a list of mailing lists corresponding to an event (for different resources)
61 * Returns null if no match. This method requires authentication.
62 * @param eventKey The unique business key of event to get mailing list for
63 * @return An array of lightweight beans representing mailing lists
64 * @throws RemoteException if an exception occurs during the remote conversation
65 */
66 public abstract RemoteMailingList[] getMailingLists(String eventKey) throws RemoteException;
67
68 /**
69 * Retrieve a list of subscribers corresponding to a given mailing list. Returns null if no subscribers.
70 * @param mailingList The mailing list to retrieve subsribers for
71 * @return An array of lightweight beans representing subscribers of mailing list
72 * @throws RemoteException if an exception occurs during the remote conversation
73 */
74 public abstract RemoteSubscriber[] getSubscribers(RemoteMailingList mailingList) throws RemoteException;
75 }
76