Difference between revisions of "Placeholders Example"
Line 1: | Line 1: | ||
− | The following table shows how to use | + | The following table shows how to use some metadata using specific examples: |
{|class="gvtable" | {|class="gvtable" |
Revision as of 02:04, 11 February 2012
The following table shows how to use some 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®.