Zimlet JavaScript API Reference - ZmCalBaseItem

Class ZmCalBaseItem


Extends ZmItem.

This class represents the base calendar item.

Defined in: ZmCalBaseItem.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
ZmCalBaseItem(type, list, id, folderId)
Field Summary
Field Attributes Field Name and Description
<static>  
ZmCalBaseItem.EQUIPMENT
Defines the "equipment" resource type.
<static>  
ZmCalBaseItem.GROUP
Defines the "group" resource type.
<static>  
ZmCalBaseItem.LOCATION
Defines the "location" resource type.
<static>  
ZmCalBaseItem.OPTIONAL_PERSON
Defines the "optional person" resource type.
<static>  
ZmCalBaseItem.PERSON
Defines the "person" resource type.
<static>  
ZmCalBaseItem.PSTATUS_ACCEPT
Defines the "accept" participant status.
<static>  
ZmCalBaseItem.PSTATUS_COMPLETED
Defines the "completed" participant status.
<static>  
ZmCalBaseItem.PSTATUS_DECLINED
Defines the "declined" participant status.
<static>  
ZmCalBaseItem.PSTATUS_DEFERRED
Defines the "deferred" participant status.
<static>  
ZmCalBaseItem.PSTATUS_DELEGATED
Defines the "delegated" participant status.
<static>  
ZmCalBaseItem.PSTATUS_NEEDS_ACTION
Defines the "needs action" participant status.
<static>  
ZmCalBaseItem.PSTATUS_TENTATIVE
Defines the "tentative" participant status.
<static>  
ZmCalBaseItem.PSTATUS_WAITING
Defines the "waiting" participant status.
Method Summary
Method Attributes Method Name and Description
 
adjustMS(s, tzo)
Adjusts milliseconds.
<static>  
ZmCalBaseItem.compareByTimeAndDuration(a, b)
Compares two appointments by start time and duration.
 
Gets alarm info
 
Gets the alarm instance start time
 
Gets the duration.
 
getDurationText(emptyAllDay, startOnly, getSimpleText)
Gets the duration text.
 
Gets the end time.
 
Gets the location.
 
Gets the name (the "subject").
 
Gets the participant status as a string.
 
Gets the reminder name.
 
Gets the start time.
 
getUniqueId(useStartTime)
Gets the unique id for this item.
 
Checks if this item has alarm data.
 
Checks if alarm is in range (based on current time).
 
Checks if this is an alarm instance.
 
Checks if the alarm is old (based on current time).
 
Checks if the item is an all day event.
 
Checks if this item is multi-day.
 
Returns a string representation of the object.
Methods borrowed from class ZmItem:
cache, canAddTag, clear, create, deleteLocal, flagLocal, getById, getDefaultDndAction, getFolderId, getRestUrl, getTagImageFromIds, getTagImageInfo, hasTag, isReadOnly, isShared, modify, move, moveLocal, removeAllTagsLocal, rename, setFlag, tagLocal
Methods borrowed from class ZmModel:
addChangeListener, removeAllChangeListeners, removeChangeListener
Class Detail
ZmCalBaseItem(type, list, id, folderId)
Parameters:
{constant} type
the item type
{ZmList} list
the list
{String} id
the id
{String} folderId
the folder id
Field Detail
<static> ZmCalBaseItem.EQUIPMENT
Defines the "equipment" resource type.

<static> ZmCalBaseItem.GROUP
Defines the "group" resource type.

<static> ZmCalBaseItem.LOCATION
Defines the "location" resource type.

<static> ZmCalBaseItem.OPTIONAL_PERSON
Defines the "optional person" resource type.

<static> ZmCalBaseItem.PERSON
Defines the "person" resource type.

<static> ZmCalBaseItem.PSTATUS_ACCEPT
Defines the "accept" participant status.

<static> ZmCalBaseItem.PSTATUS_COMPLETED
Defines the "completed" participant status.

