i-net /// software API
i-net Clear Reports .NET

Package »com.inet.report.schedule«

Interface Summary
DynamicProperties This is the basic interface for classes used to create dynamic property instances for one single report. With such a class you can execute one report multiple times with different parameters. The main idea is that you execute the report with different values for the prompts of the report. Therefore you could load these values from a file or with an sql statement from the database. The DynamicProperties.start method will initialize this class. Here you could load the values from the file or send the sql statement to the database. Then the scheduler will call DynamicProperties.next to see if there are values for the report which will create a new instance of the report. ...
ExecutionTimeProvider This interface defines what functionality a ScheduleExecution object must offer. The core of the object is the function getNextExecutionTime. This function is to return an java.util.Date object defining the exact point in time at which the task is to be executed next. Otherwise, the start date and the end date of the task must be settable and gettable. ...
Class Summary
DailyExecution An ExecutionTimeProvider which can be described in the form "Run the task every ___ days at ____ o'clock." To create a DailyExecution object, use ScheduleExecutionFactory.CreateDailyExecution(java.util.Date,System.Int32,System.Int32,System.Int32) from the class ScheduleExecutionFactory. Once created, you can set the "day step size" (every ___ days), in addition to changing time of day and hour range, methods in the super class ScheduleExecution.
EmailAction This class sends an e-mail if the execution of a task has been finished and it was registered as an action for this task. The e-mail will be send depending on the global properties of the i-net Scheduler. The necessary properties are the following: smtphost - the name of the SMTP host smtpport - the SMTP server port to connect to pop3host - the name of the pop3 host (only needed if pop3 authentication is needed) pop3port - the POP3 server port to connect to user - the name of the user of the e-mail account used for sending password - the password for the e-mail account used for sending sender - the e-mail address of the sender You can set these properties using Scheduler.SetScheduleRuntimeProperty(System.String,System.String). There are additional options you can edit for this e-mail action. You can decide that the rendered report should be attached to the sent e-mail with EmailAction.setAttachReport(System.Boolean). Then you can say that the attached files should be compressed in a zip archive (EmailAction.setZipAttachment(System.Boolean)). ...
ErrorAction This class is an action class representing an action class which could not be loaded at startup of the i-net Scheduler. The class has not been in the class path. To prevent that the action will be lost an instance of this ErrorAction is created which saves all information about the action class which could not be loaded. There is a special handling for this action during saving. ...
ExecutedInstance This class represents an instance of a report which should be executed. The instance is identified by its report properties. Usually you will have only one ExecutedInstacne per ExecutedReport. Only if you defined a DynamicProperties class for a ScheduleReport you can have more than one instance. ...
ExecutedReport This class stores information about a report which should be executed with this task. Usually this report will hold information about one single instance of this report which means that there is only one configuration of the properties for this report which should be executed. If you specified an own instance of DynamicProperties then there can be more than one instance. Each instance should then hold a different combination of report properties (usually different prompt values). ...
ExecutedTask This class stores information about the task which has been executed. You will get all information about the reports and their properties. Therefore this class has a list of all executed reports. ...
FileAction 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.
FtpAction The FtpAction is an enhancement of the FileAction which allows the generated reports to be stored on a FTP server instead of saving them to a local path of the server. The FtpAction will therefore connect to a given server using the set port (by default port 21). After this a log-in will be made with the set user name and password and the directory on the ftp server will be changed to the set path. Then all files of the generated reports will be uploaded to the FTP server. ...
MonthlyExecution An ExecutionTimeProvider which would be described in the form "Run the task in the months ___, ___, and ___ on days _____, ____, and ____ at ____ o'clock." To create a MonthlyExecution object, use ScheduleExecutionFactory.createMonthlyExecution(java.util.Date,System.Int32[],System.Int32[],System.Int32,System.Int32) from the class ScheduleExecutionFactory. Once created, you can set the specific months and the specific days of the month in addition to changing time of day and hour range, methods in the super class ScheduleExecution.
OneDayExecution An ExecutionTimeProvider which can be described in the form "Run the task on this date __/__/____, at ____ o'clock." To create a OneDayExecution object, use ScheduleExecutionFactory.CreateDailyExecution(java.util.Date,System.Int32,System.Int32,System.Int32) from the class ScheduleExecutionFactory. Once created, you can change the time of day and hour range using methods in the super class ScheduleExecution.
PrintAction A ScheduleAction for printing the generated reports of a task to a printer. You can set a number of properties for the printing e.g. if color should be used or not, which quality should be used or the printer resolution. Please have a look at the documentation of these properties to get more details. ...
ScheduleAction This class represents an action which will be done when a task has been executed. There are four actions coming with the i-net Scheduler which will render the reports, send these as e-mail, print on a printer or save in a certain directory on the file system or to a FTP server. You can also overwrite this class to implement an own action. The only necessary method which needs to be overwritten is ScheduleAction.action(com.inet.report.schedule.ExecutedTask). ...
ScheduleException This Exception will be thrown if an error occurs during execution of a scheduled task. There are defined two different types. If a ScheduleException is created without the idle time parameter and thrown, the scheduler should not retry to render the report. ...
ScheduleExecution An abstract implementation of ExecutionTimeProvider, already including time of day information, either of the form "once at __:__" or "every ___ hours starting at __:__ until __ o'clock". The most important methods are for setting the start time or the hour range. Note that these two are exclusive - the one replaces the information set by the other. To create an instance of ScheduleExecution, use the methods in ScheduleExecutionFactory. ...
ScheduleExecution.WeekDay The Weekday: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Day for any day in a month
ScheduleExecution.WeekIndex The WeekIndex for the first, second, third, fourth or last day in a month.
ScheduleExecutionFactory A factory class to create ExecutionTimeProvider objects of the type ScheduleExecution. Use this class to create such objects.
Scheduler The main class of the scheduler package. This class has only one instance, which can be retrieved by the method Scheduler.GetInstance. The scheduler is in charge of executing any number of ScheduleTask for report execution. Each of these tasks contains: A ExecutionTimeProvider defining at what point(s) in time the task is to be executed. Any number of ScheduleReport defining which reports are to be executed and how. Any number of ScheduleAction defining what is to be done when the reports are generated. The scheduler has various settings which can be set using the "set" methods in this class. ...
Scheduler.CustomActionDefinition This class stores information about a custom action. Each custom action registered in the i-net Scheduler is available for all tasks. So a custom action will have a unique name within the scheduler which does not need to be the class name. The information this class holds are the following: name: the unique name for the custom action within the i-net Scheduler classname: the name of the class which is registered as custom action (has to be a sub class of ScheduleAction path: the path of the jar file where the custom action class can be found
Scheduler.DynamicPropertiesDefinition Obsolete This class stores the information about your instances of DynamicProperties classes which can be used in the i-net Scheduler. The information needed for such an instance are the name of the class which should be used and the path which should be added to the class path to find this class.
ScheduleReport This class holds the information about a report which is part of a task. It contains all properties with which the report is executed. It is also possible to register a DynamicProperties class which will create several instances of the report by dynamic report properties at execution.
ScheduleTask An object of this class defines a task - running a report on a specific date or on multiple dates and performing a certain action if the rendering process of the report has been finished successfully. To add a report to this task, use ScheduleTask.AddReport(System.String,java.util.Properties). To add an action to this task, use ScheduleTask.AddAction(com.inet.report.schedule.ScheduleAction). To set the execution time(s) for this task, use the methods in ScheduleExecutionFactory. Example 1 We wish to create a task called "My First Task", which, starting on April 15th, 2005, executes the report "myReport.rpt" as well as exporting it to PS format and and send the exported PostScript file per email to myself@nosuchhost.com. It is to do this every 4 days at 1:12 p.m. Here is the code for accomplishing this: // We start by getting a scheduler object: Scheduler scheduler = Scheduler.getInstance(); // We then create a task by the name "My First Task" and add it to the scheduler: ScheduleTask task = scheduler.addTask( "My First Task" ); //Now we define a report to be executed with this task //To do this, we create a properties object for the report we want to add Properties properties=new Properties(); //each report defined for a task at least needs the property "report" properties.put("report","myReport.rpt"); //Now we add a new report to our task with the properties we set ScheduleReport report=task.addReport("My First Report",properties); //Now we specify that we want the report to be rendered with export format "ps" report.addProperty("export_fmt","ps"); //use property "export_fmt" to specify export format //We now define the action which should be executed after the task has finished EmailAction emailAction = new EmailAction(); emailAction.setTo("myself@nosuchhost.com"); emailAction.setSubject("Some kind of subject line."); emailAction.setMessage("This is the body text of the email which will be sent at report creation."); emailAction.setAttachReport(true); //...then add the action to the task task.addAction(emailAction); // We now set the execution time details of the task - starting on April 15th, every 4 days, at 1:12p.m. ...
ScheduleTask.LastGeneratedReportInstance Contains information about a report that has been rendered and it's files. They can be used to download the report again. One object of this represents one rendered report-instance (there can be more instances of one report with dynamic properties which renders all formats. This object will be stored in prefs with Json. This stores filenames of saved files which has been created by a FileAction or sth similar. This additionally stores a ReportCacheKey, which points to the rendered report.
WeeklyExecution An ExecutionTimeProvider which would be described in the form "Run the task every ___ weeks on _____, ____, and ____ at ____ o'clock." To create a WeeklyExecution object, use ScheduleExecutionFactory.createWeeklyExecution(java.util.Date,System.Int32,System.Int32[],System.Int32,System.Int32) from the class ScheduleExecutionFactory. Once created, you can set the "week step size" (every ___ days) and the specific days of the week (on ___ and ___) in addition to changing time of day and hour range, methods in the super class ScheduleExecution.