Sets the URL Alias context path used to construct the alias URL. If this method is not called during the construction of a URL alias, xMatters defaults to the mobile access component (/mg).
@urlAlias::setUrlAliasContextPath(String context)
(String) context: the context path for the web application you want to target. This value must match the value defined in the xMatters web.xml configuration file. The default value to target the xMatters web user interface is /alarmpoint/ua/
.
None
The following code illustrates how to use the setUrlAliasContextPath method to create an alias URL for the xMatters web user interface and insert the result into a notification message:
IF(!EXISTS(@phoneLoginURLAlias))
@phoneLoginURLAlias = @event::createURLAlias()
@company = @event::getCompany()
@phoneLoginURLAlias::setHost($main.alarmpointURL)
@phoneLoginURLAlias::setTimeout($main.timeout)
@phoneLoginURLAlias::setParameter("company", $company.name)
@phoneLoginURLAlias::setUrlAliasContextPath("/alarmpoint/ua/")
ENDIF
@phoneLoginURLAlias::setParameter("username", $person.targetName)
@phoneLoginURLAlias::setParameter("userId", $userId)
@phoneLoginURLAlias::setParameter("notificationId",$content.notification_key)
@phoneLoginURLAlias::setParameter("deviceType", "Email")
@phoneLoginURLAlias::setTarget($main.alarmpointURL & "/alarmpoint/MyProfile/ChangePassword/ChangePassword.do")
$webLoginURL = @phoneLoginURLAlias::activate()
$responseinfo = $responseinfo & "<li><a id=\u0022eml_response_link" & $webChoice & "\u0022 class=\u0022response\u0022"
$responseinfo = $responseinfo & " href=\u0022" & $webLoginURL & "\u0022"
$responseinfo = $responseinfo & " title=\u0022" & $webChoice & "\u0022>" & $webChoice & "</a></li>"