|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.schedassist.model.VisibleSchedule
public class VisibleSchedule
Object representation of the merged result of an IScheduleOwner's
AvailableSchedule and their Calendar data (from a ICalendarDataDao).
| Constructor Summary | |
|---|---|
VisibleSchedule(MeetingDurations meetingDurations)
Default constructor. |
|
| Method Summary | |
|---|---|
void |
addFreeBlock(AvailableBlock block)
If the internal map already contains the target block as a key, the existing key is removed and the new block is stored as the key. |
void |
addFreeBlocks(Collection<AvailableBlock> blocks)
Invokes addFreeBlock(AvailableBlock) on each AvailableBlock
in the Collection. |
int |
getAttendingCount()
|
List<AvailableBlock> |
getAttendingList()
|
protected List<AvailableBlock> |
getBlockListForStatus(AvailableStatus targetStatus)
Iterate through the blockMap and return a List of
AvailableBlocks that match the target AvailableStatus. |
SortedMap<AvailableBlock,AvailableStatus> |
getBlockMap()
|
int |
getBusyCount()
|
List<AvailableBlock> |
getBusyList()
|
net.fortuna.ical4j.model.Calendar |
getCalendar()
Convenience method to generate an ical4j Calendar from
the AvailableBlocks stored in this instance. |
protected int |
getCountForStatus(AvailableStatus targetStatus)
Iterate through the blockMap and return a count of AvailableBlocks that match the target AvailableStatus. |
int |
getFreeCount()
|
List<AvailableBlock> |
getFreeList()
|
Date |
getScheduleEnd()
Return the endTime of the last AvailableBlock stored
within this object, or null if this object
is empty. |
Date |
getScheduleStart()
Return the startTime of the first AvailableBlock
stored within this object, or null if this object
is empty. |
int |
getSize()
|
protected Set<AvailableBlock> |
locateConflicting(AvailableBlock conflict)
Returns the set of AvailableBlock objects within this instance
that conflict with the argument. |
void |
overwriteFreeBlockOnlyIfPresent(AvailableBlock block)
If the internal map already contains the target block as a key, remove the existing and store the argument in its place. |
void |
setAttendingBlock(AvailableBlock block)
ONLY stores the block in the map if conflicting FREE blocks are already stored in the block. |
void |
setAttendingBlocks(Collection<AvailableBlock> blocks)
|
void |
setBusyBlock(AvailableBlock block)
ONLY stores the block in the map if conflicting FREE blocks are already stored in the block. |
void |
setBusyBlocks(Collection<AvailableBlock> blocks)
|
VisibleSchedule |
subset(Date start,
Date end)
This method returns a subset of this VisibleSchedule including
only blocks between start and end, inclusive. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VisibleSchedule(MeetingDurations meetingDurations)
| Method Detail |
|---|
public void addFreeBlock(AvailableBlock block)
AvailableStatus.FREE.
block - public void overwriteFreeBlockOnlyIfPresent(AvailableBlock block)
block - public void addFreeBlocks(Collection<AvailableBlock> blocks)
addFreeBlock(AvailableBlock) on each AvailableBlock
in the Collection.
blocks - public void setBusyBlock(AvailableBlock block)
block - public void setBusyBlocks(Collection<AvailableBlock> blocks)
blocks - public void setAttendingBlock(AvailableBlock block)
block - public void setAttendingBlocks(Collection<AvailableBlock> blocks)
blocks - public SortedMap<AvailableBlock,AvailableStatus> getBlockMap()
public int getSize()
public int getFreeCount()
public int getBusyCount()
public int getAttendingCount()
public List<AvailableBlock> getFreeList()
List of AvailableBlock in this VisibleSchedule that are AvailableStatus.FREEpublic List<AvailableBlock> getBusyList()
List of AvailableBlock in this VisibleSchedule that are AvailableStatus.BUSYpublic List<AvailableBlock> getAttendingList()
List of AvailableBlock in this VisibleSchedule that are AvailableStatus.ATTENDINGpublic Date getScheduleStart()
AvailableBlock
stored within this object, or null if this object
is empty.
public Date getScheduleEnd()
AvailableBlock stored
within this object, or null if this object
is empty.
public net.fortuna.ical4j.model.Calendar getCalendar()
Calendar from
the AvailableBlocks stored in this instance.
The VEvents are very rudimentary, simply defining
the start date, end date, and have an event title that matches
the status (and number of attendees if visitorLimit is > 1).
Calendar of free/busy/attending events from this instance
public VisibleSchedule subset(Date start,
Date end)
VisibleSchedule including
only blocks between start and end, inclusive.
start - end -
protected Set<AvailableBlock> locateConflicting(AvailableBlock conflict)
AvailableBlock objects within this instance
that conflict with the argument.
A conflict is defined as any overlap of 1 minute or more.
conflict -
protected int getCountForStatus(AvailableStatus targetStatus)
AvailableBlocks that match the target AvailableStatus.
targetStatus -
protected List<AvailableBlock> getBlockListForStatus(AvailableStatus targetStatus)
List of
AvailableBlocks that match the target AvailableStatus.
targetStatus -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||