Packageorg.spicefactory.parsley.binding.tag
Classpublic class PublishSubscribeDecorator
InheritancePublishSubscribeDecorator Inheritance Object
Implements ObjectDefinitionDecorator

Represents a Metadata, MXML or XML tag that can be used on properties that hold a value that should be published to matching subscribers while at the same time acting as a subscriber for matching publishers.



Public Properties
 PropertyDefined By
  changeEvent : String = change
The event that signals that the property value has changed.
PublishSubscribeDecorator
  managed : Boolean
Indicates whether the value published by this property should be added to the Context (turned into a managed object) while being published.
PublishSubscribeDecorator
  objectId : String
The id the property value is published with.
PublishSubscribeDecorator
  persistent : Boolean
Indicates whether the value published by this property should be persisted.
PublishSubscribeDecorator
  property : String
The property that holds the value to publish and subscribe to.
PublishSubscribeDecorator
  scope : String
The scope the property value is published to.
PublishSubscribeDecorator
Public Methods
 MethodDefined By
  
Method to be invoked by the container for each configuration tag it encounters for an object that was added to the container.
PublishSubscribeDecorator
Property Detail
changeEventproperty
public var changeEvent:String = change

The event that signals that the property value has changed. This property does not have any effect in Flex applications where the Flex Binding mechanism is used instead.

managedproperty 
public var managed:Boolean

Indicates whether the value published by this property should be added to the Context (turned into a managed object) while being published.

objectIdproperty 
public var objectId:String

The id the property value is published with.

persistentproperty 
public var persistent:Boolean

Indicates whether the value published by this property should be persisted. The actual persistence mechanism is pluggable, the default implementation persists to a local SharedObject.

propertyproperty 
public var property:String

The property that holds the value to publish and subscribe to.

scopeproperty 
public var scope:String

The scope the property value is published to.

Method Detail
decorate()method
public function decorate(builder:ObjectDefinitionBuilder):void

Method to be invoked by the container for each configuration tag it encounters for an object that was added to the container. It doesn't matter whether it is a builtin configuration tag or a custom extension tag, or whether it is a metadata tag, an MXML or XML tag. As long as the tag is mapped to a class that implements this interface the container will invoke it for each tag on each object.

The builder parameter getting passed to the decorator can be used to customize the ObjectDefinition that is currently getting processed. In most custom tag implementations you will peform tasks like specifying constructor arguments, property values, message receivers, custom lifecycle processors or instantiators.

A decorator is also allowed to register additional definitions through using builder.newBuilder. Those additional definitions might describe collaborators that the processed definition will need to operate for example. If you want to register collaborators that are globally accessible (or within a certain scope) you may consider adding them to the ScopeExtensionRegistry in the GlobalFactoryRegistry instead.

Parameters

builder:ObjectDefinitionBuilder — the builder that can be used to modify the target definition