com.microfocus.awm.model.internal

## Class PropertyValue

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

- All Implemented Interfaces:
    IPropertyValue
  Direct Known Subclasses:
    ApplicationPropertyValue, LinkedPropertyValue

      public class PropertyValue
      extends java.lang.Object
      implements IPropertyValue

  Main implementation of `IPropertyValue`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PropertyValue(Property pProperty)` Deprecated. Use `PropertyValue(Property, String, EPropertyValueType)` instead.
    `PropertyValue(Property pProperty, java.lang.String pValue)` Deprecated. use `PropertyValue(Property, String, EPropertyValueType)` instead.
    `PropertyValue(Property pProperty, java.lang.String pValue, EPropertyValueType pType)`

  - ### 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` | `getLabelOrValue()` Returns a label for a Property Value, if one was configured or set by a retrieval tool.
    `Property` | `getProperty()` Gets the property of this property value.
    `EPropertyValueType` | `getType()`
    `java.lang.String` | `getValue()` Gets the string value.
    `java.util.List<java.lang.String>` | `getValues()`
    `boolean` | `isArray()` Gets whether the property is a text array property.
    `void` | `setType(EPropertyValueType pType)` Sets the `EPropertyValueType` of the Property value.
    `void` | `setValue(IExecutionContext pContext, java.lang.String pValue)` Sets the string value.
    `void` | `setValue(java.lang.String pValue)` Sets the actual value.
    `java.lang.String` | `toString()`

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

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

- - ### Constructor Detail

    - #### PropertyValue

          @Deprecated
          public PropertyValue(Property pProperty)

      Deprecated. Use `PropertyValue(Property, String, EPropertyValueType)` instead.
      Constructor with a property value with empty value.
      Parameters:
        `pProperty` - the property

    - #### PropertyValue

          @Deprecated
          public PropertyValue(Property pProperty,
                                            java.lang.String pValue)

      Deprecated. use `PropertyValue(Property, String, EPropertyValueType)` instead.
      Parameters:
        `pProperty` - a `Property`.
        `pValue` - the value of the Property.

    - #### PropertyValue

          public PropertyValue(Property pProperty,
                               java.lang.String pValue,
                               EPropertyValueType pType)

      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)`.

  - ### Method Detail

    - #### 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`
      Parameters:
        `pValue` - adds the value to the value list
      See Also:
        `IPropertyValue.getValues()`, `ETypes.TEXT_ARRAY`

    - #### getLabelOrValue

          public java.lang.String getLabelOrValue()

      Description copied from interface: `IPropertyValue`
      Returns a label for a Property Value, if one was configured or set by a retrieval tool.

      If there is no label for this value, the value will be returned.

      Specified by:
        `getLabelOrValue` in interface `IPropertyValue`
      Returns:
        the label for this property or the value, if there is no label

    - #### getProperty

          public Property getProperty()

      Description copied from interface: `IPropertyValue`
      Gets the property of this property value.
      Specified by:
        `getProperty` in interface `IPropertyValue`
      Returns:
        the property

    - #### getType

          public EPropertyValueType getType()

      Specified by:
        `getType` in interface `IPropertyValue`
      Returns:
        the `EPropertyValueType` of this Property value.

    - #### 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`
      Returns:
        the string value

    - #### getValues

          public java.util.List<java.lang.String> getValues()

      Specified by:
        `getValues` in interface `IPropertyValue`
      Returns:
        A List of values or `null`, if the Property is not an array Property or no values have been set.

    - #### isArray

          public boolean isArray()

      Description copied from interface: `IPropertyValue`
      Gets whether the property is a text array property.
      Specified by:
        `isArray` in interface `IPropertyValue`
      Returns:
        `true` if the property has the type "Text Array"
      See Also:
        `ETypes.TEXT_ARRAY`

    - #### setType

          public void setType(EPropertyValueType pType)

      Description copied from interface: `IPropertyValue`
      Sets the `EPropertyValueType` of the Property value.
      Specified by:
        `setType` in interface `IPropertyValue`
      Parameters:
        `pType` - the new property value type

    - #### 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`
      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`
      Parameters:
        `pValue` - the new value

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © 2015 Micro Focus GmbH. All rights reserved.