public interface CalendarEntry
CalendarEntry
is a BBj Interface that contains information for a BBjCalendarWidget's entry (event, appointment, etc.).
Note: The values for date/time parameters should be in ISO 8601 format as in:
YYYY-MM-DD
, e.g. "1997-07-16" for dates.YYYY-MM-DDThh:mm:ss
, e.g. "1997-07-16T19:20:00" for dates and times.YYYY-MM-DDThh:mm:ssZ
, e.g. "1997-07-16T19:20:00-06:00" for dates and times with timezone information.Modifier and Type | Method and Description |
---|---|
void |
addClassName(BBjString className!)
Adds the provided class name string (or CSS style) such as
"myclass1" to the entry's vector of class names. |
void |
addExtendedProperty(BBjString key!,
BBjString value!)
Adds the provided extended property to the entry's HashMap of extended properties given the property key and value.
|
void |
addTag(BBjString tag!)
Adds the provided tag to the entry's vector of tags.
|
static BBjString |
CALENDAR_ENTRY_DISPLAY_AUTO()
When in daygrid view, it renders the entry as a solid rectangle if it is all-day or multi-day.
|
static BBjString |
CALENDAR_ENTRY_DISPLAY_BACKGROUND()
This modifies the background of the entry's date/time frame in the calendar.
|
static BBjString |
CALENDAR_ENTRY_DISPLAY_BLOCK()
When in daygrid view, it renders the entry as a solid rectangle.
|
static BBjString |
CALENDAR_ENTRY_DISPLAY_INVERSE_BACKGROUND()
This inversely modifies the background of the entry's date/time frame in the calendar.
|
static BBjString |
CALENDAR_ENTRY_DISPLAY_LIST_ITEM()
When in daygrid view, it renders the entry as a colored dot.
|
static BBjString |
CALENDAR_ENTRY_DISPLAY_NONE()
This hides the entry on the calendar.
|
BBjNumber |
containsAllTags(BBjString tags!)
Returns whether a
CalendarEntry contains all the provided tags in comma-delimted string in the entry's vector of tags. |
BBjNumber |
containsAllTags(BBjVector tags!)
Returns whether an entry contains all the provided tags in the entry's vector of tags.
|
BBjNumber |
containsAnyTag(BBjString tags!)
Returns whether an entry contains any of the provided tags in the entry's vector of tags.
|
BBjNumber |
containsAnyTag(BBjVector tags!)
Returns whether an entry contains any of the provided tags in the entry's vector of tags.
|
BBjNumber |
containsExtendedPropertyKey(BBjString key!)
Returns whether the provided extended property key exists the entry's HashMap of extended properties.
|
BBjNumber |
containsTag(BBjString tag!)
Returns whether the provided tag exists the entry's vector of tags.
|
BBjNumber |
getAllDay()
Returns an entry's all-day status that determines if the entry is shown in the "all-day" section of the view, if applicable.
|
BBjString |
getAsFormattedString()
Returns a formatted, i.e.
|
JsonObject |
getAsJsonObject()
Returns a JsonObject representation of the
CalendarEntry object. |
BBjString |
getAsString()
Returns a stringified JsonObject representation of the
CalendarEntry object. |
BBjString |
getBackgroundColor()
Returns an entry's background color.
|
BBjString |
getBorderColor()
Returns an entry's border color.
|
BBjString |
getClassName()
Deprecated.
Deprecated in BBj 21.12 because this only supports a single class name and the class has methods that support mutliple class names. Please use the
getClassNames() method instead. |
BBjVector |
getClassNames()
Returns an entry's class names (or CSS styles) in a vector of strings.
|
BBjString |
getColor()
Returns an entry's combined background and border color, or null if the
CalendarEvent object was provided
by the FullCalendar. |
BBjString |
getDescription()
Returns an entry's extended information that can be used to further describe the entry beyond the title text.
|
BBjString |
getDisplay()
Returns an entry's display style.
|
BBjNumber |
getEnableDurationEditable()
Returns the entry's duration editable status that determines if the entry's duration can be modified by the user by dragging (resizing).
|
BBjNumber |
getEnableEditable()
Returns the entry's editable status that determines if the entry can be modified by the user.
|
BBjNumber |
getEnableEntryOverlap()
Returns an entry's overlap status that determines if the entries may be dragged/resized over one another.
|
BBjNumber |
getEnableStartEditable()
Returns the entry's start time editable status that determines if the entry's start time can be modified by the user by dragging (resizing).
|
BBjString |
getEnd()
Returns an entry's exclusive ending date/time.
|
HashMap |
getExtendedProperties()
Returns an entry's custom key/value string pairs that define the entry's custom properties
|
BBjString |
getExtendedPropertyValue(BBjString key!)
Returns the value of the provided extended property if the key exists in the entry's HashMap of extended properties.
|
BBjString |
getGroupId()
Returns an entry's group ID.
|
BBjString |
getId()
Returns an entry's unique ID if it has previously been set.
|
BBjString |
getLocation()
Returns an entry's extended information that can be used to further describe the entry beyond the title text.
|
BBjString |
getStart()
Returns an entry's starting date/time.
|
BBjVector |
getTags()
Returns an entry's tags in a vector of strings.
|
BBjString |
getTextColor()
Returns an entry's text color.
|
BBjString |
getTitle()
Returns an entry's optional unique ID if it has previously been set.
|
BBjString |
getUrl()
Returns an entry's associated URL that may be visited when this entry is clicked by the user.
|
BBjString |
getUuid()
Returns an entry's unique UUID that is automatically generated for all entries.
|
void |
removeClassName(BBjString className!)
Removes the provided class name string (or CSS style) from the entry's vector of class names.
|
void |
removeExtendedProperty(BBjString key!)
Removes the extended property from the entry's HashMap of extended properties given the property key.
|
void |
removeTag(BBjString tag!)
Removes the provided tag from the entry's vector of tags.
|
void |
setAllDay(BBjNumber allDay!)
Sets an entry's all-day status that determines if the entry is shown in the "all-day" section of the view, if applicable.
|
void |
setBackgroundColor(BBjString backgroundColor!)
Sets an entry's background color.
|
void |
setBorderColor(BBjString borderColor!)
Sets an entry's border color.
|
void |
setClassName(BBjString className!)
Deprecated.
Deprecated in BBj 21.12 because this only supports a single class name and the class has methods that support mutliple class names. Please use the either the
setClassNames(BBjVector) or setClassNames(BBjString) method instead. |
void |
setClassNames(BBjString classNames!)
Sets an entry's class names (or CSS styles) from a comma-delimited string that determine the HTML class that's associated with the entry.
|
void |
setClassNames(BBjVector classNames!)
Sets an entry's class names (or CSS styles) from a BBjVector that determine the HTML class that's associated with the entry.
|
void |
setColor(BBjString color!)
Sets an entry's combined background and border color.
|
void |
setColors(BBjString backgroundColor!,
BBjString borderColor!,
BBjString textColor!)
A convenience method that sets an entry's background, border, and text colors in a single method call.
|
void |
setDescription(BBjString description!)
Sets an entry's extended information that can be used to further describe the entry beyond the title text.
|
void |
setDisplay(BBjString display!)
Sets an entry's alternate rendering style.
|
void |
setEnableDurationEditable(BBjNumber durationEditable!)
Sets an entry's duration editable status that determines if the entry's duration can be modified by the user by dragging (resizing).
|
void |
setEnableEditable(BBjNumber editable!)
Sets an entry's editable status that determines if the user can modify the entry, i.e.
|
void |
setEnableEntryOverlap(BBjNumber overlap!)
Sets an entry's overlap status that determines if the entries may be dragged/resized over one another.
|
void |
setEnableStartEditable(BBjNumber startEditable!)
Sets an entry's start time editable status that determines if the entry's start time can be modified by the user by dragging (resizing).
|
void |
setEnd(BBjString end!)
Sets an entry's exclusive ending date/time.
|
void |
setExtendedProperties(HashMap extendedProperties!)
Sets an entry's extended properties, i.e.
|
void |
setGroupId(BBjString groupId!)
Sets an entry's group ID.
|
void |
setId(BBjString id!)
Sets an entry's optional unique ID that can be used later to identify the entry.
|
void |
setLocation(BBjString location!)
Sets an entry's location that can be used to define a location for the entry.
|
void |
setStart(BBjString start!)
Sets an entry's starting date/time.
|
void |
setTags(BBjString tags!)
Sets an entry's tags that can be used for a variety of purposes such as hiding or showing entries based on given tags.
|
void |
setTags(BBjVector tags!)
Sets an entry's tags that can be used for a variety of purposes such as hiding or showing entries based on given tags.
|
void |
setTextColor(BBjString textColor!)
Sets an entry's text color.
|
void |
setTitle(BBjString title!)
Sets entry's title that is the description/summary text that will appear on an entry.
|
void |
setUrl(BBjString url!)
Sets an entry's associated URL that may be visited when this entry is clicked by the user.
|
static BBjString CALENDAR_ENTRY_DISPLAY_AUTO()
When in daygrid view, it renders the entry as a solid rectangle if it is all-day or multi-day. If it's a timed entry, it renders the entry as a colored a dot. When in other views, the entry will render normally.
static BBjString CALENDAR_ENTRY_DISPLAY_BLOCK()
When in daygrid view, it renders the entry as a solid rectangle. When in other views, the entry will render normally.
static BBjString CALENDAR_ENTRY_DISPLAY_LIST_ITEM()
When in daygrid view, it renders the entry as a colored dot. When in other views, the entry will render normally.
static BBjString CALENDAR_ENTRY_DISPLAY_BACKGROUND()
This modifies the background of the entry's date/time frame in the calendar.
static BBjString CALENDAR_ENTRY_DISPLAY_INVERSE_BACKGROUND()
This inversely modifies the background of the entry's date/time frame in the calendar.
static BBjString CALENDAR_ENTRY_DISPLAY_NONE()
This hides the entry on the calendar.
void setId(BBjString id!)
BBjString
- id! A string to uniquely identify the entry.BBjString getId()
BBjString getUuid()
void setTitle(BBjString title!)
BBjString
- title! A string to be used as the entry's title.BBjString getTitle()
void setDescription(BBjString description!)
BBjString
- description! A string that's used to further describe the entry beyond the title text.BBjString getDescription()
void setLocation(BBjString location!)
BBjString
- location! A string that's used to define a location for the entry.BBjString getLocation()
void setUrl(BBjString url!)
BBjString
- url! A string that contains a URL to be associated with the entry.BBjString getUrl()
void setGroupId(BBjString groupId!)
BBjString
- groupId! A string that contains the entry's group ID. Entries that share a groupId will be dragged and resized together automatically.BBjString getGroupId()
void setAllDay(BBjNumber allDay!)
BBjNumber
- allDay! A BBjNumber acting as a boolean that determines if the entry lasts all day (1) or not (0).BBjNumber getAllDay()
void setEnableEntryOverlap(BBjNumber overlap!)
BBjNumber
- overlap! A BBjNumber acting as a boolean that determines if entries can overlap one another (1) or not (0).BBjNumber getEnableEntryOverlap()
void setStart(BBjString start!)
BBjString
- start! A string that contains the starting date/time for the entry.BBjString getStart()
void setEnd(BBjString end!)
BBjString
- end! A string that contains the ending date/time for the entry.BBjString getEnd()
void setBackgroundColor(BBjString backgroundColor!)
Colors may be specified as any valid CSS color, so "red"
, "rgb(255, 0, 0)"
, "#ff0000"
, "#f00"
, "hsl(0, 100%, 50%)"
, and all the versions of those formats that include an alpha channel are valid ways of specifying the color red.
BBjString
- backgroundColor! A string that contains the color for the entry's background.BBjString getBackgroundColor()
void setBorderColor(BBjString borderColor!)
Colors may be specified as any valid CSS color, so "red"
, "rgb(255, 0, 0)"
, "#ff0000"
, "#f00"
, "hsl(0, 100%, 50%)"
, and all the versions of those formats that include an alpha channel are valid ways of specifying the color red.
BBjString
- borderColor! A string that contains the color for the entry's border.BBjString getBorderColor()
void setTextColor(BBjString textColor!)
Colors may be specified as any valid CSS color, so "red"
, "rgb(255, 0, 0)"
, "#ff0000"
, "#f00"
, "hsl(0, 100%, 50%)"
, and all the versions of those formats that include an alpha channel are valid ways of specifying the color red.
BBjString
- textColor! A string that contains the color for the entry's text.BBjString getTextColor()
void setColor(BBjString color!)
CalendarEvent
's colors, see the setColors(backgroundColor!, borderColor!, textColor!)
method.
Note: This is a shorthand way of specifying the backgroundColor and borderColor at the same time. The color will be passed
to the FullCalendar, but it internally sets the backgroundColor
and borderColor
to the value of the
specified color and discards the given color. Therefore, you can set colors with this method, but the corresponding getColor()
method may not return anything if you're working with a CalendarEvent
object that was returned from the FullCalendar.
Colors may be specified as any valid CSS color, so "red"
, "rgb(255, 0, 0)"
, "#ff0000"
, "#f00"
, "hsl(0, 100%, 50%)"
, and all the versions of those formats that include an alpha channel are valid ways of specifying the color red.
BBjString
- color! A string that contains the color for the entry's background and border.BBjString getColor()
CalendarEvent
object was provided
by the FullCalendar. This is because the setColor()
method is a shorthand way of specifying the
backgroundColor and borderColor at the same time. The color will be passed to the FullCalendar, but it internally sets
the backgroundColor
and borderColor
to the value of the specified color and discards the given
color. Therefore, you can set colors with the setColor()
method, but this getColor()
method may not return anything if you're working with a CalendarEvent
object that was returned from the FullCalendar.
Note: For a quick way to set a CalendarEvent
's colors, see the setColors(backgroundColor!, borderColor!, textColor!)
method.
void setColors(BBjString backgroundColor!, BBjString borderColor!, BBjString textColor!)
Colors may be specified as any valid CSS color, so "red"
, "rgb(255, 0, 0)"
, "#ff0000"
, "#f00"
, "hsl(0, 100%, 50%)"
, and all the versions of those formats that include an alpha channel are valid ways of specifying the color red.
BBjString
- color! A string that contains the color for the entry's background and border.void setClassName(BBjString className!)
setClassNames(BBjVector)
or setClassNames(BBjString)
method instead."myclass1"
, that determines the HTML class that's associated with the entry.
See the setClassNames()
methods to set multiple class names.
BBjString
- className! A string that contains a class name string (or CSS style), such as "myclass1"
, that determines the HTML class that's associated with the entry.BBjString getClassName()
getClassNames()
method instead.void setClassNames(BBjVector classNames!)
work
or personal
.
Note that this sets all the class names at once. It's possible to add class names, regardless of whether they have been set or not, using the addClassName()
method.
To remove a single class name from the entry, you can call the removeClassName()
method, or get all the class names in a vector, remove the undesired classes, then set the class names.
Here's an example of how you can use custom class names and the BBjCalendarWidget's injectCSS()
method to affect a calendar entry's display:
rem Create a calendar entry for 3PM today and give it a custom CSS class name of "small-text", then add it to the calendar myEntry! = CalendarAPI.createCalendarEntry("Write Advantage Article", date(0, "%Yl-%Mz-%Dz") + "T15:00:00") myEntry!.addClassName("small-text") myCal!.addEntry(myEntry!) rem Inject custom CSS to change the event's text size myCal!.injectCss(" .small-text div { font-size: 7px; } ")
BBjVector
- classNames! A vector of strings with the entry's class names (or CSS styles) such as "myclass1"
, that determines the HTML class that's associated with the entry.void setClassNames(BBjString classNames!)
work
or personal
.
This is similar to the setClassNames()
method that takes a BBjVector except that it takes a comma-delimted string of class names for succinctness.
Note that this sets all the class names at once. It's possible to add class names, regardless of whether they have been set or not, using the addClassName()
method.
To remove a single class name from the entry, you can call the removeClassName()
method, or get all the class names in a vector, remove the undesired classes, then set the class names.
Here's an example of how you can use custom class names and the BBjCalendarWidget's injectCSS()
method to affect a calendar entry's display:
rem Create a calendar entry for 3PM today and give it a custom CSS class name of "small-text", then add it to the calendar myEntry! = CalendarAPI.createCalendarEntry("Write Advantage Article", date(0, "%Yl-%Mz-%Dz") + "T15:00:00") myEntry!.addClassName("small-text") myCal!.addEntry(myEntry!) rem Inject custom CSS to change the event's text size myCal!.injectCss(" .small-text div { font-size: 7px; } ")
BBjString
- classNames! A comma-delimted string of class names such as "work, personal"
.BBjVector getClassNames()
void addClassName(BBjString className!)
"myclass1"
to the entry's vector of class names.
This method can be used in place of the setClassNames()
method as it adds the provided class name to the entry's vector of
class names. It may be easier to call this method if you only need to set a few tags, as the setClassNames()
method requires
you to create and populate a BBjVector (unless you use the version that takes a comma-delimited string).
Here's an example of how you can use custom class names and the BBjCalendarWidget's injectCSS()
method to affect a calendar entry's display:
rem Create a calendar entry for 3PM today and give it a custom CSS class name of "small-text", then add it to the calendar myEntry! = CalendarAPI.createCalendarEntry("Write Advantage Article", date(0, "%Yl-%Mz-%Dz") + "T15:00:00") myEntry!.addClassName("small-text") myCal!.addEntry(myEntry!) rem Inject custom CSS to change the event's text size myCal!.injectCss(" .small-text div { font-size: 7px; } ")
BBjString
- className! The class name (or CSS style) such as "myclass1"
to add to the entry.void removeClassName(BBjString className!)
BBjString
- className! The class name (or CSS style) to remove from the entry's vector of class names.void setTags(BBjVector tags!)
BBjVector
- tags! A vector of strings with the entry's tags.void setTags(BBjString tags!)
This is similar to the setTags()
method that takes a BBjVector except that it takes a comma-delimted string of tags for succinctness.
BBjString
- tags! A comma-delimted string of tags such as "work, programming".BBjVector getTags()
void addTag(BBjString tag!)
This method can be used in place of the setTags()
method as it adds the provided tag to the entry's vector of tags. It may
be easier to call this method if you only need to set a few tags, as the setTags()
method requires you to create and
populate a BBjVector or a comma-delimited string.
BBjString
- tag! The tag to add to the entry.void removeTag(BBjString tag!)
BBjString
- tag! The tag to remove from the entry's vector of tags.BBjNumber containsTag(BBjString tag!)
BBjNumber containsAnyTag(BBjVector tags!)
BBjVector
- tags! A BBjVector filled with the tags of interest.BBjNumber containsAnyTag(BBjString tags!)
This is similar to the containsAnyTag()
method that takes a BBjVector except that it takes a comma-delimted string of tags for succinctness.
BBjString
- tags! A comma-delimted string of tags such as "work, programming, meeting".BBjNumber containsAllTags(BBjVector tags!)
BBjNumber containsAllTags(BBjString tags!)
CalendarEntry
contains all the provided tags in comma-delimted string in the entry's vector of tags.
This is similar to the containsAllTags()
method that takes a BBjVector except that it takes a comma-delimted string of tags for succinctness.
BBjString
- tags! A comma-delimted string of tags such as "work, programming, meeting".void addExtendedProperty(BBjString key!, BBjString value!)
Note that this method simply puts the provide key/value pair in the extended properties HashMap. If an entry in the HashMap already existed with that particular key, then it will be updated with the provided value.
This method can be used in place of the setExtendedProperties()
method as it adds the provided property to the entry's HashMap of extended properties. It may
be easier to call this method if you only need to set a few extended properties, as the setExtendedProperties()
method requires you to create and
populate a HashMap.
BBjString
- key! The key of the extended property to add to the entry.BBjString
- value! The value of the extended property to add to the entry.void removeExtendedProperty(BBjString key!)
BBjString
- key! The extended property key to remove from the entry's HashMap of extended properties.BBjNumber containsExtendedPropertyKey(BBjString key!)
BBjString
- key! The key that you're checking to see if it exists in the entry's extended properties.BBjString getExtendedPropertyValue(BBjString key!)
BBjString
- key! The extended property key that you wish to get the associated valuevoid setExtendedProperties(HashMap extendedProperties!)
HashMap
- extendedProperties! A HashMap of custom key/value string pairs that define the entry's custom properties.HashMap getExtendedProperties()
void setDisplay(BBjString display!)
The display style may be one of the following constants:
CalendarAPI.CALENDAR_ENTRY_DISPLAY_AUTO()
- (default) When in daygrid, renders the event as a solid rectangle if it is all-day or multi-day. If a timed event, will render it with a dot. When in other views, will render normally.CalendarAPI.CALENDAR_ENTRY_DISPLAY_BLOCK()
- When in daygrid, renders the event as a solid rectangle. When in other views, will render normally.CalendarAPI.CALENDAR_ENTRY_DISPLAY_LIST_ITEM()
- When in daygrid, renders the event with a dot. When in other views, will render normally.CalendarAPI.CALENDAR_ENTRY_DISPLAY_BACKGROUND()
- Highlights the background of the entry's container.CalendarAPI.CALENDAR_ENTRY_DISPLAY_INVERSE_BACKGROUND()
- Hightlights the spans of time not occupied by an entry, or the opposite of the background.CalendarAPI.CALENDAR_ENTRY_DISPLAY_NONE()
- Won't render the event at all.BBjString
- display! A constant that denotes the desired entry display style.BBjString getDisplay()
void setEnableEditable(BBjNumber editable!)
setEnableStartEditable()
or setEnableDurationEditable()
methods instead.
rem Example 1: The user can move and resize the entry, i.e. change the starting time/date and the duration myEntry! = CalendarAPI.createCalendarEntry("Write Advantage Article", date(0, "%Yl-%Mz-%Dz") + "T15:00:00") myEntry!.setEnableEditable(1) rem Example 2: The user can move and resize the entry, i.e. change the starting time/date and the duration myEntry! = CalendarAPI.createCalendarEntry("Write Advantage Article", date(0, "%Yl-%Mz-%Dz") + "T15:00:00") myEntry!.setEnableStartEditable(1) myEntry!.setEnableDurationEditable(1) rem Example 3: The user can change the entry's starting time/date but not the duration myEntry! = CalendarAPI.createCalendarEntry("Write Advantage Article", date(0, "%Yl-%Mz-%Dz") + "T15:00:00") myEntry!.setEnableStartEditable(1) rem Example 4: The user can change the entry's duration but not the starting time/date myEntry! = CalendarAPI.createCalendarEntry("Write Advantage Article", date(0, "%Yl-%Mz-%Dz") + "T15:00:00") myEntry!.setEnableDurationEditable(1)
BBjNumber
- editable! A BBjNumber acting as a boolean that indicates whether the entry can be modified by the user, where 1 = editable and 0 = read-only.BBjNumber getEnableEditable()
void setEnableStartEditable(BBjNumber startEditable!)
Note: See the setEnableEditable()
method if you wish to set the
setEnableStartEditable()
and setEnableDurationEditable()
parameters simultaneously. That method also contains sample code that demonstrates different ways to affect an entry's editability.
BBjNumber
- startEditable! A BBjNumber acting as a boolean that indicates whether the entry's starting time can be modified by the user, where 1 = editable and 0 = not editable.BBjNumber getEnableStartEditable()
void setEnableDurationEditable(BBjNumber durationEditable!)
Note: See the setEnableEditable()
method if you wish to set the
setEnableStartEditable()
and setEnableDurationEditable()
parameters simultaneously. That method also contains sample code that demonstrates different ways to affect an entry's editability.
BBjNumber
- durationEditable! A BBjNumber acting as a boolean that indicates whether the entry's duration can be modified by the user, where 1 = editable and 0 = not editable.BBjNumber getEnableDurationEditable()
BBjString getAsString()
CalendarEntry
object.BBjString getAsFormattedString()
CalendarEntry
object.JsonObject getAsJsonObject()
CalendarEntry
object.