Package com.iizix.js
Class JSFiles
- java.lang.Object
- com.iizix.js.JSFiles
public class JSFiles extends java.lang.Object
Main class for the iiziGo Designer JavaScript plug-in used to hold the file required for browser and JavaScript on disk outside of Jar plug-in files to be accessed directly as file:/ or http[s]:// URI's.- Author:
- Christopher Mindus
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DOJO_ROOT
The Dojo root file or system setting "dojo.root".static java.lang.String
IIZI_RUN_CUSTOM_ROOT
The iiziRun Customer root directory "iiziRunCustom.root".static java.lang.String
IIZI_RUN_DEVEL_ROOT
The iiziRun Developer root directory "iiziRunDevel.root".static java.lang.String
JQUERY_FILE
The JQuery file or system setting "jquery.file".static java.lang.String
PLUGIN_ID
The plug-in ID.static java.lang.String
ROOT
The root directory "root".
Constructor Summary
Constructors Constructor Description JSFiles()
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.io.File
getDojoRoot()
Gets the Dojo root directory.static java.io.File
getFile(java.lang.String name)
Gets the file location on disk of a specific file name or system setting.static java.lang.String
getFileUrl(java.lang.String name)
Gets the file location in root disk of a specific file.static java.io.File
getJQueryFile()
Gets the JQuery file.static java.lang.String
getReplacementsFile(java.lang.String fileInRoot, java.lang.String... replacements)
Gets a cached file from disk and processes replacements.static java.io.File
getRoot(java.io.File dirHint)
Gets the file location on disk of the root directory.static java.util.List<java.lang.String>
getRootFiles()
Gets root directory and all files required for the web server.static void
setFileLocator(IGenericFileLocator newFileLocator)
Assigns a new file locator, to be used for iiziGo Designer.
Field Detail
PLUGIN_ID
public static final java.lang.String PLUGIN_ID
The plug-in ID.- See Also:
- Constant Field Values
ROOT
public static final java.lang.String ROOT
The root directory "root".- See Also:
- Constant Field Values
DOJO_ROOT
public static final java.lang.String DOJO_ROOT
The Dojo root file or system setting "dojo.root".- See Also:
- Constant Field Values
JQUERY_FILE
public static final java.lang.String JQUERY_FILE
The JQuery file or system setting "jquery.file".- See Also:
- Constant Field Values
IIZI_RUN_DEVEL_ROOT
public static final java.lang.String IIZI_RUN_DEVEL_ROOT
The iiziRun Developer root directory "iiziRunDevel.root".- See Also:
- Constant Field Values
IIZI_RUN_CUSTOM_ROOT
public static final java.lang.String IIZI_RUN_CUSTOM_ROOT
The iiziRun Customer root directory "iiziRunCustom.root".- See Also:
- Constant Field Values
Method Detail
getRootFiles
public static java.util.List<java.lang.String> getRootFiles()
Gets root directory and all files required for the web server.- Returns:
- An immutable list of file names.
setFileLocator
public static void setFileLocator(IGenericFileLocator newFileLocator)
Assigns a new file locator, to be used for iiziGo Designer.- Parameters:
newFileLocator
- The new file locator for Eclipse IDE URL bundle resolving to File.
getRoot
public static java.io.File getRoot(java.io.File dirHint)
Gets the file location on disk of the root directory.- Parameters:
dirHint
- The directory hint might be non-null. If so, that one should be used.
getFile
public static java.io.File getFile(java.lang.String name)
Gets the file location on disk of a specific file name or system setting.
getFileUrl
public static java.lang.String getFileUrl(java.lang.String name)
Gets the file location in root disk of a specific file.
getDojoRoot
public static java.io.File getDojoRoot()
Gets the Dojo root directory.- Returns:
- The Dojo Root directory.
getJQueryFile
public static java.io.File getJQueryFile()
Gets the JQuery file.- Returns:
- The file of the jQuery Jar.
getReplacementsFile
public static java.lang.String getReplacementsFile(java.lang.String fileInRoot, java.lang.String... replacements) throws java.io.IOException
Gets a cached file from disk and processes replacements.Replacements are processed as all text between to replacement strings, e.g. "%REPL%" or "".
- Parameters:
fileInRoot
- The file in the root to load (and cache).replacements
- The list of pairs for the replacements.- Throws:
java.io.IOException