Placeholders Example
The following table shows how to use the metadata using specific examples:
Metadata | Example | Returns |
---|---|---|
SQL | sqlTemplate:Ds.test gv::select ‘OK’ from dual | the String ‘OK’ |
SQLLIST | [sqllistTemplate:Ds.test gv::,::select name from city order by 1] | a list of City, separated by "," ordered alfabetically and enclosed into “[“ and “]” |
TIMESTAMP | timestampTemplate: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: jsTemplate:Gvesb::object.getSystem() | the system field of the input GVBuffer |
SYSTEM | Server Name: $Template:Jboss.server.name | the indicated system property value |
CLASS | %Template: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::timestampTemplate: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®.