eRoom Constants and Helper Functions

The files SAAPI.ASP and SAAPILogin.asp define constants for enums and error constants defined in SAAPI IDL.  Note that SAAPI.ASP includes SAAPIUtils.ASP, and is in turn included by eRoomToolkit.ASP and eRoom core pages--meaning the functions are available in custom UI as well.

SAAPIUtils.ASP--General eRoom ASP Extension Helper Functions

SAAPIUtils.ASP contains numerous functions for use by server extensions.

Session and Cookie related functions

  • function ERGetClientType()  -- Get's the current user's client choice: ersu_ThinClient or ersu_ThickClient

  • function ERSetClientType(newClientType)  -- Set's the current user's client choice: ersu_ThinClient or ersu_ThickClient

  • function ERGetSessionCookie()  -- Returns the current user's session cookie

  • function ERCreateUserSession(sObsolete, sessionToken )  -- Returns/Creates the eRoom session cookies to the client's browser.  See ERCreateUserSessionFromCookie()

  • function ERCreateUserSessionFromCookie(sessionCookie)  -- Returns/Creates the eRoom session cookie to the client's browser.  

  • function ERSetPortal(ERSuccessURL, oObsolete, SessionToken, UserName, Password) -- See ERSetPortal2()

  • function ERSetPortal2(ERSuccessURL, SessionToken, UserName, Password)  -- Return the login, password and session for use by the eRoom Monitor.  Values are stored in the client's registry if monitor password saving is enabled on the site.  Function returns javascript to be executed on the client.

  • function ERSetCustomCookie(Field, Value)  --  Set a site scoped permanent eRoom Custom cookie value

  • function ERGetCustomCookie(Field)  --  Get an site scoped permenant cookie value

  • function ERSetCustomSessionCookie(Field, Value)  -- Set a site scoped eRoom Custom Session Cookie

  • function ERGetCustomSessionCookie(Field)  --  Get an Custom eRoom Session cookie field value

Core eRoom Page access functions

  • function ERRedirectToChooseClientDlg(SubmitDest)  -- Redirects the the eRoom choose client dialog and redirects the the specified URL upon completion.

  • function ERGetChooseDialogURL(destinationURL)  -- Returns the URL of the choose client dialog

Client Browser functions

  • function ERIsNetscape()  -- Determine if the client browser is Netscape

  • function ERIsIE()  -- Determine if the client browser is Internet Exporer

Custom UI Context

  • function ERGetCustomContext() -- Get Custom UI Custom context object (if such an extension is configured)  This is for use in Custom UI extensions to access the current UI context for the page that is being displayed.

Obsolete; Replaced by IERUCustomContext properties

The following functions are obsolete, but continue to work as before for the purposes of backward compatibility. Extensions should use Context::Facility, ::Room, ::Item and ::LoggedInMember properties to get this context information.

  • function ERGetFacilityURLName () --  Returns the current facility's URL name. Use IERUCustomContext::Facility instead

  • function ERGetRoomURLName()  -- Get the current room URL name. Use IERUCustomContext::Room instead.

  • function ERGetItemID() --  Returns the item being displayed (page frame only). Use IERUCustomContext::Item instead.

  • function ERGetUserID() --Returns the logged in user's user ID. Use IERUCustomContext::LoggedInMember instead.

Functions that Generate URLs to Extension Files and Core eRoom Files

eRoom adds a <base href> to all eRoom pages, dialogs and pages generated using eRoomToolkit.ASP functions. A <base href> defines the baseline URL on which relative links will be based. This means that all relative URLs specified in links or form submit actions, etc., inserted into such eRoom pages are relative to this base href URL. This URL is the eRoom server's URL complete with protocol, server name and any alternate port or required proxy server prefix, plus a trailing "/" character. Note that your extension URLs are NOT relative to your extension's script directory. You can get this URL from the SAAPI IERUeRoomServerSettings::URL property plus a trailing "/" character.

