Zimlet JavaScript API Reference - ZmZimbraAccount

Class ZmZimbraAccount


Extends ZmAccount.

This class represents an account. This object is created primarily if a user has added sub-accounts to manage (i.e. a family mailbox).

Defined in: ZmZimbraAccount.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
ZmZimbraAccount(id, name, visible)
Creates an account object containing meta info about the account.
Field Summary
Field Attributes Field Name and Description
 
acl
The account Access Control List.
 
The account settings.
<static>  
ZmZimbraAccount.STATUS_AUTHFAIL
Defines the "authentication fail" status.
<static>  
ZmZimbraAccount.STATUS_ERROR
Defines the "error" status.
<static>  
ZmZimbraAccount.STATUS_OFFLINE
Defines the "offline" status.
<static>  
ZmZimbraAccount.STATUS_ONLINE
Defines the "online" status.
<static>  
ZmZimbraAccount.STATUS_RUNNING
Defines the "running" status.
<static>  
ZmZimbraAccount.STATUS_UNKNOWN
Defines the "unknown" status.
Method Summary
Method Attributes Method Name and Description
 
Gets the default calendar.
 
Gets the default color.
 
Gets the display name.
 
Gets the email address for this account.
 
Gets the icon.
 
Gets the identity.
 
Gets the name of the account.
 
Gets the status icon.
 
Gets the status message.
 
Gets the tool tip.
 
Checks if the account has sync'd.
 
isAppEnabled(appName)
Checks if this account supports the given application name
 
Checks if this account is CalDAV based.
 
Checks if this account is in error status.
 
Check is this account is currently sync'ing for the first time.
 
load(callback)
Loads the account.
 
save(callback, errorCallback, batchCmd)
Saves the account.
 
setEmail(email)
Sets the email address for this account.
 
setName(name)
Sets the name of the account.
 
sync(callback)
Sync the account.
 
Unloads the account and removes any account-specific data stored globally.
Methods borrowed from class ZmAccount:
toString
Class Detail
ZmZimbraAccount(id, name, visible)
Creates an account object containing meta info about the account.
Author: Parag Shah.
Parameters:
{String} id
the unique ID for this account
{String} name
the email address
{Boolean} visible
if true, make this account available in the overview (i.e. child accounts)
Field Detail
The account Access Control List.

{ZmSettings} settings
The account settings.

<static> ZmZimbraAccount.STATUS_AUTHFAIL
Defines the "authentication fail" status.

<static> ZmZimbraAccount.STATUS_ERROR
Defines the "error" status.

<static> ZmZimbraAccount.STATUS_OFFLINE
Defines the "offline" status.

<static> ZmZimbraAccount.STATUS_ONLINE
Defines the "online" status.

<static> ZmZimbraAccount.STATUS_RUNNING
Defines the "running" status.

<static> ZmZimbraAccount.STATUS_UNKNOWN
Defines the "unknown" status.
Method Detail
{Object} getDefaultCalendar()
Gets the default calendar. For CalDAV based accounts, the default calendar is hidden; therefore, this method returns the first non-default calendar.
Returns:
{Object} the calendar
See:
ZmZimbraAccount.isCalDavBased

{String} getDefaultColor()
Gets the default color.
Returns:
{String} the default color
See:
ZmOrganizer

{String} getDisplayName()
Gets the display name.
Returns:
{String} the display name

{String} getEmail()
Gets the email address for this account.
Returns:
{String} the email address

{String} getIcon()
Gets the icon.
Returns:
{String} the icon

{ZmIdentity} getIdentity()
Gets the identity.
Returns:
{ZmIdentity} the identity

{String} getName()
Gets the name of the account.
Returns:
{String} the account name

{String} getStatusIcon()
Gets the status icon.
Returns:
{String} the status icon

{String} getStatusMessage()
Gets the status message.
Returns:
{String} the status message

{String} getToolTip()
Gets the tool tip.
Returns:
{String} the tool tip

{Boolean} hasNotSynced()
Checks if the account has sync'd.
Returns:
{Boolean} if true, this account has never been sync'd

{Boolean} isAppEnabled(appName)
Checks if this account supports the given application name
Parameters:
{String} appName
the name of the application
Returns:
{Boolean} true if account supports the application

{Boolean} isCalDavBased()
Checks if this account is CalDAV based.
Returns:
{Boolean} if true, account is CalDAV based

{Boolean} isError()
Checks if this account is in error status.
Returns:
{Boolean} if true, the account is in error status

{Boolean} isOfflineInitialSync()
Check is this account is currently sync'ing for the first time.
Returns:
{Boolean} if true, this account is currently sync'ing for the first time

load(callback)
Loads the account.
Parameters:
{AjxCallback} callback
the callback

save(callback, errorCallback, batchCmd)
Saves the account.
Parameters:
{AjxCallback} callback
the callback
{AjxCallback} errorCallback
the error callback
{Object} batchCmd
the batch command

setEmail(email)
Sets the email address for this account. This method does nothing. The email address is set when the object is created.
Parameters:
{String} email
the email address (ignored)

setName(name)
Sets the name of the account.
Parameters:
{String} name
the account name

sync(callback)
Sync the account.
Parameters:
{AjxCallback} callback
the callback

unload()
Unloads the account and removes any account-specific data stored globally.

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