1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 package com
.sun
.star
.report
;
29 import java
.io
.IOException
;
32 * This allows some simple job control. A job can be interrupted (or if it has
33 * not yet been started, canceled), and the job status can be queried (scheduled,
38 * <th>JobStatus</th><th>running</th><th>finished</th>
41 * <td>Scheduled</td><td>false</td><td>false</td>
44 * <td>Running</td><td>true</td><td>false</td>
47 * <td>Finished</td><td>false</td><td>true</td>
51 * @author Thomas Morgner
53 public interface ReportJob
57 * Although we might want to run the job as soon as it has been
58 * created, sometimes it is wiser to let the user add some listeners
59 * first. If we execute at once, the user either has to deal with
60 * threading code or wont receive any progress information in single
61 * threaded environments.
62 * @throws java.io.IOException
63 * @throws ReportExecutionException
66 throws ReportExecutionException
, IOException
;
74 * Queries the jobs execution status.
76 * @return true, if the job is currently running, false otherwise.
81 * Queries the jobs result status.
83 * @return true, if the job is finished (or has been interrupted), false
84 * if the job waits for activation.
88 void addProgressIndicator(JobProgressIndicator indicator
);
90 void removeProgressIndicator(JobProgressIndicator indicator
);