public class ScheduleEventPrecondViolation extends java.lang.Exception implements PrecondViolation
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
alreadyScheduledMessage
Error message for event of same date,title already scheduled
|
protected java.lang.String |
emptyTitleMessage
Error message for empty title
|
protected java.util.ArrayList |
errors
List of current error messages
|
protected java.lang.String |
invalidCategoryMessage
Error message for invalid category
|
protected java.lang.String |
invalidEndDateMessage
Error message for invalid end date
|
protected java.lang.String |
invalidStartDateMessage
Error message for invalid start date
|
protected java.lang.String |
noActiveCalendarMessage
Error message for no currently active calendar in the workspace
|
protected int |
numErrors
Error message count
|
protected java.lang.String |
outOfMemoryMessage
Error message for out of memory, so no space left in calendar
|
| Constructor and Description |
|---|
ScheduleEventPrecondViolation()
Construct this by initializing the error message list to an empty list,
initializing the numErrors count to 0, and initializing local copies of
the error message text for each of the possible errors from
Schedule.scheduleEvent.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
anyErrors()
Return true if any errors have been set.
|
void |
clear()
Clear all error messages.
|
java.lang.String[] |
getErrors()
Return the error list.
|
int |
numberOfErrors()
Return the number of errors.
|
void |
setAlreadyScheduledError()
Set the already scheduled error message.
|
void |
setEmptyTitleError()
Set the empty title error message.
|
void |
setInvalidEndDateError()
Set the invalid end date error message.
|
void |
setInvalidStartDateError()
Set the invalid start date error message.
|
void |
setNoActiveCalendarError()
Set the no active calendar error message.
|
protected java.util.ArrayList errors
protected int numErrors
protected java.lang.String emptyTitleMessage
protected java.lang.String alreadyScheduledMessage
protected java.lang.String invalidStartDateMessage
protected java.lang.String invalidEndDateMessage
protected java.lang.String invalidCategoryMessage
protected java.lang.String noActiveCalendarMessage
protected java.lang.String outOfMemoryMessage
public ScheduleEventPrecondViolation()
public java.lang.String[] getErrors()
getErrors in interface PrecondViolationpublic void clear()
clear in interface PrecondViolationpublic boolean anyErrors()
anyErrors in interface PrecondViolationpublic int numberOfErrors()
numberOfErrors in interface PrecondViolationpublic void setEmptyTitleError()
public void setAlreadyScheduledError()
public void setInvalidStartDateError()
public void setInvalidEndDateError()
public void setNoActiveCalendarError()