Packageorg.openPyro.storage
Classpublic class SharedObjectStorage
InheritanceSharedObjectStorage Inheritance flash.events.EventDispatcher
ImplementsIStorage

The SharedObjectStorage saves the serializable object as a value to the SO in the so.data.value field.
 
   var ob:StorageDictionary = new StorageDictionary()
   ob.setKeyValuePair(key, value);
   var storage:SharedObjectStore = new SharedObjectStore('dev')
   storage.save(ob)
  



Public Properties
 PropertyDefined by
  minDiskSpace : Number = 1000
The number of bytes to reserve for the storage
SharedObjectStorage
  storeActionState : String
[read-only] Returns the status of the last "save" action.
SharedObjectStorage
  storeCreated : Boolean
[read-only] Function used to verify if the store was successfully created or not.
SharedObjectStorage
Protected Properties
 PropertyDefined by
  _storeActionState : String
SharedObjectStorage
Public Methods
 MethodDefined by
  
SharedObjectStorage(soName:String, localPath:String = null, secure:Boolean = false)
Constructor
SharedObjectStorage
  
getStoredData():String
SharedObjectStorage
  
save(ob:ISerializable, overwrite:Boolean = true):void
Called to save the contents of the store to tje storage implementation.
SharedObjectStorage
Events
 EventSummaryDefined by
   Dispatched when the store fails in persisting any object to the store SharedObjectStorage
   Dispatched when the store succeeds in persisting any object to the store SharedObjectStorage
Property detail
minDiskSpaceproperty
public var minDiskSpace:Number = 1000

The number of bytes to reserve for the storage

_storeActionStateproperty 
protected var _storeActionState:String
storeActionStateproperty 
storeActionState:String  [read-only]

Returns the status of the last "save" action. The values are one of the constant values from org.openPyro.core.storage.StoreActionState

Implementation
    public function get storeActionState():String

See also

org.openPyro.core.storage.StoreActionState;
storeCreatedproperty 
storeCreated:Boolean  [read-only]

Function used to verify if the store was successfully created or not. For example, users may have sharedObject turned off or may not allow filesystem access or may be offline for remote storage.

Implementation
    public function get storeCreated():Boolean
Constructor detail
SharedObjectStorage()constructor
public function SharedObjectStorage(soName:String, localPath:String = null, secure:Boolean = false)

Constructor

Parameters
soName:String
 
localPath:String (default = null)
 
secure:Boolean (default = false)
Method detail
getStoredData()method
public function getStoredData():String

Returns
String — The string stored by the IStorage implementation. If the store does not exist or could not be read, return null.
save()method 
public function save(ob:ISerializable, overwrite:Boolean = true):void

Called to save the contents of the store to tje storage implementation. Since this may be an async process, success or failure is indicated by dispatching a storeSucceeded or storeFailed Event.

Parameters
ob:ISerializable
 
overwrite:Boolean (default = true)
Event detail
storageFailedevent 
Event object type: net.comcast.pyro.storage.events.StorageEvent

Dispatched when the store fails in persisting any object to the store

storeSucceededevent  
Event object type: net.comcast.pyro.storage.events.StorageEvent

Dispatched when the store succeeds in persisting any object to the store