Statistics
| Revision:

gvsig-tools / org.gvsig.tools / library / trunk / org.gvsig.tools / org.gvsig.tools.lib / src / main / java / org / gvsig / tools / task / TaskStatus.java @ 2497

History | View | Annotate | Download (2.79 KB)

1 802 cordinyana
/**
2
 * gvSIG. Desktop Geographic Information System.
3 445 jjdelcerro
 *
4 802 cordinyana
 * Copyright (C) 2007-2013 gvSIG Association.
5 445 jjdelcerro
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21 802 cordinyana
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23 445 jjdelcerro
 */
24
package org.gvsig.tools.task;
25
26
import java.util.Date;
27
28 447 jjdelcerro
import org.gvsig.tools.observer.Observable;
29 445 jjdelcerro
30 447 jjdelcerro
31 445 jjdelcerro
/**
32
 * @author gvSIG Team
33
 * @version $Id$
34
 *
35
 */
36 447 jjdelcerro
public interface TaskStatus extends CancellableTask, Observable {
37 445 jjdelcerro
38
    /**
39 450 jjdelcerro
     * Get the title associated to the task of this TaskStatus
40 445 jjdelcerro
     *
41 450 jjdelcerro
     * @return the task title
42 445 jjdelcerro
     */
43
    public String getTitle();
44
45
    /**
46 450 jjdelcerro
     * Gte the code of this TaskStatus.
47 445 jjdelcerro
     *
48
     * @return code of task
49
     */
50
    public String getCode();
51
52
    /**
53 450 jjdelcerro
     * Retorna el porcentaje de completitud de la tarea asociada
54
     * a este TaskStatus.
55 445 jjdelcerro
     *
56 450 jjdelcerro
     * @return el porcentaje de completitud.
57 445 jjdelcerro
     */
58
    public int getCompleted();
59
60
    /**
61 450 jjdelcerro
     * Get a label that represent the status of the task
62 445 jjdelcerro
     *
63
     * @return
64
     */
65
    public String getLabel();
66
67 1723 jjdelcerro
    public String getMessage();
68 445 jjdelcerro
    /**
69
     * Return true if the task has cancelled by the
70
     * user or another task.
71
     *
72
     * @return
73
     */
74
    public boolean isCancelled();
75
76
    /**
77
     * Return true if the task has terminated with errors.
78
     *
79
     * @return
80
     */
81
    public boolean isAborted();
82
83
    /**
84
     * Return true if the task is running.
85
     *
86
     * @return
87
     */
88
    public boolean isRunning();
89
90
    /**
91
     * Returns date of last modificaction of status.
92
     *
93
     * @return
94
     */
95
    public Date getLastModification();
96
97 450 jjdelcerro
    /**
98
     * Return the TaskStatusManager associated to this TaskStatus.
99
     *
100
     * @return the TaskStatusManager
101
     */
102 447 jjdelcerro
    public TaskStatusManager getManager();
103 445 jjdelcerro
104 450 jjdelcerro
    /**
105
     * Return true if the completion of this task
106
     * can't calculate.
107
     *
108
     * @return
109
     */
110 447 jjdelcerro
    public boolean isIndeterminate();
111
112 450 jjdelcerro
    /**
113
     * Return true if the task associated to this
114
     * TaskStatus can be canceled.
115
     * @return
116
     */
117 447 jjdelcerro
    public boolean isCancellable();
118
119 445 jjdelcerro
}