Session Class Methods
PortalRegistry objects don’t have any built-in functions. They are instantiated from a session object. In this section, we discuss the Session Object methods. The methods are listed in alphabetical order.
Syntax
FindPortalRegistries(Name)
Description
The FindPortalRegistries method returns a reference to a PortalRegistry Collection filled with zero or more PortalRegistry objects matching the Name parameter. The Name parameter takes a string value.
You can use a partial key to get a smaller subset of the PortalRegistry collection. For example, to get a collection of all the PortalRegistry objects whose names start with the letter "B", specify just the letter B for Name:
&MyColl = &MySession.FindPortalRegistries("B");
Parameters
Field or Control |
Definition |
---|---|
Name |
Specify the name of the PortalRegistry object to find. This parameter takes a string value. |
Returns
A PortalRegistry Collection object.
Example
The following example returns a collection with references to all PortalRegistry objects.
Local ApiObject &MySession;
Local ApiObject &MyColl;
&MySession = %Session;
&MyColl = &MySession.FindPortalRegistries("");
Syntax
GetActualRemoteNodes()
Description
Use the GetActualRemoteNodes method to return a collection of remote nodes for the session.
Note: This method will only return remote nodes.
Parameters
None.
Returns
A reference to a collection of remote nodes if successful, null otherwise.
Example
&remoteNodeColl = %Session.GetActualRemoteNodes();
Syntax
GetLocalNode()
Description
Use the GetLocalNode method to return a reference to the node defined as the local node for this session.
Parameters
None.
Returns
A reference to a node object if successful, Null otherwise.
Example
&Node = %Session.GetLocalNode();
Syntax
GetNodes()
Description
Use the GetNodes method to return a collection of both local and remote nodes for the session.
Parameters
None.
Returns
A reference to a collection of nodes if successful, Null otherwise.
Example
&NodeColl = %Session.GetNodes();
Syntax
GetPortalRegistry()
Description
The GetPortalRegistry method returns an empty PortalRegistry object. You can then open or delete an existing PortalRegistry, or create a new one.
Parameters
None.
Returns
An empty PortalRegistry object.
Example
Local ApiObject &MyPortal;
&MyPortal = %Session.GetPortalRegistry();
&PORTAL_NAME = %Request.GetParameter("PORTAL_NAME");
&Portal.Open(PORTAL_NAME);
Syntax
GetRemoteNodes()
Description
Use the GetRemoteNodes method to return a collection of nodes for the session.
Note: This method returns both local and remote nodes.
Parameters
None.
Returns
A reference to a collection of nodes if successful, Null otherwise.
Example
&NodeColl = %Session.GetNodes();