dk.netarkivet.deploy
Class Application

java.lang.Object
  extended by dk.netarkivet.deploy.Application

public class Application
extends java.lang.Object

The application entity in the deploy hierarchy.


Constructor Summary
Application(org.dom4j.Element subTreeRoot, XmlStructure parentSettings, Parameters param)
          A application is the program to be run on a machine.
 
Method Summary
 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.
 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.
 
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)
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.
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.