Difference between revisions of "ChangeGVBuffer"

From GreenVulcano Wiki
Jump to: navigation, search
({{VULCON}} / {{GVCONSOLE}} Configuration)
({{VULCON}} / {{GVCONSOLE}} Configuration)
 
(4 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
=={{VULCON}} / {{GVCONSOLE}} Configuration==
 
=={{VULCON}} / {{GVCONSOLE}} Configuration==
  
A change to a data buffer is to set one or more fields of the buffer with configurable values, or perform some transformation on the body. You can also completely remove the body field. This option is useful to return an acknowledgment to the client without overhead to transfer the response data.
+
A change to a data buffer is to set one or more fields of the buffer with configurable values, or perform some transformation on the body. You can also completely remove the body field.
  
The ChangeGVBuffer Element is used by [[Main_nodes|ChangeGVBufferNode]], [[Main_nodes|GVEndNode]], [[ServiceCallerTask]] and [[test-service-call]]. Its attributes are:
+
The ChangeGVBuffer Element is used by [[ChangeGVBufferNode]], [[GVEndNode]], [[ServiceCallerTask]], [[GVWebServices#Binding|GVWebServices]], [[test-service-call]]. Its attributes are:
* ''clear-data'': This attribute can be set to:
+
{|class="gvtable"
** true: reset the body field of the buffer
+
! Attribute !! Type !! Description
** false: do not alter the body field of the buffer. This option is useful to return an acknowledgment to the client without overhead to transfer the response data.
+
|-
* ''system'': This attribute sets the value of system field of the buffer.
+
| clear-data || required || This attribute can be set to:
* ''service'': This attribute sets the value of service field of the buffer.
+
* true: reset the body field of the buffer
* ''ret-code'': This attribute sets the value of return code field of the buffer.
+
* false: do not alter the body field of the buffer. This option is useful to return an acknowledgement to the client without overhead to transfer the response data.
* ''crypto-op'': This attribute defines whether or not to use encryption and if you encrypt or decrypt the body field. Can not be defined with ''compress-op'', ''scope-name'', ''base64-op'' and ''clear-data''. The attribute's admitted values are:
+
|-
** none
+
| system || optional || This attribute sets the value of system field of the buffer.
** encrypt
+
|-
** decrypt
+
| service || optional || This attribute sets the value of service field of the buffer.
* ''key-id'': This attribute sets the key to use for the encryption/decryption.
+
|-
* ''compress-op'': This attribute defines whether to use compression and if you compress or decompress the body field. Can not be defined with ''crypto-op'', ''scope-name'', ''base64-op'' and ''clear-data''. The attribute's admitted values are:
+
| ret-code || optional || This attribute sets the value of return code field of the buffer.
** none
+
|-
** compress
+
| crypto-op || optional || This attribute defines whether or not to use encryption and if you encrypt or decrypt the body field. Can not be defined with ''compress-op'', ''scope-name'', ''base64-op'' and ''clear-data''. The attribute's admitted values are:
** uncompress
+
* none
* ''compress-level'': This attribute sets the compression ratio to use. The attribute's admitted values are:
+
* encrypt
** best-compression
+
* decrypt
** best-speed
+
|-
** default-compression
+
| key-id || optional || This attribute sets the key to use for the encryption/decryption.
** no-compression
+
|-
* ''base64-op'': This attribute defines whether to use Base64 encoding and if you encode or decode the body field. Can not be defined with ''compress-op'', ''crypto-op'', ''scope-name'' and ''clear-data''. The attribute's admitted values are:
+
| compress-op || optional || This attribute defines whether to use compression and if you compress or decompress the body field. Can not be defined with ''crypto-op'', ''scope-name'', ''base64-op'' and ''clear-data''. The attribute's admitted values are:
** none
+
* none
** encode
+
* compress
** decode
+
* uncompress
* ''scope-name'': This attribute defines whether to use a JavaScript. If it is defined, represent the 'scope' to be used for script execution. The execution environment map is added to the scope as ''environment'', the current input object is added to the scope as ''data''. Can not be defined with ''compress-op'', ''crypto-op'', ''base64-op'' and ''clear-data''.
+
|-
* ''script-file'': This attribute is the name of the file containing the script to run.
+
| compress-level || optional || This attribute sets the compression ratio to use. The attribute's admitted values are:
 +
* best-compression
 +
* best-speed
 +
* default-compression
 +
* no-compression
 +
|-
 +
| base64-op || optional || This attribute defines whether to use Base64 encoding and if you encode or decode the body field. Can not be defined with ''compress-op'', ''crypto-op'', ''scope-name'' and ''clear-data''. The attribute's admitted values are:
 +
* none
 +
* encode
 +
* decode
 +
|-
 +
| scope-name || optional || This attribute defines whether to use a JavaScript. If it is defined, represent the 'scope' to be used for script execution. The execution environment map is added to the scope as ''environment'', the current input object is added to the scope as ''data''. Can not be defined with ''compress-op'', ''crypto-op'', ''base64-op'' and ''clear-data''. '''REMOVED in v3.5'''
 +
|-
 +
| script-file || optional || This attribute is the name of the file containing the script to run. '''REMOVED in v3.5'''
 +
|}
  
 
It has the following subelements:
 
It has the following subelements:
 
* Description
 
* Description
* SimpleGVBufferBodyBuilder
+
* [[#SimpleGVBufferBodyBuilder|SimpleGVBufferBodyBuilder]]
* [[Script]]
+
* [[Script]]: define a JavaScript script.  '''REPLACED in v3.5 by a GENERIC SCRIPT CONTAINER'''
* [[OGNLScript]]
+
* [[OGNLScript]]: define an OGNL script. '''REMOVED in v3.5'''
* [[PropertyDef]]
+
* [[PropertyDef]]: define a property to set in [[GVBuffer]].
 
 
  
 
===SimpleGVBufferBodyBuilder===
 
===SimpleGVBufferBodyBuilder===
  
This element allows you to set the GVBuffer body. It is used by '''ChangeGVBuffer'''.
+
This element allows you to set the GVBuffer body.
  
 
Its attributes are:
 
Its attributes are:
* ''type'': body-builder.
+
{|class="gvtable"
* ''class'': it.greenvulcano.gvesb.internal.data.SimpleGVBufferBodyMaker
+
! Attribute !! Type !! Description
* ''file-name'': This attribute is the path of a file whose contents should be inserted into the body of GVBuffer. You can specify a file on the server's classpath using the following syntax: <br/> CP://filename or cp://filename <br/> This attribute has precedence over the element content.
+
|-
* ''read-once'': If true the file will be read only once, otherwise the file will be read on each invocation of the service. This attribute is meaningful only if the attribute file-name is specified. Default to "true".
+
| type || fixed || body-builder.
* ''encoding'': This attribute is the encoding used to convert text to byte array. The attribute's admitted values are:
+
|-
** US-ASCII
+
| class || fixed || it.greenvulcano.gvesb.internal.data.SimpleGVBufferBodyMaker
** ISO-8859-1
+
|-
** ISO-8859-15
+
| file-name || optional || This attribute is the path of a file whose contents should be inserted into the body of GVBuffer. You can specify a file on the server's classpath using the following syntax: <br/> CP://filename or cp://filename <br/> This attribute has precedence over the element content.
** ISO-LATIN-1
+
|-
** UTF-8
+
| read-once || optional || If true the file will be read only once, otherwise the file will be read on each invocation of the service. This attribute is meaningful only if the attribute file-name is specified. Default to "true".
** UTF-16BE
+
|-
** UTF-16LE
+
| encoding || optional || This attribute is the encoding used to convert text to byte array. The attribute's admitted values are:
** UTF-16
+
* US-ASCII
 +
* ISO-8859-1
 +
* ISO-8859-15
 +
* ISO-LATIN-1
 +
* UTF-8
 +
* UTF-16BE
 +
* UTF-16LE
 +
* UTF-16
 +
|-
 +
| process-metadata || optional|| If true the body content can contain metadata to be resolved at runtime. The body content must be a valid String. Default to false. The attribute's admitted values are:
 +
* true
 +
* false
 +
|}

Latest revision as of 08:33, 2 January 2015

Description

This GreenVulcano® ESB element specifies a modification of a data buffer.

VulCon / GV Console Configuration

A change to a data buffer is to set one or more fields of the buffer with configurable values, or perform some transformation on the body. You can also completely remove the body field.

The ChangeGVBuffer Element is used by ChangeGVBufferNode, GVEndNode, ServiceCallerTask, GVWebServices, test-service-call. Its attributes are:

Attribute Type Description
clear-data required This attribute can be set to:
  • true: reset the body field of the buffer
  • false: do not alter the body field of the buffer. This option is useful to return an acknowledgement to the client without overhead to transfer the response data.
system optional This attribute sets the value of system field of the buffer.
service optional This attribute sets the value of service field of the buffer.
ret-code optional This attribute sets the value of return code field of the buffer.
crypto-op optional This attribute defines whether or not to use encryption and if you encrypt or decrypt the body field. Can not be defined with compress-op, scope-name, base64-op and clear-data. The attribute's admitted values are:
  • none
  • encrypt
  • decrypt
key-id optional This attribute sets the key to use for the encryption/decryption.
compress-op optional This attribute defines whether to use compression and if you compress or decompress the body field. Can not be defined with crypto-op, scope-name, base64-op and clear-data. The attribute's admitted values are:
  • none
  • compress
  • uncompress
compress-level optional This attribute sets the compression ratio to use. The attribute's admitted values are:
  • best-compression
  • best-speed
  • default-compression
  • no-compression
base64-op optional This attribute defines whether to use Base64 encoding and if you encode or decode the body field. Can not be defined with compress-op, crypto-op, scope-name and clear-data. The attribute's admitted values are:
  • none
  • encode
  • decode
scope-name optional This attribute defines whether to use a JavaScript. If it is defined, represent the 'scope' to be used for script execution. The execution environment map is added to the scope as environment, the current input object is added to the scope as data. Can not be defined with compress-op, crypto-op, base64-op and clear-data. REMOVED in v3.5
script-file optional This attribute is the name of the file containing the script to run. REMOVED in v3.5

It has the following subelements:

SimpleGVBufferBodyBuilder

This element allows you to set the GVBuffer body.

Its attributes are:

Attribute Type Description
type fixed body-builder.
class fixed it.greenvulcano.gvesb.internal.data.SimpleGVBufferBodyMaker
file-name optional This attribute is the path of a file whose contents should be inserted into the body of GVBuffer. You can specify a file on the server's classpath using the following syntax:
CP://filename or cp://filename
This attribute has precedence over the element content.
read-once optional If true the file will be read only once, otherwise the file will be read on each invocation of the service. This attribute is meaningful only if the attribute file-name is specified. Default to "true".
encoding optional This attribute is the encoding used to convert text to byte array. The attribute's admitted values are:
  • US-ASCII
  • ISO-8859-1
  • ISO-8859-15
  • ISO-LATIN-1
  • UTF-8
  • UTF-16BE
  • UTF-16LE
  • UTF-16
process-metadata optional If true the body content can contain metadata to be resolved at runtime. The body content must be a valid String. Default to false. The attribute's admitted values are:
  • true
  • false