<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="../plugin.xsl" type="text/xsl"?>
<plugin name="StringHandler">
  <object class="org.ow2.isac.plugin.stringhandler.SessionObject">
    <params>
      <param name="default" type="String" />
    </params>
    <help>Provides a collection of primitives for generating, modifying and extracting Strings.
This plug-in provides the following data:
- ${handler_id:} gives the current string's value
- ${handler_id:#} gives the current string's length
and, after a call to control "slice":
- ${handler_id:slice#N} gives the Nth string slice
- ${handler_id:slice++} gives the next string slice
- ${handler_id:slice#} gives the number of string slices
- ${handler_id:slice} gives the current string slice after a call to "nextSlice"</help>
  </object>
  <control name="set" number="0">
    <params>
      <param name="value" type="String" />
    </params>
    <help>Sets the string value.</help>
  </control>
  <control name="base64decode" number="20">
    <params>
      <param name="charset" type="String" />
      <param name="urlsafe" type="String" />
    </params>
    <help>Decodes and replaces this string's value as if it was a base64-encoded String.</help>
  </control>
  <control name="base64encode" number="21">
    <params>
      <param name="charset" type="String" />
      <param name="options" type="String" />
    </params>
    <help>Encodes and replaces this string's value according to base64-encoding.</help>
  </control>
  <control name="append" number="14">
    <params>
      <param name="string" type="String" />
    </params>
    <help>Appends the provided string to current value.</help>
  </control>
  <control name="insert" number="15">
    <params>
      <param name="string" type="String" />
    </params>
    <help>Inserts the provided string at the beginning.</help>
  </control>
  <control name="write" number="13">
    <params>
      <param name="string" type="String" />
    </params>
    <help>Overwrites the string value from its beginning with the given string. If the provided string is longer than current value, then the resulting value equals the provided string. If the provided string is shorter than current value, then the resulting value ends with the trailing characters from current value.</help>
  </control>
  <control name="cut" number="8">
    <params>
      <param name="head" type="String" />
      <param name="tail" type="String" />
    </params>
    <help>Cuts heading and trailing characters of current string.</help>
  </control>
  <control name="truncate" number="11">
    <params>
      <param name="length" type="String" />
    </params>
    <help>Truncate the string to a given length.</help>
  </control>
  <control name="replaceAll" number="1">
    <params>
      <param name="search" type="String" />
      <param name="replace" type="String" />
    </params>
    <help>Replaces all occurrences of a string by another string.</help>
  </control>
  <control name="random-set" number="2">
    <params>
      <param name="size" type="String" />
    </params>
    <help>Sets the string value with a randmly generated string of a given size.</help>
  </control>
  <control name="setPattern" number="3">
    <params>
      <param name="pattern" type="String" />
    </params>
    <help>Creates a new pattern (aka regular expression) for
further search and capture of elements in the current string. Use "match" to trigger the next matching attempt, or "slice" to split the string into substrings, considering the pattern as a separator.

Patterns are based on Java's java.util.regex package.
http://docs.oracle.com/javase/1.6.0/docs/api/java/util/regex/Pattern.html</help>
  </control>
  <control name="resetMatching" number="4">
    <params />
    <help>Resets the pattern matching process at the beginning of the string, using the previously set pattern.</help>
  </control>
  <control name="match" number="5">
    <params>
      <param name="skip" type="String" />
    </params>
    <help>Finds the next match of current pattern, optionally skipping a number of matches. When necessary and only if matching is successful, use "capture" to extract elements from the matching substring.</help>
  </control>
  <control name="capture" number="7">
    <params>
      <param name="level" type="String" />
      <param name="variable" type="String" />
    </params>
    <help>Sets a variable with the substring that matched current pattern, as stated in the regular expression by a capture group. This substring will then be available through expression ${handler_id:my_variable}.</help>
  </control>
  <control name="replaceAllMatches" number="12">
    <params>
      <param name="replace" type="String" />
    </params>
    <help>Replaces all substrings that matches the current pattern with the given string.</help>
  </control>
  <control name="slice" number="16">
    <params>
      <param name="options" type="String" />
    </params>
    <help>Slices the current value into substrings, using the current pattern as a separator (see "setPattern"). Resulting slices are available through variables slice#1 ... slice#n, or slice for current slice when using "nextSlice". Variable slice++ gives next slice. Variable clice# gives the number of slices.</help>
  </control>
  <control name="nextSlice" number="17">
    <params />
    <help>Give control help.</help>
  </control>
  <control name="digest" number="22">
    <params>
      <param name="algo" type="String" />
    </params>
    <help>Replaces this string's current value with its digest (aka hash) according to the chosen algorithm.</help>
  </control>
  <control name="URLdecode" number="39">
    <params>
      <param name="charset" type="String" />
    </params>
    <help>Decodes current string considered as URL-encoded.</help>
  </control>
  <control name="URLencode" number="40">
    <params>
      <param name="charset" type="String" />
    </params>
    <help>Encodes current string accorgin to the URL encoding rules.</help>
  </control>
  <test name="contains" number="0">
    <params>
      <param name="search" type="String" />
    </params>
    <help>True if current string contains the given string, false otherwise.</help>
  </test>
  <test name="containsNot" number="9">
    <params>
      <param name="search" type="String" />
    </params>
    <help>False if current string contains the given string, true otherwise.</help>
  </test>
  <test name="equals" number="25">
    <params>
      <param name="string" type="String" />
    </params>
    <help>True if current string equals the given string, false otherwise.</help>
  </test>
  <test name="equalsNot" number="26">
    <params>
      <param name="string" type="String" />
    </params>
    <help>True if current string differs from the given string, false otherwise.</help>
  </test>
  <test name="equalsIgnoreCase" number="27">
    <params>
      <param name="string" type="String" />
    </params>
    <help>True if current string equals the given string, whatever letters are upper case or lower case, false otherwise.</help>
  </test>
  <test name="equalsNotIgnoreCase" number="28">
    <params>
      <param name="string" type="String" />
    </params>
    <help>True if current string differs from the given string, whatever letters are upper case or lower case, false otherwise.</help>
  </test>
  <test name="hasMoreSlice" number="18">
    <params />
    <help>True if at least one more string slice is available through a subsequent call to nextSlice or reference to variable slice++.</help>
  </test>
  <test name="hasNoMoreSlice" number="19">
    <params />
    <help>True if no more string slice is available through a subsequent call to nextSlice or reference to variable slice++.</help>
  </test>
  <test name="isEmpty" number="23">
    <params />
    <help>True if current string is empty, false otherwise.</help>
  </test>
  <test name="isNotEmpty" number="24">
    <params />
    <help>True if current string is not empty, false otherwise.</help>
  </test>
  <test name="lengthIs" number="29">
    <params>
      <param name="length" type="String" />
    </params>
    <help>True if current string length equals the given value, false otherwise.</help>
  </test>
  <test name="lengthIsNot" number="30">
    <params>
      <param name="length" type="String" />
    </params>
    <help>True if current string length differs from the given value, false otherwise.</help>
  </test>
  <test name="lengthIsGt" number="31">
    <params>
      <param name="length" type="String" />
    </params>
    <help>True if current string length is strictly greater than the given value, false otherwise.</help>
  </test>
  <test name="lengthIsGte" number="33">
    <params>
      <param name="length" type="String" />
    </params>
    <help>True if current string length is greater than, or equals, the given value, false otherwise.</help>
  </test>
  <test name="lengthIsLt" number="32">
    <params>
      <param name="length" type="String" />
    </params>
    <help>True if current string length is strictly less than the given value, false otherwise.</help>
  </test>
  <test name="lengthIsLte" number="34">
    <params>
      <param name="length" type="String" />
    </params>
    <help>True if current string length is less than, or equals, the given value, false otherwise.</help>
  </test>
  <test name="matched" number="6">
    <params />
    <help>True if the last pattern matching was successful, false otherwise.</help>
  </test>
  <test name="matchedNot" number="10">
    <params />
    <help>False if the last pattern matching was successful, true otherwise.</help>
  </test>
  <test name="isGt" number="35">
    <params>
      <param name="string" type="String" />
    </params>
    <help>True if current string is greater than the given string, with regard to the alphabetical ordering, false otherwise.</help>
  </test>
  <test name="isLt" number="36">
    <params>
      <param name="string" type="String" />
    </params>
    <help>True if current string is less than the given string, with regard to the alphabetical ordering, false otherwise.</help>
  </test>
  <test name="isGte" number="37">
    <params>
      <param name="string" type="String" />
    </params>
    <help>True if current string is greater than, or equals the given string, with regard to the alphabetical ordering, false otherwise.</help>
  </test>
  <test name="isLte" number="38">
    <params>
      <param name="string" type="String" />
    </params>
    <help>True if current string is less than, or equals the given string, with regard to the alphabetical ordering, false otherwise.</help>
  </test>
</plugin>

