gvsig-scripting / trunk / org.gvsig.scripting / org.gvsig.scripting.lib / org.gvsig.scripting.lib.api / src / main / java / org / gvsig / scripting / ScriptingHelpManager.java @ 172
History | View | Annotate | Download (3.42 KB)
1 |
package org.gvsig.scripting; |
---|---|
2 |
|
3 |
import java.io.File; |
4 |
import java.net.URL; |
5 |
import java.util.Iterator; |
6 |
import java.util.List; |
7 |
import java.util.Map; |
8 |
|
9 |
import javax.help.HelpSet; |
10 |
|
11 |
/**
|
12 |
* This class is responsable of the management of the Help services provided to the application.
|
13 |
* It shows all the methods applied to the JavaDocs imported on the ScriptingFramework
|
14 |
*
|
15 |
* @see ScriptingManager
|
16 |
*/
|
17 |
public interface ScriptingHelpManager { |
18 |
|
19 |
/**
|
20 |
* Interface that represents each JavaDoc imported to the application
|
21 |
*
|
22 |
*/
|
23 |
public interface ScriptingHelpAPI{ |
24 |
/**
|
25 |
* Gets the JavaDoc's identificator
|
26 |
*
|
27 |
* @return a String with the name of the JavaDoc imported identificator
|
28 |
*/
|
29 |
public String getName(); |
30 |
} |
31 |
|
32 |
/**
|
33 |
* Interface that represents a class contained on the JavaDocs
|
34 |
*
|
35 |
*/
|
36 |
public interface ScriptingHelpClass{ |
37 |
/**
|
38 |
* Gets the name of the class
|
39 |
*
|
40 |
* @return a String with the Class' name
|
41 |
*/
|
42 |
public String getName(); |
43 |
|
44 |
/**
|
45 |
* Gets the URL of the resource that contains the JavaDoc of this class
|
46 |
*
|
47 |
* @return a String with the URL.
|
48 |
*/
|
49 |
public String getUrl(); |
50 |
} |
51 |
|
52 |
/**
|
53 |
* Interface that represents a method implemented by a class of the JavaDoc
|
54 |
*
|
55 |
*/
|
56 |
public interface ScriptingHelpMethod extends Iterable{ |
57 |
/**
|
58 |
* Gets the method's name
|
59 |
*
|
60 |
* @return a String with the method's name
|
61 |
*/
|
62 |
public String getName(); |
63 |
|
64 |
/**
|
65 |
* Gets an Iterator of the {@link ScriptingHelpClass}es which implements that method
|
66 |
*
|
67 |
*/
|
68 |
public Iterator<ScriptingHelpClass> iterator(); |
69 |
|
70 |
} |
71 |
|
72 |
/**
|
73 |
* Returns the directory of the Help's content
|
74 |
*
|
75 |
* @return a File with the Help's Folder
|
76 |
*/
|
77 |
public File getFolder(); |
78 |
|
79 |
/**
|
80 |
* Gets a List of the JavaDocs imported
|
81 |
*
|
82 |
* @return a List of the {@link ScriptingHelpAPI}s imported in the application
|
83 |
*/
|
84 |
public List<ScriptingHelpAPI> getAPI(); |
85 |
|
86 |
/**
|
87 |
* Gets a List of all the {@link ScriptingHelpMethod}s contained on the JavaDocs
|
88 |
*
|
89 |
* @return a List of the {@link ScriptingHelpMethod}s on all the {@link ScriptingHelpAPI}s imported
|
90 |
*/
|
91 |
public List<ScriptingHelpMethod> getMethods(); |
92 |
|
93 |
/**
|
94 |
* Gets the methods of all the classes includes on the JavaDocs which matches with the text provided
|
95 |
*
|
96 |
* @param a text String with the text to get the methods that contains it
|
97 |
*
|
98 |
* @return a HashMap with the references founded
|
99 |
*
|
100 |
*/
|
101 |
public Map<String,ScriptingHelpMethod> findMethods(String text); |
102 |
|
103 |
/**
|
104 |
* Returns the HelpSet with the Help information of the JavaDocs registered
|
105 |
*
|
106 |
* @return a HelpSet with the Help content
|
107 |
*/
|
108 |
public HelpSet getHelpSet();
|
109 |
|
110 |
/**
|
111 |
* Reloads the Help information of the JavaDocs
|
112 |
*
|
113 |
*/
|
114 |
public void reloadHelp(); |
115 |
|
116 |
/**
|
117 |
* Removes a help module from the application's helpset
|
118 |
*
|
119 |
* @param name String with the identificator of the module help to remove
|
120 |
*
|
121 |
*/
|
122 |
public void removeHelp(String name); |
123 |
|
124 |
/**
|
125 |
* Checks if exists a help module from the application's helpset with the same identificator
|
126 |
*
|
127 |
* @param name String with the identificator of the module help to check
|
128 |
*
|
129 |
* @return true if exists, false if not
|
130 |
*
|
131 |
*/
|
132 |
public boolean existsHelp(String name); |
133 |
|
134 |
/**
|
135 |
* Adds a new help module to the application's helpset with the identificator specified
|
136 |
*
|
137 |
* @param name String with the identificator of the module help to add
|
138 |
* @param url URL with the root directory of the help to import
|
139 |
*
|
140 |
* @return true if exists, false if not
|
141 |
*
|
142 |
*/
|
143 |
public void importHelp(String name, URL url); |
144 |
|
145 |
} |