Class DeploymentConfiguration

java.lang.Object
net.sourceforge.jnlp.config.DeploymentConfiguration

public final class DeploymentConfiguration extends Object
Manages the various properties and configuration related to deployment. See: http://download.oracle.com/javase/1.5.0/docs/guide/deployment/deployment-guide/properties.html
  • Field Details

  • Constructor Details

    • DeploymentConfiguration

      public DeploymentConfiguration()
    • DeploymentConfiguration

      public DeploymentConfiguration(InfrastructureFileDescriptor configFile)
  • Method Details

    • setLoadingException

      public void setLoadingException(ConfigurationException ex)
    • getLoadingException

      public ConfigurationException getLoadingException()
    • resetToDefaults

      public void resetToDefaults()
    • load

      public void load() throws ConfigurationException
      Initialize this deployment configuration by reading configuration files. Generally, it will try to continue and ignore errors it finds (such as file not found).
      Throws:
      ConfigurationException - if it encounters a fatal error.
    • load

      public void load(boolean fixIssues) throws ConfigurationException, MalformedURLException
      Initialize this deployment configuration by reading configuration files. Generally, it will try to continue and ignore errors it finds (such as file not found).
      Parameters:
      fixIssues - If true, fix issues that are discovered when reading configuration by resorting to the default values
      Throws:
      ConfigurationException - if it encounters a fatal error.
      MalformedURLException
    • copyTo

      public void copyTo(Properties target)
      Copies the current configuration into the target
      Parameters:
      target - properties where to copy actual ones
    • getProperty

      public String getProperty(String key)
      Get the value for the given key
      Parameters:
      key - the property key
      Returns:
      the value for the key, or null if it can not be found
    • getAllPropertyNames

      public Set<String> getAllPropertyNames()
      Returns:
      a Set containing all the property names
    • getRaw

      public Map<String,Setting<String>> getRaw()
      Returns:
      a map containing property names and the corresponding settings
    • setProperty

      public void setProperty(String key, String value)
      Sets the value of corresponding to the key. If the value has been marked as locked, it is not changed
      Parameters:
      key - the key
      value - the value to be associated with the key
    • checkAndFixConfiguration

      public void checkAndFixConfiguration(Map<String,Setting<String>> initial)
      Check that the configuration is valid. If there are invalid values,set those values to the default values. This is done by using check() method of the ValueCheker for each setting on the actual value. Fixes are made in-place.
      Parameters:
      initial - a map representing the initial configuration
    • save

      public void save() throws IOException
      Saves all properties that are not part of default or system properties
      Throws:
      IOException - if unable to save the file
      IllegalStateException - if save() is called before load()
    • move14AndOlderFilesTo15StructureCatched

      public static void move14AndOlderFilesTo15StructureCatched()