com.clra.web
Interface IEventList
- All Known Implementing Classes:
- EnrollmentSet, SessionSet
- public interface IEventList
Declares JSP attributes and bean properties for sorted lists of scheduled
events. Views that implement this interface may be controlled via components
such as MonthViewSelector and YearViewSelector.
For Java Server Pages, this interface declares four attributes that should
be set and accessed within the scope of a request or session:
- restricted: is the view restricted to a range of
dates within a particular month and year? [true,false]
- month: if the view is restricted, the month to which
it is restricted. A number between 0 (January) and 11 (December).
- year: if the view is restricted, the year to which
it is restricted. A four-digit year; e.g. 2002.
- comparator: specifies a bean that implements
java.util.Comparator which can compare instances of IScheduled.
The current implementation of MonthViewSelector does not use the value
of this attribute.
For beans, this interface declares five properties:
- restricted: read/write Boolean
- month: read/write Integer, 0 - 11
- year: read/write Integer, four digits
- comparator: read/write java.util.Comparator, compares
instances of IScheduled
- iterator: read-only iterator of IScheduled
instances
- Version:
- $Revision: 1.2 $ $Date: 2002/02/18 18:06:00 $
- Author:
- Rick Hall
Field Summary |
static String |
AN_COMPARATOR
Names an attribute within the scope of an HTTP request or session
that holds a bean which implements java.util.Comparator. |
static String |
AN_ISRESTRICTED
Names an attribute within the scope of an HTTP request or session
whose Boolean value indicates whether a list should be restricted to
events that are scheduled to start within a particular month and year. |
static String |
AN_MONTH
Names an attribute within the scope of an HTTP request or session
whose Integer value indicates the month to which a list should be
restricted. |
static String |
AN_YEAR
Names an attribute within the scope of an HTTP request or session
whose Integer value indicates the year to which a list should be
restricted. |
Method Summary |
ISerializableComparator |
getComparator()
Returns the sort-order that an iterator will use. |
Iterator |
getIterator()
Returns an iterator over a collection of IScheduled beans. |
Integer |
getMonth()
Returns the month to which an iteration is restricted (if it is
restricted). |
Boolean |
getRestricted()
Returns a flag that indicates whether an iterator will be restricted
to events that are scheduled to start within a particular month
and year. |
Integer |
getYear()
Returns the year to which an iteration is restricted (if it is
restricted). |
void |
setComparator(ISerializableComparator comparator)
Sets the sort-order that an iterator will use. |
void |
setMonth(Integer month)
Sets the month to which an iteration is restricted (if it is
restricted). |
void |
setRestricted(Boolean restricted)
Sets whether an iterator will be restricted to events that start
within a particular month and year. |
void |
setYear(Integer year)
Sets the year to which an iteration is restricted (if it is
restricted). |
AN_ISRESTRICTED
public static final String AN_ISRESTRICTED
- Names an attribute within the scope of an HTTP request or session
whose Boolean value indicates whether a list should be restricted to
events that are scheduled to start within a particular month and year.
AN_MONTH
public static final String AN_MONTH
- Names an attribute within the scope of an HTTP request or session
whose Integer value indicates the month to which a list should be
restricted. Valid values are 0 (for January) through 11 (for December).
AN_YEAR
public static final String AN_YEAR
- Names an attribute within the scope of an HTTP request or session
whose Integer value indicates the year to which a list should be
restricted. Values values must have four digits; e.g. "2002".
AN_COMPARATOR
public static final String AN_COMPARATOR
- Names an attribute within the scope of an HTTP request or session
that holds a bean which implements java.util.Comparator.
The comparator must be able to operate on instances of IScheduled.
Current implementations ignore this attribute, but it is reserved for
future enhancements.
getIterator
public Iterator getIterator()
throws WebException
- Returns an iterator over a collection of IScheduled beans.
The behavior of the iterator is specified by setting
restricted, month, year, and
comparator properties before the iterator is requested.
getRestricted
public Boolean getRestricted()
- Returns a flag that indicates whether an iterator will be restricted
to events that are scheduled to start within a particular month
and year. A null value indicates behavior that is
implementation-specific.
setRestricted
public void setRestricted(Boolean restricted)
- Sets whether an iterator will be restricted to events that start
within a particular month and year. A null value specifies
implementation-specific behavior.
getMonth
public Integer getMonth()
- Returns the month to which an iteration is restricted (if it is
restricted). Valid values are 0 (for January) through 11 (for December)
plus null (for the current calendar month).
setMonth
public void setMonth(Integer month)
- Sets the month to which an iteration is restricted (if it is
restricted). Valid values are 0 (for January) through 11 (for December)
plus null (for the current calendar month).
getYear
public Integer getYear()
- Returns the year to which an iteration is restricted (if it is
restricted). Valid values have four digits (e.g. "2002") or are
null (for the current calendar year).
setYear
public void setYear(Integer year)
- Sets the year to which an iteration is restricted (if it is
restricted). Valid values have four digits (e.g. "2002") or are
null (for the current calendar year).
getComparator
public ISerializableComparator getComparator()
- Returns the sort-order that an iterator will use. Valid comparators
must be able to compare instances of IScheduled. A null comparator
indicates the natural sort order of the events will be used.
setComparator
public void setComparator(ISerializableComparator comparator)
- Sets the sort-order that an iterator will use. Valid comparators
must be able to compare instances of IScheduled. A null comparator
indicates the natural sort order of the events will be used.