Show:

The ProAct.PropertyProvider is an abstract class.

Many providers can be registered for many kinds of properties.

When a ProAct.js object is initialized its fields are turned into properties. Depending on the type and the name of the field, as well as meta information the valid type of ProAct.Property is created and used. The PropertyProviders have 'filter' method and depending on it the valid kind is decided.

ProAct.PropertyProvider is part of the proact-properties module of ProAct.js.

Constructor

ProAct.PropertyProvider

()

Item Index

Properties

Methods

clearProviders

() static

Removes all ProAct.PropertyProviders from the list of the registered ProAct.PropertyProviders.

filter

(
  • object
  • property
  • meta
)
Boolean

Used to check if this ProAct.PropertyProvider is compliant with the field and meta data to be used for creating a ProAct.Property instance with provide.

Abstract - must be implemented by an extender.

Parameters:

  • object Object

    The object to which a new ProAct.Property instance should be provided.

  • property String

    The field name of the object to turn into a ProAct.Property. Can be used in the filtering process.

    For example field name beginning with foo. Can be turned into a FooProperty.

  • meta String | Array

    Meta information to be used for filtering and configuration of the ProAct.Property instance to be provided.

Returns:

Boolean:

If this provider is compliant with the passed arguments.

prependProvider

(
  • propertyProvider
)
static

Registers a ProAct.PropertyProvider.

The provider is prepended in the beginning of the list of ProAct.PropertyProviders.

It's filtering will be called before any other registered provider.

Parameters:

provide

(
  • queueName
  • object
  • property
  • meta
)
ProAct.Property

Provides an instance of ProAct.Property.

It should be called only after this filter method, called with the same arguments returns true.

Abstract - must be implemented in an extender.

Parameters:

  • queueName String

    The name of the queue all the updates should be pushed to.

    If this parameter is null/undefined the default queue of flow is used.

  • object Object

    The object to which a new ProAct.Property instance should be provided.

  • property String

    The field of the object to turn into a ProAct.Property. Can be used in the filtering process.

  • meta String | Array

    Meta information to be used for filtering and configuration of the ProAct.Property instance to be provided.

Returns:

ProAct.Property:

A property provided by this provider.

registerProvider

(
  • propertyProvider
)
static

Registers a ProAct.PropertyProvider.

The provider is appended in the end of the list of ProAct.PropertyProviders.

When a property must be provided if there is a ProAct.PropertyProvider registered before the passed propertyProvider, with valid filtering for the passed field, it will be used instead.

Parameters:

unregisterProvider

(
  • propertyProvider
)
static

Removes a ProAct.PropertyProvider from the list of the registered ProAct.PropertyProviders.

Parameters:

Properties

constructor

ProAct.PropertyProvider final

Reference to the constructor of this object.