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 | 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 | 2631 | jjdelcerro | public String getProgressLabel(); |
68 | |||
69 | 1723 | jjdelcerro | public String getMessage(); |
70 | 445 | jjdelcerro | /**
|
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 | 450 | jjdelcerro | /**
|
100 | * Return the TaskStatusManager associated to this TaskStatus.
|
||
101 | *
|
||
102 | * @return the TaskStatusManager
|
||
103 | */
|
||
104 | 447 | jjdelcerro | public TaskStatusManager getManager();
|
105 | 445 | jjdelcerro | |
106 | 450 | jjdelcerro | /**
|
107 | * Return true if the completion of this task
|
||
108 | * can't calculate.
|
||
109 | *
|
||
110 | * @return
|
||
111 | */
|
||
112 | 447 | jjdelcerro | public boolean isIndeterminate(); |
113 | |||
114 | 450 | jjdelcerro | /**
|
115 | * Return true if the task associated to this
|
||
116 | * TaskStatus can be canceled.
|
||
117 | * @return
|
||
118 | */
|
||
119 | 447 | jjdelcerro | public boolean isCancellable(); |
120 | |||
121 | 445 | jjdelcerro | } |