i-net Clear Reports

com.inet.report.schedule
Class FileAction

java.lang.Object
  extended by com.inet.report.schedule.ScheduleAction
      extended by com.inet.report.schedule.FileAction
Direct Known Subclasses:
FtpAction

public class FileAction
extends ScheduleAction

This action will render the reports and save them to a given directory. If a report does not contain an export format "pdf" will be used as default.

Since:
i-net Crystal-Clear 6.0

Field Summary
 
Fields inherited from class com.inet.report.schedule.ScheduleAction
TYPE_CACHE, TYPE_CUSTOM, TYPE_EMAIL, TYPE_FILE, TYPE_FTP, TYPE_PRINT
 
Constructor Summary
FileAction()
          Creates an instance of FileAction.
 
Method Summary
 void action(ExecutedTask task)
          This will render the reports of the task and save them to the given directory.
 java.lang.String getDateFormat()
          Returns the current date format which will be used to append to the file name.
 java.lang.String[] getErrorMessages()
          Returns an array of error messaged indicating if the file action is valid or not.
 java.lang.String getPath()
          Returns the directory where the rendered reports should be saved.
 boolean isAppendDate()
          Returns whether the current date will be added to the file names of the rendered reports.
 boolean isAppendTime()
          Returns whether the current time will be added to the file names of the rendered reports.
 void setAppendDate(boolean appendDate)
          Set whether the current date should be added to the file names of the rendered reports.
 void setAppendTime(boolean appendTime)
          Set whether the current time should be added to the file names of the rendered reports.
 void setDateFormat(java.lang.String dateFormat)
          Sets the date format which should be used if the date, time or datetime should be appended to the file name.
 void setPath(java.lang.String path)
          Sets the directory where the rendered reports should be saved.
 java.lang.String toString()
          Returns a string representation of this FileAction.
 
Methods inherited from class com.inet.report.schedule.ScheduleAction
getType, isValid
 

Constructor Detail

FileAction

public FileAction()
Creates an instance of FileAction.

Method Detail

setDateFormat

public void setDateFormat(java.lang.String dateFormat)
Sets the date format which should be used if the date, time or datetime should be appended to the file name. If no format is specified then the default format of the locale will be used.
Please note that illegal characters like "*" or "?" will be replaced by "_". The format will be interpreted as a format for the java SimpleDateFormat.

Parameters:
dateFormat - The date format which should be set.
Since:
6.5
See Also:
getDateFormat(), isAppendDate(), isAppendTime()

getDateFormat

public java.lang.String getDateFormat()
Returns the current date format which will be used to append to the file name. This date format will be used if a date or time should be appended to the file name.

Returns:
Current Date Format
Since:
6.5
See Also:
setDateFormat(String), isAppendDate(), isAppendTime()

isAppendDate

public boolean isAppendDate()
Returns whether the current date will be added to the file names of the rendered reports.
Note: This will not have any effect to reports with export format "html".

Returns:
True if the date will be added or false otherwise.
See Also:
setAppendDate(boolean)

setAppendDate

public void setAppendDate(boolean appendDate)
Set whether the current date should be added to the file names of the rendered reports.
Note: This will not have any effect to reports with export format "html".

Parameters:
appendDate - True if the date should be added or false
See Also:
isAppendDate()

isAppendTime

public boolean isAppendTime()
Returns whether the current time will be added to the file names of the rendered reports.
Note: This will not have any effect to reports with export format "html".

Returns:
True if the time will be added or false otherwise.
See Also:
setAppendTime(boolean)

setAppendTime

public void setAppendTime(boolean appendTime)
Set whether the current time should be added to the file names of the rendered reports.
Note: This will not have any effect to reports with export format "html".

Parameters:
appendTime - True if the time should be added or false
See Also:
isAppendTime()

getErrorMessages

public java.lang.String[] getErrorMessages()
Returns an array of error messaged indicating if the file action is valid or not. If an empty array is returned then the file action is valid.
Error messages can be:

Overrides:
getErrorMessages in class ScheduleAction
Returns:
An array of error messages or an empty array.
See Also:
ScheduleAction.isValid()

getPath

public java.lang.String getPath()
Returns the directory where the rendered reports should be saved.

Returns:
The directory where the reports should be saved.
See Also:
setPath(String)

setPath

public void setPath(java.lang.String path)
Sets the directory where the rendered reports should be saved.

Parameters:
path - The directory where the reports should be saved.
See Also:
getPath()

action

public void action(ExecutedTask task)
This will render the reports of the task and save them to the given directory.

Specified by:
action in class ScheduleAction
Parameters:
task - The executed task including all reports which can be executed.

toString

public java.lang.String toString()
Returns a string representation of this FileAction. The string returned will contain the value of the properties path, appendDate and appendTime and any error message of ScheduleAction.getErrorMessages() if available.

Overrides:
toString in class ScheduleAction
Returns:
A string representation of this FileAction.
Since:
6.1

i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH