org.equanda.reporting.i18n
Class TranslateTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.equanda.reporting.i18n.TranslateTask
All Implemented Interfaces:
Cloneable

public class TranslateTask
extends org.apache.tools.ant.Task

Ant task to translate (i18n) Jasper Reports files. See test module build file for example use. The subreportExpression is also modified to work inside the Cocoon context (same as imageExpression). This assumes all reports and images are in the same directory, and can be retrieved through the sitemap. This relies on the "REPORT_SOURCE_RESOLVER" parameter being defined (of type "org.equanda.reporting.i18n.ReportResolver").

Author:
Joachim Van der Auwera

Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
TranslateTask()
           
 
Method Summary
 void execute()
           
 void setBinextension(String ext)
           
 void setExtension(String ext)
           
 void setGenerateall(boolean genAll)
           
 void setJasperTranslate(boolean value)
          set whether the translating should be done by JasperReports, using $R{key}
 void setLanguage(String lang)
           
 void setOutputdir(String msg)
           
 void setReportdir(String msg)
           
 void setStaticTranslate(boolean value)
          set whether the translating should be done by JasperReports, using $R{key}
 void setTranslateStart(String start)
          Only use jasperTranslate on strings starting with given prefix (which is removed)
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TranslateTask

public TranslateTask()
Method Detail

setReportdir

public void setReportdir(String msg)

setOutputdir

public void setOutputdir(String msg)

setExtension

public void setExtension(String ext)

setBinextension

public void setBinextension(String ext)

setLanguage

public void setLanguage(String lang)

setGenerateall

public void setGenerateall(boolean genAll)

setJasperTranslate

public void setJasperTranslate(boolean value)
set whether the translating should be done by JasperReports, using $R{key}

Parameters:
value -

setStaticTranslate

public void setStaticTranslate(boolean value)
set whether the translating should be done by JasperReports, using $R{key}

Parameters:
value -

setTranslateStart

public void setTranslateStart(String start)
Only use jasperTranslate on strings starting with given prefix (which is removed)

Parameters:
start -

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException


Copyright © 2007-2009. All Rights Reserved.