<static> ZmCalBaseItem.PSTATUS_DECLINED
Defines the "declined" participant status.

<static> ZmCalBaseItem.PSTATUS_DEFERRED
Defines the "deferred" participant status.

<static> ZmCalBaseItem.PSTATUS_DELEGATED
Defines the "delegated" participant status.

<static> ZmCalBaseItem.PSTATUS_NEEDS_ACTION
Defines the "needs action" participant status.

<static> ZmCalBaseItem.PSTATUS_TENTATIVE
Defines the "tentative" participant status.

<static> ZmCalBaseItem.PSTATUS_WAITING
Defines the "waiting" participant status.
Method Detail
{int} adjustMS(s, tzo)
Adjusts milliseconds.
Parameters:
{int} s
the seconds
{int} tzo
the timezone offset
Returns:
{int} the resulting milliseconds

<static> {int} ZmCalBaseItem.compareByTimeAndDuration(a, b)
Compares two appointments by start time and duration.
Parameters:
{ZmCalBaseItem} a
an appointment
{ZmCalBaseItem} b
an appointment
Returns:
{int} 1 if start time "a" is after "b" or duration "a" is shorter than "b"; 1 if start time "b" is after "a" or duration "b" is shorter than "a"; 0 if both are the same

{Object} getAlarmData()
Gets alarm info
Returns:
{Object} the alarm information

{Date} getAlarmInstStart()
Gets the alarm instance start time
Returns:
{Date} the alarmInst time

{int} getDuration()
Gets the duration.
Returns:
{int} the duration (in milliseconds)

{String} getDurationText(emptyAllDay, startOnly, getSimpleText)
Gets the duration text.
Parameters:
{Boolean} emptyAllDay
if true, return empty string if all day event
{Boolean} startOnly
if true, use start date only
{Boolean} getSimpleText
if true, use the modified representation for duration where: 1. For one day all day event we show only "All day" before event name and omit the Date information 2. For multiday all day event we just show final start/end date and omit time information and other words. 3. For appt that entirely falls in one day we omit day and just show time. 4. For multiday appt we show final start/end date&time
Returns:
{String} the duration text

{Date} getEndTime()
Gets the end time.
Returns:
{Date} the end time

{String} getLocation()
Gets the location.
Returns:
{String} the location

{String} getName()
Gets the name (the "subject").
Returns:
{String} the name

{String} getParticipantStatusStr()
Gets the participant status as a string.
Returns:
{String} the participant status

{String} getReminderName()
Gets the reminder name.
Returns:
{String} the reminder name or empty string if not set

{Date} getStartTime()
Gets the start time.
Returns:
{Date} the start time

{String} getUniqueId(useStartTime)
Gets the unique id for this item.
Parameters:
{Boolean} useStartTime
if true, use the start time
Returns:
{String} the unique id

{Boolean} hasAlarmData()
Checks if this item has alarm data.
Returns:
{Boolean} true if item has alarm data

{Boolean} isAlarmInRange()
Checks if alarm is in range (based on current time).
Returns:
{Boolean} true if the alarm is in range

{Boolean} isAlarmInstance()
Checks if this is an alarm instance.
Returns:
{Boolean} true if this is an alarm instance

{Boolean} isAlarmOld()
Checks if the alarm is old (based on current time).
Returns:
{Boolean} true if the alarm is old

{Boolean} isAllDayEvent()
Checks if the item is an all day event.
Returns:
{Boolean} true if all day event

{Boolean} isMultiDay()
Checks if this item is multi-day.
Returns:
{Boolean} true if start date and end date are on different days
See:
#getStartTime
#getEndTime

{String} toString()
Returns a string representation of the object.
Returns:
{String} a string representation of the object

Documentation generated by JsDoc Toolkit 2.3.0 on Tue Jun 28 2016 21:01:33 GMT-0400 (EDT)