Package org.apache.tools.ant.taskdefs.modules

## Class Link.ReleaseInfoEntry

- java.lang.Object
- - org.apache.tools.ant.taskdefs.modules.Link.ReleaseInfoEntry

- Enclosing class:
    Link

      public class Link.ReleaseInfoEntry
      extends java.lang.Object

  Grandchild element describing additional release info properties for a linked image. To be valid, an instance must have either a non-null key and value, or a non-null file.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ReleaseInfoEntry()` | Creates a new, unconfigured element.
    `ReleaseInfoEntry​(java.lang.String key, java.lang.String value)` | Creates a new element which specifies a single additional property.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `getCharset()` | Attribute containing the character set of this object's file.
    `java.io.File` | `getFile()` | Attribute containing a Java properties file which contains additional release info properties.
    `java.lang.String` | `getKey()` | Attribute containing the key of this element's additional property.
    `java.lang.String` | `getValue()` | Attribute containing the value of this element's additional property.
    `void` | `setCharset​(java.lang.String charset)` | Sets attribute containing the character set of this object's file.
    `void` | `setFile​(java.io.File file)` | Sets attribute containing a Java properties file which contains additional release info properties.
    `void` | `setKey​(java.lang.String key)` | Sets attribute containing the key of this element's additional property.
    `void` | `setValue​(java.lang.String value)` | Sets attributes containing the value of this element's additional property.
    `java.util.Properties` | `toProperties()` | Converts this element to a Java properties object containing the additional properties this element represents.
    `void` | `validate()` | Verifies the state of this element.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ReleaseInfoEntry

          public ReleaseInfoEntry()

      Creates a new, unconfigured element.

    - #### ReleaseInfoEntry

          public ReleaseInfoEntry​(java.lang.String key,
                                  java.lang.String value)

      Creates a new element which specifies a single additional property.
      Parameters:
        `key` - new property's key
        `value` - new property's value

  - ### Method Detail

    - #### getKey

          public java.lang.String getKey()

      Attribute containing the key of this element's additional property.
      Returns:
        additional property's key
      See Also:
        `getValue()`

    - #### setKey

          public void setKey​(java.lang.String key)

      Sets attribute containing the key of this element's additional property.
      Parameters:
        `key` - additional property's key
      See Also:
        `setValue(String)`

    - #### getValue

          public java.lang.String getValue()

      Attribute containing the value of this element's additional property.
      Returns:
        additional property's value
      See Also:
        `getKey()`

    - #### setValue

          public void setValue​(java.lang.String value)

      Sets attributes containing the value of this element's additional property.
      Parameters:
        `value` - additional property's value
      See Also:
        `setKey(String)`

    - #### getFile

          public java.io.File getFile()

      Attribute containing a Java properties file which contains additional release info properties. This is exclusive with respect to the key and value of this instance: either the file must be set, or the key and value must be set.
      Returns:
        this element's properties file

    - #### setFile

          public void setFile​(java.io.File file)

      Sets attribute containing a Java properties file which contains additional release info properties. This is exclusive with respect to the key and value of this instance: either the file must be set, or the key and value must be set.
      Parameters:
        `file` - this element's properties file

    - #### getCharset

          public java.lang.String getCharset()

      Attribute containing the character set of this object's file. This is `ISO_8859_1` by default, in accordance with the java.util.Properties default.
      Returns:
        character set of this element's file

    - #### setCharset

          public void setCharset​(java.lang.String charset)

      Sets attribute containing the character set of this object's file. If not set, this is `ISO_8859_1` by default, in accordance with the java.util.Properties default.
      Parameters:
        `charset` - character set of this element's file

    - #### validate

          public void validate()

      Verifies the state of this element.
      Throws:
        `BuildException` - if file is set, and key and/or value are set
        `BuildException` - if file is not set, and key and value are not both set
        `BuildException` - if charset is not a valid Java Charset name

    - #### toProperties

          public java.util.Properties toProperties()

      Converts this element to a Java properties object containing the additional properties this element represents. If this element's file is set, it is read; otherwise, a Properties object containing just one property, consisting of this element's key and value, is returned.
      Returns:
        new Properties object obtained from this element's file or its key and value
      Throws:
        `BuildException` - if file is set, but cannot be read