A number of Property References are available. These Property References are used as variables to hold data which will vary depending on where and when it is used. For example, Client parameters and Application parameters are available when invoking a Service Function, but the Datapool parameter ${datapool.timestamp} is only available in the context of a Datapool.

These generally use ${xxx.xxx} notation to distinguish them from other aspects of an application.

Static and Dynamic Properties

Most Properties are dynamic: they will be resolved as required using the data available at the time. Presentation Server parameters and the Application ID are static: these will be resolved to the same values every time. Using static properties means the properties only need to be resolved on startup, which is quicker than resolving them every time a service call is made. For example, a string containing both static and dynamic property references will be resolved at initialization time, so that the resulting string only needs to have the dynamic properties resolved. See the login file console.jsp on your application server for an example.

Also note that if you are using the Desktop Client in Offline mode, you should not change any properties in HTML templates or login JSP files to hard-coded values as the Desktop Client requires special values for these properties to operate offline.

Property references are divided into different groups according to their function:

Application parameters

The Application parameters (${application.id}) resolve to the ID of the application passed in. It corresponds to the application ID as defined in the Applications section in altioserver.xml. This means you do not need to specify the actual application ID in service functions or datapools, instead use this parameter. This is a static property.

Presentation Server parameters

The Presentation Server parameters contain a number of Property References. These are static properties: they retain the same value for every service call, for every application, for every user session, etc.

Client parameters

The Client parameters can be used when calling Service Functions to pass window-specific information. They allow you to send data from the client to the service function, such as the values entered in controls by the user, and XML data defined in the Server request action rule. This applies when the Datatype is set to XML.

This can be done either through parameters to the Service Function or as arguments of the URL for the Service Function.

They use a format of ${client.xxx}. The xxx will be searched for in service data passed from the client. For example, if you execute a service, NEW_BID, AltioLive client will call the presentation server with following service data as argument, x;

x=<ALTIO><SERVICE AL_NM='NEW_BID' SALE_ID='1001' PROD_ID='205' PRICE='0.50'/></ALTIO>

When you define your Service Function, you then use ${client.xxx} to refer to attributes of SERVICE element.

Example:

<SERVICE NM="NEW_BID" ACK="Added record" ACKSRC="HEADER" ACKTYPE="SUCCESS" URL="${db.server.protocol}://${db.server.name}:${db.server.port}/${db.server.path}com.altio.altiodb.AltioDB">
  <PARAM NM="APPID" VALUE="${application.id}"/>
  <PARAM NM="ACTION" VALUE="NEW"/>      
  <PARAM NM="TARGET" VALUE="/FOR_SALE/SALE_ITEM[@SALE_ID='${client.SALE_ID}']"/>
  <PARAM NM="AL_NAME" VALUE="BID"/>
  <PARAM NM="GUID" VALUE="BID_ID"/>
  <PARAM NM="PROD_ID" VALUE="${client.PROD_ID}"/>
  <PARAM NM="PRICE" VALUE="${client.PRICE}"/>
  <OUTPUT DOCTYPE="EMPTY"/>
</SERVICE>

Session parameters

The Session parameters allow you to substitute session-specific details when calling Service Functions (either as parameters or as arguments of the URL for the Service Function) and using datapools. If you use your own login handler, you can set additional session parameters. You can then reference to your session parameter in the Service Function.

The following session parameters are available:

${session.altio.logon.name}

Login name of the user

deprecated. Use ${connection.user}

${session.altio.logon.app}

Login application id

deprecated. Use ${connection.application}

${session.altio.logon.conf}

Name of the user's view file

deprecated. Use ${connection.view}

Connection parameters

The Connection parameters describe an individual connection with a specific application or tool.

These are used to denote a connection between a user and a single application. When a is user logged into more than one application from the same client machine, this prevents confusion between each browser connection.

You can also substitute details specific to the session when calling Service Functions (either as parameters or as arguments of the URL for the Service Function) and using datapools. Generally this will only be the login name of the user. For customer specific session values (i.e. those added to the session by a custom login servlet), do not use the connection. prefix.

 

