| Package | com.ericfeminella.local |
| Class | public class LocalPersistence |
| Implements | IAMFEncodable, IFlexUISession, IManagedPersistence |
| Property | Defined by | ||
|---|---|---|---|
| objectEncoding : int
Sets the current ObjectEncoding version of the persisted object
| LocalPersistence | ||
| Property | Defined by | ||
|---|---|---|---|
| identifier : String
The name of the SharedObject instance used for local persistence
| LocalPersistence | ||
| lso : SharedObject
SharedObject instance which persists data locally on the client
| LocalPersistence | ||
| Method | Defined by | ||
|---|---|---|---|
|
LocalPersistence(identifier:String, minDiskSpace:int = 100)
Creates a reference to the persisted SharedObject available from
the clients local-disk.
| LocalPersistence | ||
|
deletePersistedProperties():Boolean
Deletes all properties from the persisted object
| LocalPersistence | ||
|
deletePersistedProperty(propertyName:String):Boolean
Deletes a specified property from the persisted object
| LocalPersistence | ||
|
destroy():void
Destroys the current SharedObject from the clients local disk
| LocalPersistence | ||
|
getCurrentSessionId():Number
Returns the current session date of a persisted
object
| LocalPersistence | ||
|
getCurrentSessionTimestamp():String
Retrieves the current session timestamp
| LocalPersistence | ||
|
getData():Object
Returns the data object of the persisted object.
| LocalPersistence | ||
|
getIdentifier():String
Returns the name of the shared object.
| LocalPersistence | ||
|
getPersistedProperties():Array
Returns an array of all properties in the persisted object
| LocalPersistence | ||
|
getPersistedProperty(propertyName:String):*
Returns the value of a specified persisted property
| LocalPersistence | ||
|
getPreviousSessionId():Number
Returns the previous session date of a persisted
object
| LocalPersistence | ||
|
getPreviousSessionTimestamp():String
Retrieves the previous session timestamp
| LocalPersistence | ||
|
getSessions():Array
Retrieves all session unique identifier
| LocalPersistence | ||
|
getSessionTimestamps():Array
Retrieves all session timestamps
| LocalPersistence | ||
|
getSize():int
Returns the size object of the persisted object.
| LocalPersistence | ||
|
setPersistedProperty(propertyName:String, value:* = null):void
Sets the value of a specified persisted property
| LocalPersistence | ||
|
write(minDiskSpace:int = 100):Boolean
Writes the persisted SharedObject to disk
| LocalPersistence | ||
| identifier | property |
protected var identifier:StringThe name of the SharedObject instance used for local persistence
| lso | property |
protected var lso:SharedObjectSharedObject instance which persists data locally on the client
| objectEncoding | property |
objectEncoding:int [read-write]Sets the current ObjectEncoding version of the persisted object
Implementation public function get objectEncoding():int
public function set objectEncoding(value:int):void
| LocalPersistence | () | constructor |
public function LocalPersistence(identifier:String, minDiskSpace:int = 100)Creates a reference to the persisted SharedObject available from the clients local-disk. If the SharedObject does not currently exsist, Flash Player will attempt to created it
If the identifier contains any invalid charachters, they will be substituted with underscores
Parametersidentifier:String — name of the local shared object
|
|
minDiskSpace:int (default = 100) — minimum amount of disc space required by the shared object
|
| deletePersistedProperties | () | method |
public function deletePersistedProperties():BooleanDeletes all properties from the persisted object
ReturnsBoolean — true if the properties have successfully been deleted
|
| deletePersistedProperty | () | method |
public function deletePersistedProperty(propertyName:String):BooleanDeletes a specified property from the persisted object
ParameterspropertyName:String — name of the property to delete
|
Boolean |
| destroy | () | method |
public function destroy():voidDestroys the current SharedObject from the clients local disk
| getCurrentSessionId | () | method |
public function getCurrentSessionId():NumberReturns the current session date of a persisted object
ReturnsNumber — a date object for the current session
|
| getCurrentSessionTimestamp | () | method |
public function getCurrentSessionTimestamp():StringRetrieves the current session timestamp
ReturnsString — the current session timestamp
|
| getData | () | method |
public function getData():ObjectReturns the data object of the persisted object. The data object is a property of SharedObject and is used to maintain persisted data either Locally or Remotely
ReturnsObject — An object which contains all properties / values
|
| getIdentifier | () | method |
public function getIdentifier():StringReturns the name of the shared object.
ReturnsString — The name of the shared object
|
| getPersistedProperties | () | method |
public function getPersistedProperties():ArrayReturns an array of all properties in the persisted object
ReturnsArray — an array of all persisted properties
|
| getPersistedProperty | () | method |
public function getPersistedProperty(propertyName:String):*Returns the value of a specified persisted property
ParameterspropertyName:String |
* — the value of the property
|
| getPreviousSessionId | () | method |
public function getPreviousSessionId():NumberReturns the previous session date of a persisted object
ReturnsNumber — a date object for the previous session
|
| getPreviousSessionTimestamp | () | method |
public function getPreviousSessionTimestamp():StringRetrieves the previous session timestamp
ReturnsString — the current session timestamp
|
| getSessions | () | method |
public function getSessions():ArrayRetrieves all session unique identifier
ReturnsArray — an Array of all session identifiers
|
| getSessionTimestamps | () | method |
public function getSessionTimestamps():ArrayRetrieves all session timestamps
ReturnsArray — an Array of all session identifiers
|
| getSize | () | method |
public function getSize():intReturns the size object of the persisted object.
Returnsint — the size of the LSO in kilobytes
|
| setPersistedProperty | () | method |
public function setPersistedProperty(propertyName:String, value:* = null):voidSets the value of a specified persisted property
ParameterspropertyName:String — name of the property to be persisted
|
|
value:* (default = null) — value of the property to be persisted
|
| write | () | method |
public function write(minDiskSpace:int = 100):BooleanWrites the persisted SharedObject to disk
ParametersminDiskSpace:int (default = 100) — minimum amount of disc space required by the shared object
|
Boolean — true if the write operation was successful, false if not
|