Package org.gvsig.scripting
Interface ScriptingManager
- All Superinterfaces:
org.gvsig.tools.script.ScriptManager
public interface ScriptingManager
extends org.gvsig.tools.script.ScriptManager
There are two top level management roles within ScriptingFramework: logical
and User's Interface (UI) management.
This class is responsible of the logical role. It provides all the services
to manage the information used in ScriptingFramework.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlternativeUserFolder(File f, String name, String description) voidaddLibFolder(File lib) createLink(String name, File link, String targetPathName) createLink(String name, ScriptingFolder link, String targetPathName) createUnit(String unitType, ScriptingFolder folder, String id) createUnit(String unitType, ScriptingFolder folder, String id, String language) Retrieves a value set in the state of this ScriptingManagergetDataFolder(String id) getEngineNameByLanguage(String langName) Returns a hash map with all new properties associated to this layer.getExtensionOfLanguage(String language) Returns theScriptingFolderassociated with the file specifiedorg.gvsig.tools.service.spi.ProviderFactoryReturn a map with the label and suffix of the library versions.Devuelbe la carpeta en la que se encuentran los paquetes de la aplicacion.getProperty(Object key) Returns a reference to an object (property) associated to this layer.Returns theScriptingBaseScriptassociated with the file specifiedReturns the System's FolderReturn theScriptingUnitassociated with the path specified.Returns the User's FoldervoidSearch the available engines and initialize the manager.voidSets a key/value pair in the state of the ScriptingManager that may either create a Java Language Binding to be used in the execution of scriptsvoidregisterDataFolder(ScriptingFolder folderScript, String id) voidregisterSystemFolder(String name, File folder) Registers a File System withScriptingUnits in the SystemFoldersearchOldVersions(org.gvsig.tools.packageutils.Version currentVersion, org.gvsig.tools.util.FolderSet folder) voidsetHomeFolder(File home) voidsetPackagesFolder(File folder) Establece la carpeta en la que se encuentran los paquetes de la aplicacion.voidsetProperty(Object key, Object obj) Inserts an object as a property to this layer.booleanvalidateUnitId(ScriptingFolder folder, String id) Checks if an id is unique in a determinate folderMethods inherited from interface org.gvsig.tools.script.ScriptManager
createEvaluator, createScript, loadScript, loadScript, locateScript
-
Field Details
-
INSTALLER_PROVIDER_NAME
- See Also:
-
INSTALLER_PROVIDER_DESCRIPTION
- See Also:
-
PYTHON_LANGUAGE_NAME
- See Also:
-
DEFAULT_ISOLATION_GROUP
- See Also:
-
UNIT_SCRIPT
- See Also:
-
UNIT_DIALOG
- See Also:
-
UNIT_FOLDER
- See Also:
-
UNIT_EXTERNALFILE
- See Also:
-
-
Method Details
-
setHomeFolder
-
getHomeFolder
File getHomeFolder() -
getDataFolder
-
registerDataFolder
-
searchOldVersions
List<DataFolderFound> searchOldVersions(org.gvsig.tools.packageutils.Version currentVersion, org.gvsig.tools.util.FolderSet folder) -
getSystemFolder
ScriptingFolder getSystemFolder()Returns the System's Folder- Returns:
- a
ScriptingFolderwith the System's Folder.
-
getUserFolder
ScriptingFolder getUserFolder()Returns the User's Folder- Returns:
- a
ScriptingFolderwith the User's Folder.
-
getAlternativeUserFolders
List<ScriptingFolder> getAlternativeUserFolders() -
addAlternativeUserFolder
-
createUnit
-
createUnit
-
getUnitTypes
-
getScript
Returns theScriptingBaseScriptassociated with the file specified- Parameters:
file- File where is contained theScriptingBaseScript's information- Returns:
ScriptingBaseScript
-
getScript
-
getFolder
Returns theScriptingFolderassociated with the file specified- Parameters:
file- File where is contained theScriptingFolder's information- Returns:
ScriptingFolder
-
getUnit
Return theScriptingUnitassociated with the path specified. the path should start with "User" or "System".- Parameters:
pathName-- Returns:
- the required
ScriptingUnit
-
registerSystemFolder
Registers a File System withScriptingUnits in the SystemFolder- Parameters:
name- String with the identificator name of the File System registeredfolder- File with the root of the File System to register
-
getSupportedLanguages
-
getExtensionOfLanguage
-
getEngineNameByLanguage
-
getEnginesIsolationGroups
-
validateUnitId
Checks if an id is unique in a determinate folder- Parameters:
folder- {id- String with the id to validate- Returns:
- true if there isn't another
ScriptingUnitwith the same id, and false in the other case
-
put
Sets a key/value pair in the state of the ScriptingManager that may either create a Java Language Binding to be used in the execution of scripts- Parameters:
key- The name of named value to addvalue- The value of named value to add.
-
get
Retrieves a value set in the state of this ScriptingManager- Parameters:
key- The key whose value is to be returned- Returns:
- an Object with the value corresponding to the key
-
addLibFolder
-
getRootUserFolder
File getRootUserFolder() -
getInstallerFactory
org.gvsig.tools.service.spi.ProviderFactory getInstallerFactory() -
getPackagesFolder
File getPackagesFolder()Devuelbe la carpeta en la que se encuentran los paquetes de la aplicacion.- Returns:
-
setPackagesFolder
Establece la carpeta en la que se encuentran los paquetes de la aplicacion.- Parameters:
folder-
-
loadEngines
void loadEngines()Search the available engines and initialize the manager. -
getLibFolders
-
getLibFoldersVersions
Return a map with the label and suffix of the library versions. For each value of map, the value is the name of the version (a label) and the key is the suffix for that version.- Returns:
- a map with suffix and labels of library versions.
-
getProperty
Returns a reference to an object (property) associated to this layer.
For example, you can attach a network definition to key "network" and check if a layer has a network loaded using getAssociatedObject("network") and that it's not null.
- Parameters:
key- the key associated to the property- Returns:
nullif key is not found- See Also:
-
setProperty
Inserts an object as a property to this layer.- Parameters:
key- the key associated to the propertyobj- the property- See Also:
-
getExtendedProperties
Map getExtendedProperties()Returns a hash map with all new properties associated to this layer.- Returns:
- hash table with the added properties
- See Also:
-
createLink
-
createLink
-