Packagelc.domain
Classpublic class SessionMap
InheritanceSessionMap Inheritance Object

The SessionMap class provides untyped access to LiveCycle Workspace ES API objects and other singletons. For example, the session manager can be retrieved using the following code:

var sessionManager:ISessionManager = ISessionManager(session.getObject("lc.core.ISessionManager"));

Additional objects can be added using the setObject method. The general convention for key names is that the key name should match the fully qualified class or interface name that you want, as in the ISessionManager example above. In addition, it is possible to use typed convenience methods from the WorkspaceSession object to retrieve Workspace ES API objects.

The SessionMap object is initialized during the application initialization and passed to all components, as the session property, thereby making it available throughout the application.

See also

lc.domain.workspace.WorkspaceSession


Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Public Methods
 MethodDefined By
  
Retrieves a session object given a key.
SessionMap
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
  
setObject(key:String, object:Object):void
Adds an object to be retrieved with the given key.
SessionMap
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Method Detail
getObject()method
public function getObject(key:String):Object

Retrieves a session object given a key.

Parameters

key:String — Specifies the key for the SessionMap object. The standard convention is that this will be the fully qualified name of the class or interface to which the returned object would be cast.

Returns
Object — An object matching the given key. If there is no match for the key, null is returned.
setObject()method 
public function setObject(key:String, object:Object):void

Adds an object to be retrieved with the given key. If the object with that key already exists, it will be replaced.

Parameters

key:String — Specifies the key for the object.
 
object:Object — Specifies the object to be stored for the given key.

See also





 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/common/langref/lc/domain/SessionMap.html