Zimlet JavaScript API Reference - ZmDataSource

Class ZmDataSource


Extends ZmAccount.

This class represents a data source.

Defined in: ZmDataSource.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
ZmDataSource(type, id)
Creates a data source.
Field Summary
Field Attributes Field Name and Description
<static>  
ZmDataSource.CONNECT_CLEAR
Defines the "cleartext" connection type.
<static>  
ZmDataSource.CONNECT_SSL
Defines the "ssl" connection type.
Method Summary
Method Attributes Method Name and Description
<static>  
ZmDataSource.addProvider(provider)
Adds a data source provider.
 
Gets the port.
<static>  
ZmDataSource.getProviderForAccount(account)
Gets the provider.
<static>  
ZmDataSource.getProviderForHost(host)
Gets the provider.
<static>  
ZmDataSource.getProviders()
Gets the providers.
<static>  
ZmDataSource.removeAllProviders()
Removes all providers.
 
setEmail(email)
NOTE: Email is same as the identity's from address.
 
testConnection(callback, errorCallback, batchCommand, noBusyOverlay)
Tests the data source connection.
Methods borrowed from class ZmAccount:
getEmail, getIdentity, getName, setName, toString
Class Detail
ZmDataSource(type, id)
Creates a data source.
Parameters:
{constant} type
the account type (see ZmAccount.TYPE_ constants)
{String} id
the id
Field Detail
<static> ZmDataSource.CONNECT_CLEAR
Defines the "cleartext" connection type.

<static> ZmDataSource.CONNECT_SSL
Defines the "ssl" connection type.
Method Detail
<static> ZmDataSource.addProvider(provider)
Adds a data source provider. The registered providers are objects that specify default values for data sources. This can be used to show the user a list of known email providers (e.g. Yahoo! Mail) to pre-fill the account information.
Parameters:
{Hash} provider
a hash of provider information
{String} provider.id
a unique identifier for this provider
{String} provider.name
the name of this provider to display to the user
{String} provider.type Optional
the type (see ZmAccount.TYPE_ constants)
{String} provider.connectionType Optional
the connection type (see ZmDataSource.CONNECT_ constants)
{String} provider.host Optional
the server
{String} provider.pollingInterval Optional
the polling interval
{Boolean} provider.leaveOnServer Optional
if true, leave message on server (POP only)

{int} getPort()
Gets the port.
Returns:
{int} port

<static> {Hash} ZmDataSource.getProviderForAccount(account)
Gets the provider.
Parameters:
{ZmAccount} account
the account
Returns:
{Hash} the provider or null for none

<static> {Hash} ZmDataSource.getProviderForHost(host)
Gets the provider.
Parameters:
{String} host
the host
Returns:
{Hash} the provider or null for none

<static> {Array} ZmDataSource.getProviders()
Gets the providers.
Returns:
{Array} an array of providers

<static> ZmDataSource.removeAllProviders()
Removes all providers.

setEmail(email)
NOTE: Email is same as the identity's from address.
Parameters:
email

{Object} testConnection(callback, errorCallback, batchCommand, noBusyOverlay)
Tests the data source connection.
Parameters:
{AjxCallback} callback
the callback
{AjxCallback} errorCallback
the error callback
{ZmBatchCommand} batchCommand
the batch command
{Boolean} noBusyOverlay
if true, do not show busy overlay
Returns:
{Object} the response

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