Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Corrected links that should have been relative instead of absolute.

...

Methods Available in the Data Mapper

The Following are the methods available in the class MapperUtilityClass are:Click on the method to know its summary an syntax.

 

Expand
titlecharAt ()

Summary:

Returns the character at the specified index. This method accepts following two parameters: data string and an integer index.

Syntax:

java:MapperUtilityClass.charAt('Adeptia', 3) 

...

Expand
titlegetCurrentDate ()

Summary:

Gets the current date and time from the server and gives the output in the desired Java Time Zone. This method accepts following two parameters: Date/Time format in the data string and Time Zone in the data string.

Syntax:

java:MapperUtilityClass.getCurrentDate(‘yyyy-MM-dd HH:mm:ss’ , ‘time-zone’) 
Example,
java:MapperUtilityClass.getCurrentDate(‘yyyy-MM-dd HH:mm:ss’ , ‘US/Eastern’) 


Expand
titleabortMapping ()

Summary:

Aborts the mapping. This method accepts one string type parameter only.

Syntax:

java:MapperUtilityClass.abortMapping("Error message") 

...

Expand
titleinvokeREST ()

Summary:

Calls RESTful web service. This method accepts following eight parameters. All the parameters should be of String format. Parameter details are as follows:

  1. URL of the REST web service.
  2. Operation (GET, PUT, POST, or DELETE) to be performed.
  3. Data to be sent with POST request. This field is optional. For GET request and other web services that don't require any input, leave this field blank (' ').
  4. Request media type, for example, text/html, application/xml.
  5. Response media type, for example, text/html, application/xml.
  6. HTTP header to be sent with the request. Multiple header parameters should be separated by a comma, for example, name=san, id=3.
  7. Username to perform authentication of your web service. Leave this parameter blank (' ') if the web service doesn't require any authentication.
  8. Password to perform authentication of your web service. Leave this parameter blank (' ') if the web service doesn't require any authentication.

Syntax:

java:MapperUtilityClass.invokeREST('http://www.thomas-bayer.com/sqlrest/PRODUCT/12','GET/POST/PUT/DELETE','data to be sent (optional for get)' ,'application/xml','application/xml','Accept-Charset=utf-8,Cache-Control=no-cache,Content-Type: application/xml','username','password') 

 

The Following are the global methods available in the class MapperUtilityClass are:GlobalMehthodCall. Click on the method to know its summary an syntax.

 

Expand
titlegetAge ()

Summary:

Returns the present age. This method accepts one string type parameter only in the <parameter-name> format.

Syntax:

java:GlobalMethodCall.getAge(‘dd-MM-yyyy HH:mm:ss’) 

...