Packageorg.spicefactory.parsley.binding.impl
Classpublic class PersistentPublisher
InheritancePersistentPublisher Inheritance AbstractPublisher Inheritance flash.events.EventDispatcher
Implements Publisher, Subscriber

A publisher that updates when the matching persisted value has changed in the installed persistence manager.



Public Properties
 PropertyDefined By
  currentValue : *
[read-only] The current value of this publisher.
PersistentPublisher
 Inheritedid : String
[read-only]
AbstractPublisher
 Inheritedtype : ClassInfo
[read-only]
AbstractPublisher
 Inheritedunique : Boolean
[read-only]
AbstractPublisher
Protected Properties
 PropertyDefined By
 Inheritedenabled : Boolean = true
Indicates whether this publisher is currently enabled.
AbstractPublisher
Public Methods
 MethodDefined By
  
PersistentPublisher(manager:PersistenceManager, type:ClassInfo, id:String = null, persistentKey:Object = null)
Creates a new instance.
PersistentPublisher
  
Prevents any updates from getting passed to the persistence mechanism.
PersistentPublisher
  
dispose():void
Disposes this publisher.
PersistentPublisher
  
init():void
Initializes this publisher.
PersistentPublisher
  
update(newValue:*):void
Notifies this suscriber that the published value has changed.
PersistentPublisher
Protected Methods
 MethodDefined By
 Inherited
publish(newValue:*):void
Publishes a new value.
AbstractPublisher
Property Detail
currentValueproperty
currentValue:*  [read-only]

The current value of this publisher. If this value changes the publisher must dispatch a change event.


Implementation
    public function get currentValue():*
Constructor Detail
PersistentPublisher()Constructor
public function PersistentPublisher(manager:PersistenceManager, type:ClassInfo, id:String = null, persistentKey:Object = null)

Creates a new instance.

Parameters
manager:PersistenceManager — the manager to read values from
 
type:ClassInfo — the type of the published value
 
id:String (default = null) — the id the value is published with
 
persistentKey:Object (default = null) — the key to pass to the persistence manager in case it differs from the id
Method Detail
disableSubscriber()method
public function disableSubscriber():void

Prevents any updates from getting passed to the persistence mechanism.

dispose()method 
public function dispose():void

Disposes this publisher. After this method was invoked the publisher does not need to continue to provide a published value or dispatch change events.

init()method 
public function init():void

Initializes this publisher. The publisher is only supposed to dispatch change events and provide a published value after this method has been called until the dispose method is called.

update()method 
public function update(newValue:*):void

Notifies this suscriber that the published value has changed.

Parameters

newValue:* — the new value of the matching publisher