com.microfocus.awm.model.internal

## Class ApplicationPropertyValue

- java.lang.Object
- - com.microfocus.awm.model.internal.PropertyValue
  - - com.microfocus.awm.model.internal.ApplicationPropertyValue

- All Implemented Interfaces:
    IPropertyValue

      public class ApplicationPropertyValue
      extends PropertyValue

  An implementation of `IPropertyValue` for application properties.

  If `IApplicationProperty.isConstant()` is `true`, the value of `ApplicationPropertyValue` can not be changed.

  Author:
    NicolasP

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ApplicationPropertyValue(Property pProperty, java.lang.String pValue, EPropertyValueType pType, IApplicationProperty pApplicationProperty)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addValue(java.lang.String pValue)` Adds a value to the value list.
    `java.lang.String` | `getValue()` Gets the string value.
    `boolean` | `isChanged()` Whether the property value was changed.
    `void` | `setType(EPropertyValueType pType)` This method does nothing, since the type of application properties is not supposed to be changed.
    `void` | `setValue(IExecutionContext pContext, java.lang.String pValue)` Sets the string value.
    `void` | `setValue(java.lang.String pValue)` Sets the actual value.

    - ### Methods inherited from class com.microfocus.awm.model.internal.PropertyValue

      `getLabelOrValue, getProperty, getType, getValues, isArray, toString`

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

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ApplicationPropertyValue

          public ApplicationPropertyValue(Property pProperty,
                                          java.lang.String pValue,
                                          EPropertyValueType pType,
                                          IApplicationProperty pApplicationProperty)

      Parameters:
        `pProperty` - a `Property`. Must not be `null`.
        `pValue` - can be `null` but should be set later by using `setValue(String)`
        `pType` - can be `null` but should be set later by using `setType(EPropertyValueType)`.
        `pApplicationProperty` - the corresponding `IApplicationProperty` instance. Must NOT be `null`.

  - ### Method Detail

    - #### isChanged

          public boolean isChanged()

      Whether the property value was changed.
      Returns:
        `false`, if the value is `null`. Else returns `true`.

    - #### getValue

          public java.lang.String getValue()

      Description copied from interface: `IPropertyValue`
      Gets the string value. Does not support linked properties which require a resource identifier to resolve the value.

      If the property is of the type `ETypes.TEXT_ARRAY` this method returns the values of `IPropertyValue.getValues()` separated by the `Property.getStringDelimiterWithoutQuotes()` as string.

      Specified by:
        `getValue` in interface `IPropertyValue`
      Overrides:
        `getValue` in class `PropertyValue`
      Returns:
        the string value

    - #### setValue

          public void setValue(IExecutionContext pContext,
                               java.lang.String pValue)

      Description copied from interface: `IPropertyValue`
      Sets the string value. Is also able to set the value of a linked property that requires a resource identifier.
      Specified by:
        `setValue` in interface `IPropertyValue`
      Overrides:
        `setValue` in class `PropertyValue`
      Parameters:
        `pContext` - the execution context
        `pValue` - the value to set

    - #### setValue

          public void setValue(java.lang.String pValue)

      Description copied from interface: `IPropertyValue`
      Sets the actual value. Does not support setting values of linked properties. If a context is available, use `IPropertyValue.setValue(IExecutionContext, String)` instead.
      Specified by:
        `setValue` in interface `IPropertyValue`
      Overrides:
        `setValue` in class `PropertyValue`
      Parameters:
        `pValue` - the new value

    - #### addValue

          public void addValue(java.lang.String pValue)

      Description copied from interface: `IPropertyValue`
      Adds a value to the value list. This is used for Text Array properties.
      Specified by:
        `addValue` in interface `IPropertyValue`
      Overrides:
        `addValue` in class `PropertyValue`
      Parameters:
        `pValue` - adds the value to the value list
      See Also:
        `IPropertyValue.getValues()`, `ETypes.TEXT_ARRAY`

    - #### setType

          public final void setType(EPropertyValueType pType)

      This method does nothing, since the type of application properties is not supposed to be changed.
      Specified by:
        `setType` in interface `IPropertyValue`
      Overrides:
        `setType` in class `PropertyValue`
      Parameters:
        `pType` - Does not have any impact. This method does nothing, since the type of application properties is not supposed to be changed.

Copyright © 2015 Micro Focus GmbH. All rights reserved.