Package com.iizix.js

Class JSFiles


  • public class JSFiles
    extends java.lang.Object
    Main class for the iizi 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.
      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 getJQueryRoot()
      Gets the JQuery root.
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
    • Constructor Detail

      • JSFiles

        public JSFiles()
    • 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.
      • getJQueryRoot

        public static java.io.File getJQueryRoot()
        Gets the JQuery root.
      • 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