Dashboard > Pulse v2.0 > ... > pulse Files > property
  Pulse v2.0 Log In | Sign Up   View a printable version of the current page.  
  property
Added by Jason Sankey, last edited by Jason Sankey on Jun 10, 2009  (view change)
Labels: 
(None)

Pulse Manual Index

Properties

The <property> element provides a way to bind a name to a simple string value. Properties are useful for reducing repetition in pulse™ files by giving commonly-used values a name that can be used in multiple places. If the value of the property changes, only one change is required to update the property file.

Syntax

Properties are referenced using either the ${<name>} or the $(<name>) syntax, where <name> is the name of the property being referred to. Property references can only be made in attribute values.

When using the ${<name>} syntax, property names cannot contain the '}' character. Although it is possible, it is best not to use the '$' or '{' characters in a property name either.

When using the $(<name>) syntax, the following characters are reserved and cannot be used in the property name:

) ! # % & : ; | / ?

Currently only the question mark (?) has special meaning. It can be used to specify a default value for the reference if it is not defined at the point where it is referenced. For example:

$(my.property?default)

will resolve to "default" if my.property is not defined.

Built-in Properties

When processing a pulse file, several variables are automatically added to the global scope. See the Properties page for details.

Attributes

Attribute Description Required? Default
name The name of the property. Yes  
value The value of the property. No An empty string

Examples

The most basic type of property:

<property name="my.property" value="my.value"/>

A property defined in terms of an earlier property:

<property name="bin.dir" value="bin"/>
<property name="script.dir" value="${bin.dir}/scripts"/>

Zutubi wiki is Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.10 Build:#528 Nov 29, 2006) - Bug/feature request - Contact Administrators