function ERGetExtensionURL(extensionid, fname) &endash;- Generate a URL to an extension’s script file.

function ERGetExtensionDataURL(extensionid, fname) -- Generate a URL to an extension data file.

New SAAPIUtils.ASP Functions

There are several new functions in SAAPIUtils.ASP and SAAPILoginUtils.ASP.

Functions that Generate URLs to Extension Files and Core eRoom Files

eRoom adds a <base href> to all eRoom pages, dialogs and pages generated using eRoomToolkit.ASP functions. A <base href> defines the baseline URL on which relative links will be based. This means that all relative URLs specified in links or form submit actions, etc., inserted into such eRoom pages are relative to this base href URL. This URL is the eRoom server's URL complete with protocol, server name and any alternate port or required proxy server prefix, plus a trailing "/" character. Note that your extension URLs are NOT relative to your extension's script directory. You can get this URL from the SAAPI IERUeRoomServerSettings::URL property plus a trailing "/" character.

  • function ERGetExtensionURL(extensionid, fname) &endash;- Generate a URL to an extension’s script file.

  • function ERGetExtensionDataURL(extensionid, fname)  -- Generate a URL to an extension data file.

  • function ERGeteRoomDataURL(fname) &endash;- Generate an extension to an eRoom core data vile.

  • function ERGetCustomCommandURL(extensionid)  -- Generate a URL to execute a custom command.

  • function ERGenerateUIEventURL(UIEventID, param1, param2, param3, finalURL)  -- Generate a UI event URL.

Note: The values expected for param1, param2 and param3 vary with UIEventID.  FinalURL is only supported for dialogs and not for pages. Note that some UIEvents have multiple definitions for param1, param2 and param3.  

The following table contains the parameters to be specified to generate a UIEvent URL for a given context. This page context determines the target and the current page upon completion of the UIEvent dialog. Note that the FinalURL parameter can also be used to override the return page for a UIEvent dialog.

 

UIEvent ID

[Page Context] Param1/param2/param3

Type

eruiEventMyeRooms

[Site] ”r;”, ”r;”, ”r;”

Page

eruiEventSiteSearch

[Site] ”r;”, ”r;”, ”r;”

Page

eruiEventSiteSettings

[Site/MyeRooms] ”r;”, ”r;”, ”r;”

Dialog

eruiEventSendAlert

[Item] FacilityURLName, RoomURLName,
ItemID

Page

eruiEventMeetingsAndEvents

[Room] FacilityURLName, RoomURLName, ”r;”

Page

eruiEventInviteRoomMember

[Room Members] FacilityURLName, RoomURLName, ”r;”

Dialog

eruiEventChangeRoles

[Room Members] FacilityURLName, RoomURLName, ”r;”
[Room Members] FacilityURLName, RoomURLName, MemberID

Dialog

eruiEventAddRole

[Room Members] FacilityURLName, RoomURLName, ”r;”

Dialog

eruiEventRemoveRoomMember

[Room Members] FacilityURLName, RoomURLName, ”r;”
[Room Members] FacilityURLName, RoomURLName, MemberID

Dialog

eruiEventAddRoomMember

[Room Members] FacilityURLName, RoomURLName, ”r;”

Dialog

eruiEventCreateRoom

[Site/MyeRooms] ”r;”, ”r;”, ”r;”
[Room] FacilityURLName, ”r;”, ”r;”

Dialog

eruiEventDeleteRoom

[Room/Myerooms] FacilityURLName, RoomURLName, ”r;”

Dialog

eruiEventRoomSettings

[Room] FacilityURLName, RoomURLName, ”r;”

Dialog

eruiEventRoomMembers

[Room] FacilityURLName, RoomURLName, ”r;”

Page

eruiEventAddGroupMember

[Community Members] CommunityID, GroupID, ”r;”
[Room Members] FacilityURLName, RoomURLName, GroupID

Dialog

