Difference between revisions of "Placeholders Example"

From GreenVulcano Wiki
Jump to: navigation, search
(Created page with "The following table shows how to use the metadata using specific examples: {|class="gvtable" ! Metadata !! Example !! Returns |- | SQL || sql{{ds.test_gv::select ‘OK’ from d...")
 
Line 4: Line 4:
 
! Metadata !! Example !! Returns
 
! Metadata !! Example !! Returns
 
|-
 
|-
| SQL || sql{{ds.test_gv::select ‘OK’ from dual}} || the String ‘OK’
+
| SQL || <nowiki>sql{{ds.test_gv::select ‘OK’ from dual}}</nowiki> || the String ‘OK’
 
|-
 
|-
| SQLLIST || [sqllist{{ds.test_gv::,::select name from city order by 1}}] || a list of City, separated by "," ordered alfabetically and enclosed into “[“ and “]”
+
| SQLLIST || <nowiki>[sqllist{{ds.test_gv::,::select name from city order by 1}}]</nowiki> || a list of City, separated by "," ordered alfabetically and enclosed into “[“ and “]”
 
|-
 
|-
| TIMESTAMP || timestamp{{yyyyMMdd HH:mm:ss}} || the current timestamp with the indicated format
+
| TIMESTAMP || <nowiki>timestamp{{yyyyMMdd HH:mm:ss}}</nowiki> || the current timestamp with the indicated format
 
|-
 
|-
| OGNL || Service: ognl{{#object.getService()}} || the service field of the input [[GVBuffer]]
+
| OGNL || Service: <nowiki>ognl{{#object.getService()}}</nowiki> || the service field of the input [[GVBuffer]]
 
|-
 
|-
| JAVASCRIPT || System: js{{gvesb::object.getSystem()}} || the system field of the input [[GVBuffer]]
+
| JAVASCRIPT || System: <nowiki>js{{gvesb::object.getSystem()}}</nowiki> || the system field of the input [[GVBuffer]]
 
|-
 
|-
| SYSTEM || Server Name: ${{jboss.server.name}} || the indicated system property value
+
| SYSTEM || Server Name: <nowiki>${{jboss.server.name}}</nowiki> || the indicated system property value
 
|-
 
|-
| CLASS || %{{fqclass}} || the FQN (Fully Qualified Name) of the input [[GVBuffer]]: it.greenvulcano.gvesb.buffer.GVBuffer
+
| CLASS || <nowiki>%{{fqclass}}</nowiki> || the FQN (Fully Qualified Name) of the input [[GVBuffer]]: it.greenvulcano.gvesb.buffer.GVBuffer
 
|-
 
|-
| DECODE || decode{{ognl{{#object.getProperty(‘SQL’)}}::OK::Sql OK::Sql KO}} || 'Sql OK' if ognl 'OK'. 'Sql KO' otherwise
+
| DECODE || <nowiki>decode{{ognl{{#object.getProperty(‘SQL’)}}::OK::Sql OK::Sql KO}}</nowiki> || 'Sql OK' if ognl 'OK'. 'Sql KO' otherwise
 
|-
 
|-
| MINUTE: Minute decode{{js{{gvesb::timestamp{{mm}} % 2 == 0}}::true::EVEN::ODD}} || 'EVEN' if js returns 'true'. 'ODD' otherwise. <br/> timestamp: returns the current minute and js: verifies if the current minute is even or odd.
+
| MINUTE || <nowiki>Minute decode{{js{{gvesb::timestamp{{mm}} % 2 == 0}}::true::EVEN::ODD}}</nowiki> || 'EVEN' if js returns 'true'. 'ODD' otherwise. <br/> timestamp: returns the current minute and js: verifies if the current minute is even or odd.
 
|}
 
|}
  
 
See [[GVExample_TestProperty|TestProperty]] example for seeing how configure it using {{L_VULCON}}.
 
See [[GVExample_TestProperty|TestProperty]] example for seeing how configure it using {{L_VULCON}}.

Revision as of 02:03, 11 February 2012

The following table shows how to use the metadata using specific examples:

Metadata Example Returns
SQL sql{{ds.test_gv::select ‘OK’ from dual}} the String ‘OK’
SQLLIST [sqllist{{ds.test_gv::,::select name from city order by 1}}] a list of City, separated by "," ordered alfabetically and enclosed into “[“ and “]”
TIMESTAMP timestamp{{yyyyMMdd HH:mm:ss}} the current timestamp with the indicated format
OGNL Service: ognl{{#object.getService()}} the service field of the input GVBuffer
JAVASCRIPT System: js{{gvesb::object.getSystem()}} the system field of the input GVBuffer
SYSTEM Server Name: ${{jboss.server.name}} the indicated system property value
CLASS %{{fqclass}} the FQN (Fully Qualified Name) of the input GVBuffer: it.greenvulcano.gvesb.buffer.GVBuffer
DECODE decode{{ognl{{#object.getProperty(‘SQL’)}}::OK::Sql OK::Sql KO}} 'Sql OK' if ognl 'OK'. 'Sql KO' otherwise
MINUTE Minute decode{{js{{gvesb::timestamp{{mm}} % 2 == 0}}::true::EVEN::ODD}} 'EVEN' if js returns 'true'. 'ODD' otherwise.
timestamp: returns the current minute and js: verifies if the current minute is even or odd.

See TestProperty example for seeing how configure it using VulCon®.