|
||||||||||
| 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.TimeInfoMonth
public class TimeInfoMonth
The TimeInfoMonth class represents time information pertaining to scheduled
reports that run in intervals of months. Like all time-related classes in ReportCaster
it is ultimately derived from the TimeInfo class.
The code snippet below illustrates the use of this class:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2006 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. +
+ +
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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 TimeInfoMonth
TimeInfoMonth timeInfo = new TimeInfoMonth();
GregorianCalendar startTime = new GregorianCalendar();
timeInfo.setStartTime(startTime);
GregorianCalendar endTime = new GregorianCalendar();
endTime.add(Calendar.MONTH, 4);
timeInfo.setEndTime(endTime);
timeInfo.setFrequency(1);
boolean[] days = new boolean[]
{false, true, false, true, false, true, false,
false, true, false, true, false, true, false,
false, true, false, true, false, true, false,
false, true, false, true, false, true, false,
false, false, false,};
timeInfo.setDaysOfMonth(days);
timeInfo.setLastDayOfMonth(true);
schedule.setTimeInfo(timeInfo);
//subscribe schedule
manager.addSchedule(schedule);
| Field Summary | |
|---|---|
static int |
LAST_WEEK_OF_MONTH
|
| Fields inherited from class ibi.broker.api.data.schedule.TimeInfo |
|---|
CUSTOM, DAY, description, HOUR, id, MINUTE, MONTH, name, ONCE, WEEK, YEAR |
| Constructor Summary | |
|---|---|
TimeInfoMonth()
|
|
| Method Summary | |
|---|---|
int |
getDayOfWeek()
|
boolean[] |
getDaysOfMonth()
Obtains a 31 element array of booleans indicating which days of the month have been selected for a report to run. |
java.util.Calendar |
getEndTime()
Obtains a Java Calendar Object indicating the end time for the schedule associated with the this TimeInfoMonth instance. |
int |
getFrequency()
Obtains the frequency for a scheduled distribution. |
TimeInterval |
getSecondaryRunInterval()
|
int |
getWeekOfMonth()
|
boolean |
isDayOfWeekEnabled()
|
boolean |
isLastDayOfMonth()
Obtains a boolean indicating whether or not the last day of the month flag is set. |
void |
setDayOfWeek(int dayOfWeek)
|
void |
setDayOfWeekEnabled(boolean dayOfWeekEnabled)
|
void |
setDaysOfMonth(boolean[] daysOfMonth)
Assigns a 31 element array of booleans indicating which days of the month have been selected for a report to run. |
void |
setEndTime(java.util.Calendar endTime)
Assigns a Java Calendar Object indicating the end time for the schedule associated with this TimeInfoMonth instance. |
void |
setFrequency(int frequency)
Assigns the frequency for a scheduled distribution. |
void |
setLastDayOfMonth(boolean lastDayOfMonth)
Assigns a boolean indicating whether or not the last day of the month flag is set. |
void |
setSecondaryRunInterval(TimeInterval secondaryRunInterval)
|
void |
setWeekOfMonth(int weekOfMonth)
|
| 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 |
| Field Detail |
|---|
public static final int LAST_WEEK_OF_MONTH
| Constructor Detail |
|---|
public TimeInfoMonth()
| Method Detail |
|---|
public boolean[] getDaysOfMonth()
setDaysOfMonth(boolean[] daysOfMonth)public void setDaysOfMonth(boolean[] daysOfMonth)
daysOfMonth - An array of booleans representing the days of the month.getDaysOfMonth()public java.util.Calendar getEndTime()
setEndTime(Calendar endTime)public void setEndTime(java.util.Calendar endTime)
endTime - A Calendar object representing the schedule's end time.getEndTime()public int getFrequency()
setFrequency(int frequency)public void setFrequency(int frequency)
frequency - An integer representing the frequency.getFrequency()public boolean isLastDayOfMonth()
setLastDayOfMonth(boolean lastDayOfMonth)public void setLastDayOfMonth(boolean lastDayOfMonth)
lastDayOfMonth - The lastDayOfMonth to set.isLastDayOfMonth()public TimeInterval getSecondaryRunInterval()
public void setSecondaryRunInterval(TimeInterval secondaryRunInterval)
public int getDayOfWeek()
public void setDayOfWeek(int dayOfWeek)
dayOfWeek - The dayOfWeek to set.public boolean isDayOfWeekEnabled()
public void setDayOfWeekEnabled(boolean dayOfWeekEnabled)
dayOfWeekEnabled - The dayOfWeekEnabled to set.public int getWeekOfMonth()
public void setWeekOfMonth(int weekOfMonth)
weekOfMonth - The weekOfMonth to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||