eruiEventRemoveGroupMember

[Community Members] CommunityID, GroupID, ”r;”
[Room Members] FacilityURLName, RoomURLName, GroupID

Dialog

eruiEventCommunityMemberList

[Community] CommunityID, ”r;”, ”r;”

Page

eruiEventCommunitySettings

[Site] CommunityID, ”r;”, ”r;”

Dialog

eruiEventFacilitySettings

[Community Settings] CommunityID, FacilityURLName, ”r;”

Page

eruiEventAddGuests

[Community Members] CommunityID, ”r;”, ”r;”

Dialog

eruiEventMoveMembers

[Community Members] CommunityID, ”r;”, ”r;”

Dialog

eruiEventDeleteMember

[Site Members] MemberID, ”r;”, ”r;” [Community Members] MemberID, CommunityID, ”r;”
[Room Members] MemberID, FacilityURLName, RoomURLName

Dialog

EruiEventEditUser

[Site] MemberID, ”r;”, ”r;”
[Community] MemberID, CommunityID, ”r;”[Room] MemberID, FacilityURLName, RoomURLName

Dialog

eruiEventEditGroup

[Site] MemberID, ”r;”, ”r;”
[Community] MemberID, CommunityID, ”r;”[Room] MemberID, FacilityURLName, RoomURLName

Dialog

eruiEventCreateUser

[Community Members] CommunityID, ”r;”, ”r;””r;”, Ignored, Ignored

Dialog

eruiEventCreateGroup

[Community Members] CommunityID, ”r;”, ”r;”

Dialog

eruiEventGroupMembers

[Community Members] CommunityID, MemberID, ”r;”
[Room Members] FacilityURLName, RoomURLName, MemberID

Page

Functions that Scope Custom Cookies to the eRoom Site

Functions have been added to scope custom cookies to the eRoom site. The eRoom Site’s Invariant name and the Site’s domain name are used to scope these cookies. A value set from any eRoom server in the site is accessible from all eRoom servers within the site.

  • function ERSetCustomCookie(Field, Value) &endash; Set a permanent cookie scoped the the eRoom site.

  • function ERGetCustomCookie(Field)  -- Get a permanent custom cookie value.

  • function ERSetCustomSessionCookie(Field, Value) &endash; Set a session scoped custom cookie; this cookie is temporary and will be removed when the browser/session is closed.

  • function ERGetCustomSessionCookie(Field) &endash; Get a session-scoped custom cookie value.

Functions that Get a Custom Context from within a CustomUI (Frame)

  • function ERGetCustomContext()  -- This is used to get the custom context object within a custom ui (frame). The Context::EventID can then be used to determine the type of eRoom page that is being generated, allowing page-specific customizations to be inserted into a sitewide custom UI extension.

Miscellaneous Functions

  • function ERIsNetscape()  -- Returns true if the client is running Netscape Navigator.

  • function ERIsIE()  -- Returns true if the client is running Microsoft Internet Explorer.

 

New SAAPILoginUtils.ASP Functions

New Session Helpers/Login Override helpers

  • function ERCreateUserSessionFromCookie(sessionCookie)

  • function ERSetLoginName(itemValue)

  • function ERGetLoginName()

  • function ERSetLoginErrorNum(itemValue)

  • function ERGetLoginErrorNum()

  • function ERSetLoginMode(itemValue)

  • function ERGetLoginMode()

  • function ERClearLoginData()

  • function ERGetDefaultLoginName(sFacility)

  • function ERGetDefaultPassword(sFacilityURL)

  • function ERHandleLoginError(errNum, changePasswordURL)

  • function ERHandleSecurIDError(errNum, securIDPinURL)

  • function ERSecurIDPinIsValid(sLoginName, sPIN, sFacility)

  • function ERRedirectLoginSuccess(targetURL, sFacility, oFacility, sessionCookie, bSetDefaultLoginName, sPassword, encryptedPassword)