|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectibi.broker.api.data.schedule.TimeInfo
ibi.broker.api.data.schedule.TimeInfoMinute
public class TimeInfoMinute
The TimeInfoMinute class represents time information pertaining to scheduled
reports that run in intervals of minutes. Like all time-related classes in ReportCaster
it is derived from the TimeInfo class.
A code example illustrating the use of this class is below. It is taken from the samples
packaged with the product.
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2004 Information Builders, Inc. All Rights Reserved. +
+ +
+ Information Builders offers sample API programs as a heuristic device. +
+ They are not intended, as is, for production use. Licensed users are +
+ welcome to alter and extend these samples and deploy them in other +
+ environments, or alternate configurations, as they see fit. +
+ Information Builders will support the documented functionality of +
+ its API classes and methods. However, Information Builders is not +
+ responsible for functionality or behavior of products built with +
+ its API unless the documented behavior of its discrete classes and +
+ methods is different than the actual results. +
+ +
+ Redistributions of IBI source code and documentation must be within +
+ the scope of the Information Builders Software License Agreement. +
+ +
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
public class S05_Add_TimeInfo
{
public S05_Add_TimeInfo(String[] arg) throws Exception
{
// Example of arg
// scheduleDescription car execid execpass
//
//Example of Report source
//TABLE FILE CAR
//PRINT CAR WHERE
//COUNTRY EQ 'ENGLAND'
//END
//
String scheduleDescription = arg[0];
String fexFileName = arg[1];
String execId = arg[2];
String execPassword = arg[3];
// Create ScheduleManager
ScheduleManager manager = Util.createCasterConnection().getScheduleManager();
//create object schedule with default values from config file
Schedule schedule = manager.createScheduleInstanceDefault();
//set description
schedule.setDescription(scheduleDescription);
//set distribution to library
Distribution distribution = new StorageLibrary();
schedule.setDistribution(distribution);
//create task
TaskWFServerProcedure task = new TaskWFServerProcedure();
task.setProcedureName(fexFileName);
task.setExecId(execId);
task.setExecPassword(execPassword);
schedule.setTaskList(new Task[]{task});
//create TimeInfoMinute
TimeInfoMinute timeInfo = new TimeInfoMinute();
GregorianCalendar startTime = new GregorianCalendar();
timeInfo.setStartTime(startTime);
GregorianCalendar endTime = new GregorianCalendar();
endTime.add(Calendar.MINUTE, 15);
timeInfo.setEndTime(endTime);
timeInfo.setFrequency(1);
timeInfo.setMonday(true);
timeInfo.setTuesday(true);
timeInfo.setWednesday(true);
timeInfo.setThursday(true);
timeInfo.setFriday(true);
timeInfo.setSaturday(true);
timeInfo.setSunday(true);
schedule.setTimeInfo(timeInfo);
//subscribe schedule
manager.addSchedule(schedule);
}
public static void main(String[] arg)
{
S05_Add_TimeInfo sampl = null;
if(arg.length < 4) {
menu();
return;
}
try
{
System.out.println("\n******* " + S05_Add_TimeInfo.class.getName() + " *****************");
sampl = new S05_Add_TimeInfo(arg);
System.out.println("\n" + sampl.getClass().getName() + " OK");
}
catch(Exception ce)
{
ce.printStackTrace();
System.out.println(sampl.getClass().getName() + " FAIL");
}
}
private static void menu()
{
System.out.println("Usage: java " + S05_Add_TimeInfo.class.getName() + " <scheduleDescription> <fexFileName> <execId> <execPassword>");
}
}
| Field Summary |
|---|
| Fields inherited from class ibi.broker.api.data.schedule.TimeInfo |
|---|
CUSTOM, DAY, description, HOUR, id, MINUTE, MONTH, name, ONCE, WEEK, YEAR |
| Constructor Summary | |
|---|---|
TimeInfoMinute()
|
|
| Method Summary | |
|---|---|
java.util.Calendar |
getEndTime()
Obtains a Java Calendar Object indicating the end time for a ReportCaster schedule. |
int |
getFrequency()
Obtains the frequency of a ReportCaster schedule as an integer, in minutes. |
boolean |
isFriday()
Obtains a boolean indicating whether or not the ReportCaster job is scheduled for a Friday. |
boolean |
isMonday()
Obtains a boolean indicating whether or not the ReportCaster job is scheduled for a Monday. |
boolean |
isSaturday()
Obtains a boolean indicating whether or not the ReportCaster job is scheduled for a Saturday. |
boolean |
isSunday()
Obtains a boolean indicating whether or not the ReportCaster job is scheduled for a Sunday. |
boolean |
isThursday()
Obtains a boolean indicating whether or not the ReportCaster job is scheduled for a Thursday. |
boolean |
isTuesday()
Obtains a boolean indicating whether or not the ReportCaster job is scheduled for a Tuesday. |
boolean |
isWednesday()
Obtains a boolean indicating whether or not the ReportCaster job is scheduled for a Wednesday. |
void |
setEndTime(java.util.Calendar endTime)
Assigns a Java Calendar Object indicating the end time for a ReportCaster schedule. |
void |
setFrequency(int frequency)
Assigns the frequency for a scheduled event, in minutes. |
void |
setFriday(boolean friday)
Assigns a boolean indicating whether or not the ReportCaster job is scheduled for a Friday. |
void |
setMonday(boolean monday)
Assigns a boolean indicating whether or not the ReportCaster job is scheduled for a Monday. |
void |
setSaturday(boolean saturday)
Assigns a boolean indicating whether or not the ReportCaster job is scheduled for a Saturday. |
void |
setSunday(boolean sunday)
Assigns a boolean indicating whether or not the ReportCaster job is scheduled for a Sunday. |
void |
setThursday(boolean thursday)
Assigns a boolean indicating whether or not the ReportCaster job is scheduled for a Thursday. |
void |
setTuesday(boolean tuesday)
Assigns a boolean indicating whether or not the ReportCaster job is scheduled for a Tuesday. |
void |
setWednesday(boolean wednesday)
Assigns a boolean indicating whether or not the ReportCaster job is scheduled for a Wednesday. |
| Methods inherited from class ibi.broker.api.data.schedule.TimeInfo |
|---|
getDescription, getId, getName, getNextRunTime, getStartTime, setDescription, setId, setName, setNextRunTime, setStartTime |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TimeInfoMinute()
| Method Detail |
|---|
public java.util.Calendar getEndTime()
setEndTime(Calendar)public void setEndTime(java.util.Calendar endTime)
endTime - The end time as a Calendar.getEndTime()public int getFrequency()
setFrequency(int)public void setFrequency(int frequency)
frequency - An integer indicating the frequency.getFrequency()public boolean isFriday()
setFriday(boolean)public void setFriday(boolean friday)
friday - a boolean indicating whether the job is scheduled for a Friday.isFriday()public boolean isMonday()
setFriday(boolean)public void setMonday(boolean monday)
monday - a boolean indicating whether the job is scheduled for Monday.isMonday()public boolean isSaturday()
setSaturday(boolean)public void setSaturday(boolean saturday)
saturday - a boolean indicating whether or not the job is scheduled for a Saturday.isSaturday()public boolean isSunday()
setSunday(boolean)public void setSunday(boolean sunday)
sunday - a boolean indicating whether the job is scheduled for Sunday.isSunday()public boolean isTuesday()
setTuesday(boolean)public void setTuesday(boolean tuesday)
tuesday - a boolean indicating whether the job is scheduled for Tuesday.isTuesday()public boolean isWednesday()
setWednesday(boolean)public void setWednesday(boolean wednesday)
wednesday - a boolean indicating whether the job is scheduled for Wednesday.isWednesday()public boolean isThursday()
setThursday(boolean)public void setThursday(boolean thursday)
thursday - a boolean indicating whether the job is scheduled for Thursday.isThursday()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||