Difference between revisions of "Placeholders"

From GreenVulcano Wiki
Jump to: navigation, search
Line 8: Line 8:
 
| [[More about Placeholders|fixed]] || You can use a text string
 
| [[More about Placeholders|fixed]] || You can use a text string
 
|-
 
|-
| [[More about Placeholders|<nowiki>${{propname}} </nowiki>]] || Use if you want a property previously defined by System. <br/> ''propname'' represents the System property name
+
| [[More about Placeholders|<nowiki>${{propname}} </nowiki>]] || Use this if you want a property previously defined by System. <br/> ''propname'' represents the System property name
 
|-
 
|-
| [[More about Placeholders|<nowiki>sp{{propname}} </nowiki>]] || Use if you want a property previously defined by System. <br/> ''propname'' represents the System property name
+
| [[More about Placeholders|<nowiki>sp{{propname}} </nowiki>]] || Use this if you want a property previously defined by System. <br/> ''propname'' represents the System property name
 
|-
 
|-
 
| [[More about Placeholders|<nowiki>@{{propname}} </nowiki>]] || Use this if you want a property passed as input. <br/> ''propname'' represents the inProperties property name
 
| [[More about Placeholders|<nowiki>@{{propname}} </nowiki>]] || Use this if you want a property passed as input. <br/> ''propname'' represents the inProperties property name
Line 16: Line 16:
 
| [[More about Placeholders|<nowiki>timestamp{{pattern}} </nowiki>]] || Returns the current timestamp formatted as ''pattern''
 
| [[More about Placeholders|<nowiki>timestamp{{pattern}} </nowiki>]] || Returns the current timestamp formatted as ''pattern''
 
|-
 
|-
| [[More about Placeholders|<nowiki>dateformat{{date::source-pattern::dest-pattern}} </nowiki>]] || Use this if you want t change the ''date'' format from ''source-pattern'' to ''dest-pattern''
+
| [[More about Placeholders|<nowiki>dateformat{{date::source-pattern::dest-pattern}} </nowiki>]] || Use this if you want to change the ''date'' format from ''source-pattern'' to ''dest-pattern''
 
|-
 
|-
 
| [[More about Placeholders|<nowiki>decode{{field[::cond1::val1][::cond2::val2][cond...n::val...n]::default}} </nowiki>]] || Works as the if-then-else construct: if ''field'' is equal to cond1, return the value of val1, ...; if ''field'' is equal to condn, return the value of valn; otherwise ''default''
 
| [[More about Placeholders|<nowiki>decode{{field[::cond1::val1][::cond2::val2][cond...n::val...n]::default}} </nowiki>]] || Works as the if-then-else construct: if ''field'' is equal to cond1, return the value of val1, ...; if ''field'' is equal to condn, return the value of valn; otherwise ''default''

Revision as of 10:47, 31 January 2012

GreenVulcano® ESB provides some placeholders and metadata. Their numerous applications range from the property definitions and attribute settings to more concrete applications as the evaluations of JavaScript scripts and database queries.

Next comes a table with all the metadata used by GreenVulcano® ESB and their description. It is also available for each item a link for deepening into, with concrete examples.

Placeholders / Metadata Brief description
fixed You can use a text string
${{propname}} Use this if you want a property previously defined by System.
propname represents the System property name
sp{{propname}} Use this if you want a property previously defined by System.
propname represents the System property name
@{{propname}} Use this if you want a property passed as input.
propname represents the inProperties property name
timestamp{{pattern}} Returns the current timestamp formatted as pattern
dateformat{{date::source-pattern::dest-pattern}} Use this if you want to change the date format from source-pattern to dest-pattern
decode{{field[::cond1::val1][::cond2::val2][cond...n::val...n]::default}} Works as the if-then-else construct: if field is equal to cond1, return the value of val1, ...; if field is equal to condn, return the value of valn; otherwise default
decodeL{{sep::field[::cond1::val1][::cond2::val2][cond...n::val...n]::default}} It is equivalent to decode, with the difference that condX can be a list of values separated by sep
js{{scope::script}} Evaluates a JavaScript script, using the scope scope
sql{{[conn::]statement}} Executes a select sql statement and returns the value of the first field of the first selected record.
The conn parameter is the JNDI name of a DataSource, if it is not defined the current connection is used
sqllist{{[conn::]statement}} Executes a select sql statement and returns the value of the first field of all selected records as a comma separated list.
The conn parameter is the JNDI name of a DataSource, if it is not defined the current connection is used
sqltable{{conn::statement}} Executes a select sql statement and returns all values of returned cursor as an XML.
The conn parameter is the JNDI name of a DataSource
ognl{{script}} Evaluates a OGNL script