svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.plugin / org.gvsig.app / org.gvsig.app.mainplugin / src / main / java / org / gvsig / app / project / documents / DocumentAction.java @ 47799
History | View | Annotate | Download (2.56 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 3
|
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.app.project.documents; |
25 |
|
26 |
import java.util.List; |
27 |
|
28 |
import org.gvsig.tools.extensionpoint.ExtensionSingleton; |
29 |
|
30 |
|
31 |
/**
|
32 |
* Interface que deben den cumplir las acciones asociadas
|
33 |
* a un documento
|
34 |
* <br>
|
35 |
* Las acciones de un documento se registraran a traves
|
36 |
* del metodo registerDocumentAction del ProjectFactory
|
37 |
* <br><br>
|
38 |
* Por lo general extender de la clase AbstractDocumentAction
|
39 |
*
|
40 |
*
|
41 |
*
|
42 |
*/
|
43 |
|
44 |
public interface DocumentAction extends ExtensionSingleton { |
45 |
|
46 |
/**
|
47 |
* Gets the unique identifier for this action.
|
48 |
*
|
49 |
* @return id as String
|
50 |
*/
|
51 |
public String getId(); |
52 |
|
53 |
public boolean isVisible(Document document, List<Document> documents); |
54 |
|
55 |
public boolean isAvailable(Document document, List<Document> documents); |
56 |
|
57 |
/**
|
58 |
*
|
59 |
* @param document Optionally a document with a special role or
|
60 |
* null if there is not a document with a special role
|
61 |
*
|
62 |
* @param documents Documents to manage
|
63 |
*/
|
64 |
public void execute(Document document, List<Document> documents); |
65 |
|
66 |
/**
|
67 |
* Gets the group name for this action.
|
68 |
*
|
69 |
* @return group name as String
|
70 |
*/
|
71 |
public DocumentActionGroup getGroup();
|
72 |
|
73 |
/**
|
74 |
* Representa el orden en el que se presentara la accion entre
|
75 |
* elresto de acciones de este tipo documento alla donde estas se
|
76 |
* presenten.
|
77 |
*
|
78 |
* @return title as String
|
79 |
*/
|
80 |
public int getOrder(); |
81 |
|
82 |
/**
|
83 |
* Returns a phrase with the action title for this document.type.
|
84 |
*
|
85 |
* @return description as String
|
86 |
*/
|
87 |
public String getTitle(); |
88 |
|
89 |
/**
|
90 |
* Returns a paragraph with the action description for this document
|
91 |
* type.
|
92 |
*
|
93 |
* @return description as String
|
94 |
*/
|
95 |
public String getDescription(); |
96 |
|
97 |
} |