gvsig-tools / org.gvsig.tools / library / trunk / org.gvsig.tools / org.gvsig.tools.lib / src / main / java / org / gvsig / tools / task / TaskStatus.java @ 2631
History | View | Annotate | Download (2.83 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2013 gvSIG Association.
|
5 |
*
|
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 |
* For any additional information, do not hesitate to contact us
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
23 |
*/
|
24 |
package org.gvsig.tools.task; |
25 |
|
26 |
import java.util.Date; |
27 |
|
28 |
import org.gvsig.tools.observer.Observable; |
29 |
|
30 |
|
31 |
/**
|
32 |
* @author gvSIG Team
|
33 |
* @version $Id$
|
34 |
*
|
35 |
*/
|
36 |
public interface TaskStatus extends CancellableTask, Observable { |
37 |
|
38 |
/**
|
39 |
* Get the title associated to the task of this TaskStatus
|
40 |
*
|
41 |
* @return the task title
|
42 |
*/
|
43 |
public String getTitle(); |
44 |
|
45 |
/**
|
46 |
* Gte the code of this TaskStatus.
|
47 |
*
|
48 |
* @return code of task
|
49 |
*/
|
50 |
public String getCode(); |
51 |
|
52 |
/**
|
53 |
* Retorna el porcentaje de completitud de la tarea asociada
|
54 |
* a este TaskStatus.
|
55 |
*
|
56 |
* @return el porcentaje de completitud.
|
57 |
*/
|
58 |
public int getCompleted(); |
59 |
|
60 |
/**
|
61 |
* Get a label that represent the status of the task
|
62 |
*
|
63 |
* @return
|
64 |
*/
|
65 |
public String getLabel(); |
66 |
|
67 |
public String getProgressLabel(); |
68 |
|
69 |
public String getMessage(); |
70 |
/**
|
71 |
* Return true if the task has cancelled by the
|
72 |
* user or another task.
|
73 |
*
|
74 |
* @return
|
75 |
*/
|
76 |
public boolean isCancelled(); |
77 |
|
78 |
/**
|
79 |
* Return true if the task has terminated with errors.
|
80 |
*
|
81 |
* @return
|
82 |
*/
|
83 |
public boolean isAborted(); |
84 |
|
85 |
/**
|
86 |
* Return true if the task is running.
|
87 |
*
|
88 |
* @return
|
89 |
*/
|
90 |
public boolean isRunning(); |
91 |
|
92 |
/**
|
93 |
* Returns date of last modificaction of status.
|
94 |
*
|
95 |
* @return
|
96 |
*/
|
97 |
public Date getLastModification(); |
98 |
|
99 |
/**
|
100 |
* Return the TaskStatusManager associated to this TaskStatus.
|
101 |
*
|
102 |
* @return the TaskStatusManager
|
103 |
*/
|
104 |
public TaskStatusManager getManager();
|
105 |
|
106 |
/**
|
107 |
* Return true if the completion of this task
|
108 |
* can't calculate.
|
109 |
*
|
110 |
* @return
|
111 |
*/
|
112 |
public boolean isIndeterminate(); |
113 |
|
114 |
/**
|
115 |
* Return true if the task associated to this
|
116 |
* TaskStatus can be canceled.
|
117 |
* @return
|
118 |
*/
|
119 |
public boolean isCancellable(); |
120 |
|
121 |
} |