public class SchedulerEvent extends Object implements Serializable
SchedulerModel
// Scheduler
protected void onConfigure(SchedulerDataSource dataSource)
{
super.onConfigure(dataSource);
Options options = SchedulerDataSource.newSchemaFields();
options.set("id", "{ type: 'string' }"); // override default type for event-id
dataSource.set("schema", String.format("{ model: { fields: %s } }", options));
}
| Constructor and Description |
|---|
SchedulerEvent(Number id,
String title,
Date start)
Constructor
The end date will be the start date + DEFAULT_RANGE hour(s) |
SchedulerEvent(Number id,
String title,
Date start,
Date end)
Constructor
|
SchedulerEvent(Number id,
String title,
long start)
Constructor
The end date will be the start date + DEFAULT_RANGE hour(s) |
SchedulerEvent(Number id,
String title,
long start,
long end)
Constructor
|
SchedulerEvent(Object id,
String title,
Date start)
Constructor
The end date will be the start date + DEFAULT_RANGE hour(s)Caution: if the id is not a number, the datasource's schema need to reflect the type |
SchedulerEvent(Object id,
String title,
Date start,
Date end)
Constructor
Caution: if the id is not a number, the datasource's schema need to reflect the type |
SchedulerEvent(Object id,
String title,
long start)
Constructor
The end date will be the start date + DEFAULT_RANGE hour(s)Caution: if the id is not a number, the datasource's schema need to reflect the type |
SchedulerEvent(Object id,
String title,
long start,
long end)
Constructor
Caution: if the id is not a number, the datasource's schema need to reflect the type |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(ISchedulerVisitor visitor)
Visitor accept method
|
String |
getDescription()
Gets the text description of the scheduler event
|
Date |
getEnd()
Sets the date at which the event ends
|
Set<String> |
getFields()
Gets the event related fields
|
Object |
getId()
Gets the unique identifier of the scheduler event
|
<T> T |
getId(Class<T> type)
Gets the unique identifier of the scheduler event
Caution: not type-safe |
String |
getRecurrenceException()
Gets the recurrence exception
|
String |
getRecurrenceId()
Gets the id of the recurrence parent.
|
String |
getRecurrenceRule()
Gets the recurrence rule which describes the repetition pattern of the event.
|
Date |
getStart()
Sets the date at which the event starts
|
String |
getTitle()
Gets the title of the event which is displayed in the scheduler views
|
Object |
getValue(String field)
Gets a field value
|
Object |
getValue(String field,
Object defaultValue)
Gets a field value
|
boolean |
isAllDay()
Indicates whether the event is "all day" or not
|
static boolean |
isNew(SchedulerEvent event) |
boolean |
isVisible()
Indicates whether the event is visible
If false, it will not be added to the JSON response |
void |
setAllDay(boolean allDay)
Sets if the event is "all day" or not
|
void |
setDescription(String description)
Sets the text description of the scheduler event
|
void |
setEnd(Date date)
Gets the date at which the event ends
|
void |
setEnd(long date)
Gets the date at which the event ends
|
void |
setId(Object id)
Sets the unique identifier of the scheduler event
|
void |
setRecurrenceException(String exception)
Sets the recurrence exception
|
void |
setRecurrenceId(String id)
Sets the id of the recurrence parent.
|
void |
setRecurrenceRule(String rule)
Sets the recurrence rule which describes the repetition pattern of the event.
|
void |
setStart(Date date)
Sets the date at which the event starts
|
void |
setStart(long date)
Sets the date at which the event starts
|
void |
setTitle(String title)
Sets the title of the event which is displayed in the scheduler views
|
void |
setValue(String field,
Object value)
Sets a resource value
|
void |
setVisible(boolean visible)
Sets whether the event is visible
|
String |
toString() |
public SchedulerEvent(Object id, String title, Date start)
DEFAULT_RANGE hour(s)id - the event idtitle - the event titlestart - the start datepublic SchedulerEvent(Object id, String title, long start)
DEFAULT_RANGE hour(s)id - the event idtitle - the event titlestart - the start datepublic SchedulerEvent(Object id, String title, Date start, Date end)
id - the event idtitle - the event titlestart - the start dateend - the end datepublic SchedulerEvent(Object id, String title, long start, long end)
id - the event idtitle - the event titlestart - the start dateend - the end datepublic SchedulerEvent(Number id, String title, Date start)
DEFAULT_RANGE hour(s)id - the event idtitle - the event titlestart - the start datepublic SchedulerEvent(Number id, String title, long start)
DEFAULT_RANGE hour(s)id - the event idtitle - the event titlestart - the start datepublic SchedulerEvent(Number id, String title, Date start, Date end)
id - the event idtitle - the event titlestart - the start dateend - the end datepublic Object getId()
public <T> T getId(Class<T> type)
T - the typetype - the class typepublic void setId(Object id)
id - the idpublic String getTitle()
public void setTitle(String title)
title - the titlepublic String getDescription()
public void setDescription(String description)
description - the descriptionpublic Date getStart()
public void setStart(Date date)
date - the start datepublic void setStart(long date)
date - the start datepublic Date getEnd()
public void setEnd(Date date)
date - the end datepublic void setEnd(long date)
date - the end datepublic boolean isAllDay()
public void setAllDay(boolean allDay)
allDay - true or falsepublic boolean isVisible()
false, it will not be added to the JSON responsetrue or falsepublic void setVisible(boolean visible)
visible - true or falsepublic String getRecurrenceId()
public void setRecurrenceId(String id)
id - the id of the recurrence parentpublic String getRecurrenceRule()
public void setRecurrenceRule(String rule)
rule - the recurrence rulepublic String getRecurrenceException()
public void setRecurrenceException(String exception)
exception - the recurrence exceptionpublic Set<String> getFields()
public final Object getValue(String field)
field - the field (ie: 'resourceId')Objectpublic final Object getValue(String field, Object defaultValue)
field - the field (ie: 'resourceId')defaultValue - the default value to return if the current one is nullObjectpublic final void setValue(String field, Object value)
field - the fieldvalue - the valuepublic final void accept(ISchedulerVisitor visitor)
visitor - the ISchedulerVisitorpublic static boolean isNew(SchedulerEvent event)
Copyright © 2021 7thWeb. All rights reserved.