com.holonplatform.core.property

## Interface VirtualProperty<T>

- Type Parameters:
    `T` - Property type
  All Superinterfaces:
    Localizable, Property<T>, Serializable, Validator.Validatable<T>
  All Known Subinterfaces:
    VirtualProperty.Builder<T,B>

      public interface VirtualProperty<T>
      extends Property<T>

  A virtual `Property` which relies on a `PropertyValueProvider` to provide its value, and it is not directly connected with a data model attribute.
  Since:
    5.0.0
  See Also:
    `PropertyValueProvider`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `VirtualProperty.Builder<T,B extends VirtualProperty.Builder<T,B>>` Base interface for `VirtualProperty` building.

    - ### Nested classes/interfaces inherited from interface com.holonplatform.core.property.Property

      `Property.PropertyAccessException, Property.PropertyNotFoundException, Property.PropertyReadException, Property.PropertyReadOnlyException, Property.PropertyWriteException`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.core.i18n.Localizable

      `Localizable.LocalizableBuilder, Localizable.LocalizationException`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> VirtualProperty.Builder<T,?>` | `create(Class<? extends T> type)` Create a new VirtualProperty with given `type`
    `static <T> VirtualProperty.Builder<T,?>` | `create(Class<T> type, PropertyValueProvider<T> valueProvider)` Create a new VirtualProperty with given `type` using given `PropertyValueProvider` as property value provider.
    `PropertyValueProvider<T>` | `getValueProvider()` Get property value provider
    `default boolean` | `isReadOnly()` Gets whether property is read-only, i.e. does not support value setting.

    - ### Methods inherited from interface com.holonplatform.core.property.Property

      `getConfiguration, getConvertedValue, getConverter, getType, present, render, renderIfAvailable`

    - ### Methods inherited from interface com.holonplatform.core.Validator.Validatable

      `getValidators, validate`

    - ### Methods inherited from interface com.holonplatform.core.i18n.Localizable

      `builder, getMessage, getMessageArguments, getMessageCode`

- - ### Method Detail

    - #### getValueProvider

          PropertyValueProvider<T> getValueProvider()

      Get property value provider
      Returns:
        Property value provider

    - #### isReadOnly

          default boolean isReadOnly()

      Description copied from interface: `Property`
      Gets whether property is read-only, i.e. does not support value setting.

      When a property is read-only, a `Property.PropertyReadOnlyException` should be thrown by property value setting methods.

      Specified by:
        `isReadOnly` in interface `Property<T>`
      Returns:
        `true` if property is read-only

    - #### create

          static <T> VirtualProperty.Builder<T,?> create(Class<? extends T> type)

      Create a new VirtualProperty with given `type`
      Type Parameters:
        `T` - Property value type
      Parameters:
        `type` - Property value type
      Returns:
        A `VirtualProperty.Builder` to setup property attributes

    - #### create

          static <T> VirtualProperty.Builder<T,?> create(Class<T> type,
                                                         PropertyValueProvider<T> valueProvider)

      Create a new VirtualProperty with given `type` using given `PropertyValueProvider` as property value provider.
      Type Parameters:
        `T` - Property value type
      Parameters:
        `type` - Property value type
        `valueProvider` - Property value provider
      Returns:
        A `VirtualProperty.Builder` to setup property attributes

Copyright © 2017 The Holon Platform. All rights reserved.