public class Schedules extends java.lang.Object implements RBEConfigObject, java.lang.Cloneable
Schedule
and PeriodGroup
objects.
The PeriodGroup is referenced in a Schedules using a PeriodGroupReference
.
Unlike rulebases,
All the schedules which is used by the TIBCO Hawk Agent is kept in a single file instead of
individual files as in the case of rulebases.
The Agent transfer the entire list of Schedule objects in a Schedules to and
from a Console API application.
For example to retrieve and send a Schedules to and from an agent, see
SchedulesXML
.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FILE_EXTENSION
The default file extension of a schedule file.
|
static java.lang.String |
SchedulesFileName
The file name of a schedule file.
|
static java.lang.String |
SchedulesName
The default name of a schedules.
|
Constructor and Description |
---|
Schedules()
Creates a Schedules.
|
Schedules(java.io.Reader reader)
Creates a Schedules from the reader.
|
Schedules(Schedule[] schedules)
Creates a Schedules with the specifed name and list of schedules.
|
Schedules(java.lang.String name)
Deprecated.
|
Schedules(java.util.Vector schedules)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addPeriodGroup(PeriodGroup periodGroup)
Adds a period group to the current list of PeriodGroup in this Schedules.
|
void |
addSchedule(Schedule schedule)
Adds a schedule to the current list of schedules.
|
java.lang.Object |
clone()
Returns a copy of this Schedules object
|
boolean |
equals(java.lang.Object o)
Compares the specified Schedules objects for equality.
|
void |
fromXML(java.io.Reader reader)
Deprecated.
|
Attributes |
getAttributes()
Returns the attributes for this Schedules.
|
java.lang.String |
getAuthor()
Deprecated.
|
long |
getChecksum()
Returns the checksum value of this Schedules object.
|
java.lang.String |
getComment()
Deprecated.
|
java.lang.String |
getFileExtension()
Returns file extension based on the schedules.
|
java.lang.String |
getLastModification()
Deprecated.
|
java.lang.String |
getName()
Returns the Schedules name.
|
PeriodGroup |
getPeriodGroup(java.lang.String name)
Returns a PeriodGroup of the specified name.
|
PeriodGroup[] |
getPeriodGroups()
Returns a list of PeriodGroup in this Schedules.
|
Schedule |
getSchedule(java.lang.String name)
Returns a schedule of the specified name.
|
java.lang.String[] |
getScheduleNames()
Deprecated.
|
Schedule[] |
getSchedules()
Returns a list of schedules.
|
java.util.Vector |
getSchedulesAsVector()
Deprecated.
|
java.lang.String |
getScheduleUsingPeriodGroup(java.lang.String periodGroupName)
Gets the schedule that uses the specified PeriodGroup.
|
static Schedules |
load(java.lang.String filename)
Deprecated.
|
static void |
loadFromFile(java.lang.String path)
Deprecated.
|
void |
removePeriodGroup(PeriodGroup periodGroup)
Removes a period group from the current list of PeriodGroup in this Schedules.
|
void |
removeSchedule(Schedule schedule)
Deprecated.
|
void |
removeSchedule(java.lang.String name)
Removes a schedule from the current list of schedules.
|
void |
renamePeriodGroup(java.lang.String oldName,
java.lang.String newName)
Renames a PeriodGroup.
|
void |
saveToFile(java.lang.String filename)
Deprecated.
|
void |
setAttributes(Attributes attributes)
Sets the attributes for this Schedules.
|
void |
setAuthor(java.lang.String author)
Deprecated.
|
void |
setComment(java.lang.String comment)
Deprecated.
|
void |
setLastModification(java.lang.String lastModification)
Deprecated.
|
void |
setPeriodGroups(PeriodGroup[] periodGroups)
Replaces a list of PeriodGroup in this Schedules with the specified list.
|
void |
setSchedules(Schedule[] schedules)
Replaces the list of schedules with the specified list.
|
void |
setSchedules(java.util.Vector v)
Deprecated.
|
java.lang.String |
toString()
Returns the string representation of the Schedules object.
|
java.lang.String |
toXML()
Deprecated.
|
void |
toXML(java.io.Writer writer)
Writes the Schedules object to Writer in XML format.
|
public static final java.lang.String FILE_EXTENSION
public static java.lang.String SchedulesName
public static java.lang.String SchedulesFileName
public Schedules()
public Schedules(java.lang.String name)
name
- Schedules namepublic Schedules(java.util.Vector schedules)
schedules
- a list of schedule.public Schedules(Schedule[] schedules)
schedules
- a list of schedule.java.lang.IllegalArgumentException
- if schedules is nullpublic Schedules(java.io.Reader reader) throws ScheduleException
Schedules schedules = new Schedules(aScheduleXML.getXMLReader());
reader
- a reader which contain the schedule in XML format.ScheduleException
- if not able to create schedules from the reader.public java.lang.String getFileExtension()
getFileExtension
in interface RBEConfigObject
public java.util.Vector getSchedulesAsVector()
public Schedule[] getSchedules()
public void setSchedules(Schedule[] schedules)
java.lang.IllegalArgumentException
- if schedules is nullpublic void setSchedules(java.util.Vector v)
public Schedule getSchedule(java.lang.String name)
public PeriodGroup[] getPeriodGroups()
public void setPeriodGroups(PeriodGroup[] periodGroups)
periodGroups
- the new period groups for this Schedules.java.lang.IllegalArgumentException
- if schedules is nullpublic void addPeriodGroup(PeriodGroup periodGroup)
periodGroup
- period group to be added.java.lang.IllegalArgumentException
- if periodGroup is nullpublic void renamePeriodGroup(java.lang.String oldName, java.lang.String newName)
If the PeriodGroup to be renamed is referenced by a schedule, the schedule will be updated to used the new PeriodGroup name.
public void removePeriodGroup(PeriodGroup periodGroup)
periodGroup
- period group to be removed.java.lang.IllegalArgumentException
- if periodGroupName is null or use by a schedule.public PeriodGroup getPeriodGroup(java.lang.String name)
public java.lang.String getScheduleUsingPeriodGroup(java.lang.String periodGroupName)
public java.lang.String getName()
getName
in interface RBEConfigObject
public void setAuthor(java.lang.String author)
name
- name of the author.public void setLastModification(java.lang.String lastModification)
lastModification
- timeStamp of the last modification.
public void setComment(java.lang.String comment)
comment
- text for the comment.
public java.lang.String getAuthor()
public java.lang.String getLastModification()
public java.lang.String getComment()
public void setAttributes(Attributes attributes)
java.lang.IllegalArgumentException
- if attributes is nullpublic Attributes getAttributes()
public void addSchedule(Schedule schedule)
schedule
- schedule to be added.java.lang.IllegalArgumentException
- if schedule is nullpublic void removeSchedule(Schedule schedule)
schedule
- schedule to be removed.java.lang.IllegalArgumentException
- if schedule is nullpublic void removeSchedule(java.lang.String name)
public java.lang.String[] getScheduleNames()
public java.lang.String toXML()
fromXML.
public void toXML(java.io.Writer writer) throws RBEConfigObjectException
toXML
in interface RBEConfigObject
writer
- the writer where the XML output will be written.RBEConfigObjectException
public void fromXML(java.io.Reader reader) throws ScheduleException
reader
- the reader where the XML output will be read.ScheduleException
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- Schedules to be comparedpublic java.lang.String toString()
toString
in class java.lang.Object
public long getChecksum()
getChecksum
in interface RBEConfigObject
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public static void loadFromFile(java.lang.String path) throws RBEConfigObjectException
path
- the full path name of the file to loadRBEConfigObjectException
public void saveToFile(java.lang.String filename) throws RBEConfigObjectException
filename
- a fully qualify file name.RBEConfigObjectException
- if I/O error occurs.public static Schedules load(java.lang.String filename) throws RBEConfigObjectException
filename
- filenameRBEConfigObjectException
Copyright © 2000-2019 TIBCO Inc. All Rights Reserved.