${connection.user}

Login name of the user

${connection.view}

Name of the user's view file

${connection.application}

Login application id

${connection.remoteip}

ip address of client machine

${connection.sessionid}

Login session id

${connection.time.connected}

Time user first connected

${connection.time.lastaccessed}

Time user last accessed

 

Example of their use:

<SERVICE NM="NEW_SALE" ACK="Added record" ACKSRC="HEADER" ACKTYPE="SUCCESS" URL="${db.server.protocol}://${db.server.name}:${db.server.port}/${db.server.path}com.altio.altiodb.AltioDB">
  <PARAM NM="APPID" VALUE="${application.id}"/>
  <PARAM NM="ACTION" VALUE="NEW"/>      
  <PARAM NM="TARGET" VALUE="/FOR_SALE"/>
  <PARAM NM="AL_NAME" VALUE="SALE_ITEM"/>
  <PARAM NM="GUID" VALUE="SALE_ID"/>
  <PARAM VALUE="SELLER_ID" NAME="${connection.user}"/>
  <OUTPUT DOCTYPE="EMPTY"/>
     ...
</SERVICE>

Datapool parameters

The Datapool parameters (${datapool.timestamp}) will resolve to the integer value of the current timestamp of the datapool. This is useful for Timestamping.

Example:

<SERVICE NM="DP_NEW_FORSALE" ACK="" ACKSRC="HEADER" ACKTYPE="SUCCESS" URL="${db.server.protocol}://${db.server.name}:${db.server.port}/${db.server.path}com.altio.altiodb.AltioDB">
  <PARAM NM="APPID" VALUE="${application.id}"/>
  <PARAM NM="ACTION" VALUE="GET"/>
  <PARAM NM="TARGET" VALUE="/FOR_SALE"/>
  <PARAM VALUE="TIMESTAMP" NAME="${datapool.timestamp}"/>
  <OUTPUT DOCTYPE="XML"/>
     ...
</SERVICE>

If your datapool timestamp type is DATETIME, you can use ${datapool.timestamp.formatted} to convert the internal integer timestamp value back to its original DATETIME string format.

For more information: See Datapools.

HTTP request parameters

You can also use ${request.xxx} to refer to any HTTP request parameter for a service call to Presentation Server. For example, you use ${request.x} to refer to a service call request.

Example:

<ALTIO><SERVICE AL_NM='DO_THIS' WHAT='GO_HOME' TIME='17:30'/></ALTIO>

Cookie and HTTP Header references: You can reference to particular Cookie or HTTP header in your Service Function using ${cookie.NAME} or ${header.NAME}. Where NAME is the name of the cookie or header. For example: ${cookie.JSESSIONID} or ${header.User-Agent}

License parameters

You can reference values from the license file loaded by the Presentation Server. Most of the elements of the license are available. For example, to display on a console jsp pages using an altio resolve tag, you can get the license expiry date using ${license.expirydate}

${license.expirydate}

Date license expires - blank for never expires

${license.startdate}

Date license starts

${license.expiryperiod}

Number of days license is valid

${license.companyname}

Name of company in license

${license.code}

License code

${license.enginecount}

Max number of licensed Presentation Servers

${license.fullusers}

Max number of concurrent Smart Client users

${license.datausers}

Max number of concurrent Data Client users

${license.devusers}

Max number of concurrent development IP connections

${license.adminusers}

Max number of admin users.

${license.offlineusers}

Max number of concurrent offline users

${license.version}

Version of Presentation Server licensed

${license.majorversion}

Major part of licensed version

${license.minorversion}

Minor part of licensed version

${license.cpunumber}

CPU Number if available

${license.context}

Context if available

${license.product}

AltioLive Product

${license.valid}

A true or false indication if the license is valid

${license.message}

Error message returned by an invalid license

${license.daysremaining}

Number of days until the license expires. -1 used if license never expires and 0 if has already expired.

${license.formatteddate}

Expiry date formatted as dd/MM/yy

 

For more information see JSP Tags.

See also:

Set up Service Functions, Control Property References