@urlAlias::setTimeout

Specifies how long (in seconds) the short URL should persist in the database. The default is four hours (14400). If the alias has timed out, the URL will no longer be valid, and attempting to access it will generate an error message.

Syntax:

@urlAlias::setTimeout(int seconds)

Parameters:

(Integer) seconds: number of seconds to persist the URL in the database.

Returns:

None

Example:

 

@person = @event::getRecipient($recipient.owner)

  $hasMobileAccess = $person.hasMobileAccess

  $accessibleServices = @person::getAccessibleIntegrationServices($event.domain)  

  $hasAccessToSample = $accessibleServices::contains("sample")  

 

  IF ($hasMobileAccess && $hasAccessToSample)

    @urlAlias = @event::createURLAlias()  

    @urlAlias::setTarget("http://localhost:8888/mg/jsp/sample/executePing.jsp")

    @urlAlias::setHost("http://localhost:8888")

    @urlAlias::setTimeout(3600)

    @urlAlias::setParameter("username", $person.targetName)

    @urlAlias::setParameter("command", "dir")

    $alias = @urlAlias::activate()  

    $content.message = $content.message & " Link: " & $alias  

  ENDIF