ControlTier Inc. > CTL
 
Font size:      

PropertySort

Description

Looks up all properties in the current project context that match the specified regular expression, and then sorts them accordingly.

Parameters

AttributeDescriptionRequired
matchRegular expression to match property namesYes
propertyThe name of the property to store resultsYes
bySpecifies what to sort. Takes either value or nameYes
orderSpecifies sort order. Takes either ascending or descendingYes

Examples

The following properties defined in a file called ports.properties:

setting.TomcatPort.ajp13Port.value=8209
setting.TomcatPort.httpPort.value=8280
setting.TomcatPort.httpsPort.value=8643
setting.TomcatPort.shutdownPort.value=8205

and the following code

<property file="ports.properties"/>
<propertysort match="setting.TomcatPort.*.value" by="value" order="ascending"
                 property="ports"/>
<echo>${ports}</echo>      

would yield

8205, 8209, 8280, 8643