com.jaspersoft.jasperserver.ws.axis2
Class RepositoryHelper

java.lang.Object
  extended by com.jaspersoft.jasperserver.ws.axis2.RepositoryHelper

public class RepositoryHelper
extends java.lang.Object

Author:
gtoffoli

Field Summary
protected static org.apache.commons.logging.Log log
           
 
Constructor Summary
RepositoryHelper(EngineService engine)
          Creates a new instance of RepositoryHelper
 
Method Summary
 java.util.Map convertParameterValues(java.lang.String reportUri, java.util.Map currentParameters)
          Converts BigDecimal numbers to the the type they should be based on what the JRParameters say.
 java.lang.Object stringToValue(java.lang.String str, java.lang.Class clazz)
          This method get a string and tries to convert the string into the requested object.
 java.lang.String valueToString(java.lang.Object value)
          This method get a object and tries to convert it in a string Valid objects are: java.util.Date (converted in a string representing milliseconds) Number BigDecimal Byte Short Integer Long Float Double Boolean (will be the string true or false) String The default returned object is of type String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.commons.logging.Log log
Constructor Detail

RepositoryHelper

public RepositoryHelper(EngineService engine)
Creates a new instance of RepositoryHelper

Method Detail

convertParameterValues

public java.util.Map convertParameterValues(java.lang.String reportUri,
                                            java.util.Map currentParameters)
Converts BigDecimal numbers to the the type they should be based on what the JRParameters say.

Parameters:
reportUri - the name of the report
currentParameters - parameters to fic

valueToString

public java.lang.String valueToString(java.lang.Object value)
This method get a object and tries to convert it in a string Valid objects are: java.util.Date (converted in a string representing milliseconds) Number BigDecimal Byte Short Integer Long Float Double Boolean (will be the string true or false) String The default returned object is of type String

Parameters:
value - The object to convert in a string
Returns:
Return a string represeting the object

stringToValue

public java.lang.Object stringToValue(java.lang.String str,
                                      java.lang.Class clazz)
This method get a string and tries to convert the string into the requested object. Valid classes are: java.util.Date (the string is supposed to represent a number of milliseconds) Number BigDecimal Byte Short Integer Long Float Double Boolean String java.util.Locale The default returned object is of type String

Parameters:
str - the string representing the value
clazz - The class of the result (not garanteed)
Returns:
return an Object hopefully of the requested class (or a String)


Copyright © 2007. All Rights Reserved.