Class Application


  • public class Application
    extends java.lang.Object
    The application entity in the deploy hierarchy.
    • Constructor Summary

      Constructors 
      Constructor Description
      Application​(org.dom4j.Element subTreeRoot, XmlStructure parentSettings, Parameters param, java.lang.String targetEncoding)
      A application is the program to be run on a machine.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void createSettingsFile​(java.io.File directory)
      Creates the settings file for this application.
      java.lang.String getIdentification()
      Uses the name and the optional applicationId to create an unique identification for this application.
      Parameters getMachineParameters()
      For acquiring the machine parameter variable.
      XmlStructure getSettings()
      Returns the settings XML subtree for the application.
      java.lang.String[] getSettingsValues​(java.lang.String[] path)
      For acquiring all the values of the leafs at the end of the path.
      java.lang.String getTotalName()  
      java.lang.String installPathLinux()
      Makes the install path with linux syntax.
      java.lang.String installPathWindows()
      Makes the install path with windows syntax.
      boolean isBundledHarvester()
      Detects whether this is a Harvester app, which requires a harvester bundle to be deployed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Application

        public Application​(org.dom4j.Element subTreeRoot,
                           XmlStructure parentSettings,
                           Parameters param,
                           java.lang.String targetEncoding)
        A application is the program to be run on a machine.
        Parameters:
        subTreeRoot - The root of this instance in the XML document.
        parentSettings - The setting inherited by the parent.
        param - The machine parameters inherited by the parent.
        targetEncoding - the encoding to use when writing files.
    • Method Detail

      • getIdentification

        public java.lang.String getIdentification()
        Uses the name and the optional applicationId to create an unique identification for this application.
        Returns:
        The unique identification of this application.
      • getTotalName

        public java.lang.String getTotalName()
        Returns:
        the total name with directory path.
      • createSettingsFile

        public void createSettingsFile​(java.io.File directory)
        Creates the settings file for this application. This is extracted from the XMLStructure and put into a specific file. The name of the settings file for this application is: "settings_" + identification + ".xml".
        Parameters:
        directory - The directory where the settings file should be placed.
      • installPathLinux

        public java.lang.String installPathLinux()
        Makes the install path with linux syntax.
        Returns:
        The path in linux syntax.
      • installPathWindows

        public java.lang.String installPathWindows()
        Makes the install path with windows syntax.
        Returns:
        The path with windows syntax.
      • getMachineParameters

        public Parameters getMachineParameters()
        For acquiring the machine parameter variable.
        Returns:
        The machine parameter variable.
      • getSettingsValues

        public java.lang.String[] getSettingsValues​(java.lang.String[] path)
        For acquiring all the values of the leafs at the end of the path.
        Parameters:
        path - The path to the branches.
        Returns:
        The values of the leafs. If no values were found, then an empty collection of strings are returned.
      • getSettings

        public XmlStructure getSettings()
        Returns the settings XML subtree for the application.
        Returns:
        the settings XML subtree for the application
      • isBundledHarvester

        public boolean isBundledHarvester()
        Detects whether this is a Harvester app, which requires a harvester bundle to be deployed.
        Returns:
        true if the is a harvester requiring a harvester bundle, else false.