publish
plugins.it2be_exchange info


Servoy Properties Summary
String build
Date buildDate
String component
String licensee
String typeLicensed
Number version
String versionLicensed


Servoy Methods Summary
Boolean authenticate( IEConnection )
String createCalendarFolder( IEConnection, String, Boolean )
IEContact createContact( IEConnection, String )
String createContactFolder( IEConnection, String, Boolean )
IEEvent createEvent( IEConnection, String )
String createInboxFolder( IEConnection, String, Boolean )
IEMail createMail( IEConnection, String )
IEContact createPublicContact( IEConnection, String )
IETask createTask( IEConnection, String )
String createTaskFolder( IEConnection, String, Boolean )
Boolean deleteAttachment( IEConnection, String )
Boolean deleteContact( IEConnection, String, String, String )
Boolean deleteContacts( IEConnection, Array<IEContact>, String )
Boolean deleteEvent( IEConnection, String, String, String, String )
Boolean deleteEvents( IEConnection, Array<IEEvent>, String, String )
Boolean deleteMail( IEConnection, String, String, String )
Boolean deleteMails( IEConnection, Array<IEMail>, String )
Boolean deleteTask( IEConnection, String, String, String )
Boolean deleteTasks( IEConnection, Array<IETask>, String )
String encodeHtml( String )
Array<String> getAllFolders( IEConnection, String, Boolean )
IEConnection getConnection( String, String, String, String, String, Boolean )
IEContact getContact( IEConnection, String )
Array<IEContact> getContactView( IEConnection, Number, Number, Boolean )
Array<IEContact> getContacts( IEConnection, String )
IEEvent getEvent( IEConnection, String, String )
Array<IEEvent> getEventView( IEConnection, String, Number, Number, Boolean )
Array<IEEvent> getEvents( IEConnection, String, , Date )
String getFolderId( IEConnection, String )
String getFolderType( IEConnection, String )
IEMail getMail( IEConnection, String, String )
Array<IEMail> getMailView( IEConnection, String, Number, Number, Boolean )
Array<IEMail> getMails( IEConnection, String, , Date )
Array<IEOccurrence> getOccurrences( IEConnection, IEEvent, Date, Date, Number )
Array<IEOccurrence> getOccurrencesDeleted( IEConnection, IEEvent )
Array<IEOccurrence> getOccurrencesModified( IEConnection, IEEvent )
IESubscription getSubscription( )
IETask getTask( IEConnection, String, String )
Array<IETask> getTasks( IEConnection, , Date )
String getTimezoneId( )
Number getTimezoneOffset( Date, String )
void moveContact( IEConnection, IEContact, String )
void moveContacts( IEConnection, Array<IEContact>, String )
void moveEvent( IEConnection, IEEvent, String )
void moveEvents( IEConnection, Array<IEEvent>, String )
void moveMail( IEConnection, IEMail, String )
void moveMails( IEConnection, Array<IEMail>, String )
void moveTask( IEConnection, IETask, String )
void moveTasks( IEConnection, Array<IETask>, String )
void pullNotifications( IEConnection )
Boolean register( String )
void runMethod( Array<Object> )
void saveContacts( Array<IEContact> )
void saveEvents( Array<IEEvent> )
void saveMails( Array<IEMail> )
void saveTasks( Array<IETask> )
void subscribeNotifications( IEConnection, Object, String, Number, Number, Number )
void unsubscribeNotification( IEConnection, String, String )
void unsubscribeNotifications( IEConnection )


Servoy Properties Details


build
String  build
Returns the current version (major, minor, build)
Returns
String  build String

Supported Clients
SmartClient, WebClient, NGClient


buildDate
Date  buildDate
Returns date release date
Returns
Date  date Date

Supported Clients
SmartClient, WebClient, NGClient


component
String  component
Returns the component name
Returns
String  name String

Supported Clients
SmartClient, WebClient, NGClient


licensee
String  licensee
Returns the licensee
Returns
String  licensee String

Supported Clients
SmartClient, WebClient, NGClient


typeLicensed
String  typeLicensed
Returns the type that is valid for this license
Returns
String  type String

Supported Clients
SmartClient, WebClient, NGClient


version
Number  version
Returns the current version (major, minor)
Returns
Number  version Double

Supported Clients
SmartClient, WebClient, NGClient


versionLicensed
String  versionLicensed
Returns the version that is valid for this license
Returns
String  license String

Supported Clients
SmartClient, WebClient, NGClient

Servoy Methods Details


authenticate
Boolean  authenticate( IEConnection )
Take the IEConnection Object and authenticate against the Exchange Server.
Parameters
IEConnection  connection  the connection

Returns
Boolean  result boolean

Supported Clients
SmartClient, WebClient, NGClient

Sample
// Take the IEConnection Object and authenticate against the Exchange Server.
// First thing to do is create a IEConnection Object to store credentials and Exchange Server details
var connection = plugins.it2be_exchange.getConnection("192.168.1.69", "marcel.test", "test", "Exchange");

// Optional arguments can be:
connection.appointmentFolderName = "Agenda";
connection.contactsFolderName = "Contactpersonen";
connection.deletedFolderName = "Verwijderde items";
connection.draftsFolderName = "Concepten";
connection.inboxFolderName = "Postvak IN";
connection.publicContactsFolderName = "Openbare mappen";
connection.tasksFolderName = "Taken";

// In which timezone is the Exchange server located
connection.timeZone = "GMT+1.00";

connection.domain = "exchange.vm.com";

// Check and authenticate the IEConnection Object against the Exchange Server
if (plugins.it2be_exchange.authenticate(connection)) {
// Output the connection with success
application.output(connection);

// And return the connection for later use
Return connection;
} else {
// Output the connection error
application.output(connection.getAuthenticationError());

// Return a null value to inform the calling method about the failed connection
Return null;
}


createCalendarFolder
String  createCalendarFolder( IEConnection, String, Boolean )
Creates a new folder and returns the folderId for later use. Optionally create the folder in the root.
Parameters
IEConnection  connection:IEConnection  the connection
String  folderName:String  the folder name
Boolean  inRoot:boolean  the in root

Returns
String  folderId String

Supported Clients
SmartClient, WebClient, NGClient


createContact
IEContact  createContact( IEConnection, String )
Create a contact.
Parameters
IEConnection  connection:IEConnection  the connection
String  folderId:String  the folder id

Returns
IEContact  contact IEContact

Supported Clients
SmartClient, WebClient, NGClient

Sample
// Create a contact.
var record = foundset.getRecord(foundset.getSelectedIndex());

// While working with only one connection you can use a global to define it
// For further use of the IEConnection Object please see the getConnection sample data
var connection = globals.getConnection();

// return when no record available
if (controller.getSelectedIndex() < 0) {
Return;
}

// create the contact in MS Exchange
// your root folder wil always be the contact folder on the exchange server
// when you don't work with an English version please set the contact folder name in the IEConnection Object
var contact = plugins.it2be_exchange.createContact(connection);

// you can also create a contact direct into a subfolder, seperate the folders with '/'
// you should always follow the complete structure in the correct language like below
// var contact = plugins.it2be_exchange.createContact(connection, "Contacts/private");

if (contact) {
// set the data, there are many more fields available than these
// for the purpose of this sample we use fixed data
contact.firstName = record.it2be_companies_to_it2be_contacts.firstname;
contact.lastName = record.it2be_companies_to_it2be_contacts.lastname;

contact.companyName = company_name;

// you should add a relation address here, in this case it is hard coded :)
contact.businessAddressStreet = "street 1";
contact.businessAddressCity = "city";
contact.businessAddressCountry = "country";

// save the data. this method returns the unique id which can be stored for
// synchronization and other purposes
record.it2be_companies_to_it2be_contacts.exchangeid = contact.save();

controller.saveData();
} else {
plugins.it2be_exchange.showErrorDialog("Error", "creating the contact failed");
}


createContactFolder
String  createContactFolder( IEConnection, String, Boolean )
Creates a new folder and returns the folderId for later use. Optionally create the folder in the root.
Parameters
IEConnection  connection:IEConnection  the connection
String  folderName:String  the folder name
Boolean  inRoot:boolean  the in root

Returns
String  folderId String

Supported Clients
SmartClient, WebClient, NGClient


createEvent
IEEvent  createEvent( IEConnection, String )
Create a new event
Parameters
IEConnection  connection:IEConnection  the connection
String  folderId:String  the folder id

Returns
IEEvent  event IEEvent

Supported Clients
SmartClient, WebClient, NGClient


createInboxFolder
String  createInboxFolder( IEConnection, String, Boolean )
Creates a new folder and returns the folderId for later use. Optionally create the folder in the root.
Parameters
IEConnection  connection:IEConnection  the connection
String  folderName:String  the folder name
Boolean  inRoot:boolean  the in root

Returns
String  folderId String

Supported Clients
SmartClient, WebClient, NGClient


createMail
IEMail  createMail( IEConnection, String )
Create an email.
Parameters
IEConnection  connection:IEConnection  the connection
String  folderId:String  the folder id

Returns
IEMail  email IEMail

Supported Clients
SmartClient, WebClient, NGClient

Sample
// Create an email.
var record = foundset.getRecord(foundset.getSelectedIndex());

// While working with only one connection you can use a global to define it
// For further use of the IEConnection Object please see the getConnection sample data
var connection = globals.getConnection();

// return when no record available
if (controller.getSelectedIndex() < 0) {
Return;
}

// Send your email through MS Exchange mail.
// your root folder wil always be the 'outbox' folder on the exchange server
// when you don't work with an English version please set the mail and drafts folder name in the IEConnection Object
var mail = plugins.it2be_exchange.createMail(connection);

if (mail) {
// set the data, there are many more fields available than these
// for the purpose of this sample we use fixed data
mail.sender = "marcel.test@exchange.vm.com";
mail.to = "marcel.test@exchange.vm.com";
if (mail.cc) {
mail.cc = record.emailcc;
}
if (mail.bcc) {
mail.bcc = record.emailbcc;
}
mail.subject = "email subject";
mail.body = "email body text";

// or send an HTML message
// mail.htmlBody = "are you 
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
         happy 
        with the result?";

if (attachment) {
// set the path to attach a file to the email
// 	mail.createAttachment(attachment);
}

// send the email. this method returns the exchange id which can be stored for
// synchronization and other purposes
record.exchangeid = mail.send();

controller.saveData();
} else {
if (!mail.to) {
plugins.it2be_exchange.showErrorDialog("Error", "you forgot to set a mail to email message");
} else {
plugins.it2be_exchange.showErrorDialog("Error", "creating the email message failed");
}
}


createPublicContact
IEContact  createPublicContact( IEConnection, String )
Create a contact in the public folder.
Parameters
IEConnection  connection:IEConnection  the connection
String  folderId:String  the folder id

Returns
IEContact  contact IEContact

Supported Clients
SmartClient, WebClient, NGClient

Sample
// Create a contact in the public folder.
var record = foundset.getRecord(foundset.getSelectedIndex());

// While working with only one connection you can use a global to define it
// For further use of the IEConnection Object please see the getConnection sample data
var connection = globals.getConnection();

// return when no record available
if (controller.getSelectedIndex() < 0) {
Return;
}

// create the contact in MS Exchange
// your root folder wil always be the contact folder on the exchange server
// when you don't work with an English version please set the contact folder name in the IEConnection Object
var contact = plugins.it2be_exchange.createContact(connection);

// you can also create a contact direct into a subfolder, seperate the folders with '/'
// you should always follow the complete structure in the correct language like below
// var contact = plugins.it2be_exchange.createContact(connection, "Contacts/private");

if (contact) {
// set the data, there are many more fields available than these
// for the purpose of this sample we use fixed data
contact.firstName = record.it2be_companies_to_it2be_contacts.firstname;
contact.lastName = record.it2be_companies_to_it2be_contacts.lastname;

contact.companyName = company_name;

// you should add a relation address here, in this case it is hard coded :)
contact.businessAddressStreet = "street 1";
contact.businessAddressCity = "city";
contact.businessAddressCountry = "country";

// save the data. this method returns the unique id which can be stored for
// synchronization and other purposes
record.it2be_companies_to_it2be_contacts.exchangeid = contact.save();

controller.saveData();
} else {
plugins.it2be_exchange.showErrorDialog("Error", "creating the contact failed");
}


createTask
IETask  createTask( IEConnection, String )
Create a task.
Parameters
IEConnection  connection:IEConnection  the connection
String  folderId:String  the folder id

Returns
IETask  task IETask

Supported Clients
SmartClient, WebClient, NGClient

Sample
// Create a task.
var record = foundset.getRecord(foundset.getSelectedIndex());

// While working with only one connection you can use a global to define it
// For further use of the IEConnection Object please see the getConnection sample data
var connection = globals.getConnection();

// create the task in MS Exchange
// your root folder wil always be the task folder on the exchange server
// when you don't work with an English version please set the tasks folder name in the IEConnection Object
var task = plugins.it2be_exchange.createTask(connection);

// you can also create a task direct into a subfolder, seperate the folders with '/'
// you should always follow the complete structure in the correct language like below
// var task = plugins.it2be_exchange.createTask(connection, "Tasks/private");

if (task) {
// set the data, there are many more fields available than these
// for the purpose of this sample we use fixed data
var today = new Date();
var date1 = new Date(today.getFullYear(), today.getMonth(), today.getDate(), today.getHours());
var date2 = new Date(today.getFullYear(), today.getMonth(), today.getDate() + 1, today.getHours());

task.subject = "task subject";
task.body = "task body";
task.startDate = date1;
task.dueDate = date2;
task.status = plugins.it2be_exchange.type.taskStatus_WAITING

// save the data. this method returns the unique id which can be stored for
// synchronization and other purposes
record.exchangeid = task.save();

controller.saveData();

} else {
plugins.dialogs.showErrorDialog("Error", "creating the task failed");
}


createTaskFolder
String  createTaskFolder( IEConnection, String, Boolean )
Creates a new folder and returns the folderId for later use. Optionally create the folder in the root.
Parameters
IEConnection  connection:IEConnection  the connection
String  folderName:String  the folder name
Boolean  inRoot:boolean  the in root

Returns
String  folderId String

Supported Clients
SmartClient, WebClient, NGClient

Sample
// Creates a new folder and returns the folderId for later use. Optionally create the folder in the root.
// While working with only one connection you can use a global to define it
// For further use of the IEConnection Object please see the getConnection sample data
var connection = globals.getConnection();

// When you create a new folder this can be done in the 'root'
// Or you can create a complete structure
// IMPORTANT: the parent folder must always be created first
plugins.it2be_exchange.createTaskFolder(connection, connection.tasksFolderName + "/servoy");

// Give the connection the time to 'recover' for the next action
application.sleep(1000);

plugins.it2be_exchange.createTaskFolder(connection, connection.tasksFolderName + "/servoy/test");


deleteAttachment
Boolean  deleteAttachment( IEConnection, String )
Delete an attachment by ID.
Parameters
IEConnection  connection  the connection
String  id  the id

Returns
Boolean  result boolean

Supported Clients
SmartClient, WebClient, NGClient


deleteContact
Boolean  deleteContact( IEConnection, String, String, String )
Delete a contact by ID, changeKey (can be null) and deleteType (hard Delete or move to trash).
Parameters
IEConnection  connection:IEConnection  the connection
String  id:String  the id
String  changeKey:String  the change key
String  deleteType:String  the delete type

Returns
Boolean  boolean

Supported Clients
SmartClient, WebClient, NGClient


deleteContacts
Boolean  deleteContacts( IEConnection, Array<IEContact>, String )
Delete a batch of IEContacts (hard Delete or move to trash).
Parameters
IEConnection  connection:IEConnection  the connection
Array<IEContact>  contacts:IEContact[]  the contacts
String  deleteType:String  the delete type

Returns
Boolean  result boolean

Supported Clients
SmartClient, WebClient, NGClient


deleteEvent
Boolean  deleteEvent( IEConnection, String, String, String, String )
Delete an event by ID, changeKey (can be null), deleteType (hard Delete or move to trash) and meetingCancellationType.
Parameters
IEConnection  connection  the connection
String  id  the id
String  changeKey  the change key
String  deleteType  the delete type
String  meetingCancellationType  the meeting cancellation type

Returns
Boolean  result boolean

Supported Clients
SmartClient, WebClient, NGClient


deleteEvents
Boolean  deleteEvents( IEConnection, Array<IEEvent>, String, String )
Delete an batch of IEEvents (hard Delete or move to trash) and meetingCancellationType.
Parameters
IEConnection  connection:IEConnection  the connection
Array<IEEvent>  events:IEEvent[]  the events
String  deleteType:String  the delete type
String  meetingCancellationType:String  the meeting cancellation type

Returns
Boolean  result boolean

Supported Clients
SmartClient, WebClient, NGClient


deleteMail
Boolean  deleteMail( IEConnection, String, String, String )
Delete an email message by ID and optional changeKey and deleteType (hard Delete or move to trash).
Parameters
IEConnection  connection:IEConnection  the connection
String  id:String  the id
String  changeKey:String  the change key
String  deleteType:String  the delete type

Returns
Boolean  result boolean

Supported Clients
SmartClient, WebClient, NGClient


deleteMails
Boolean  deleteMails( IEConnection, Array<IEMail>, String )
Delete a batch of IEMail messages (hard Delete or move to trash).
Parameters
IEConnection  connection:IEConnection  the connection
Array<IEMail>  emails:IEMail[]  the emails
String  deleteType:String  the delete type

Returns
Boolean  result boolean

Supported Clients
SmartClient, WebClient, NGClient


deleteTask
Boolean  deleteTask( IEConnection, String, String, String )
Delete a task by ID, changeKey (can be null) and deleteType (hard Delete or move to trash).
Parameters
IEConnection  connection:IEConnection  the connection
String  id:String  the id
String  changeKey:String  the change key
String  deleteType:String  the delete tyep

Returns
Boolean  result boolean

Supported Clients
SmartClient, WebClient, NGClient


deleteTasks
Boolean  deleteTasks( IEConnection, Array<IETask>, String )
Delete a batch of IETasks (hard Delete or move to trash).
Parameters
IEConnection  connection:IEConnection  the connection
Array<IETask>  Tasks:IETask[]  the tasks
String  deleteType:String  the delete type

Returns
Boolean  result boolean

Supported Clients
SmartClient, WebClient, NGClient


encodeHtml
String  encodeHtml( String )
Encode the text in case you need html body text for mail etc.
Parameters
String  text  the text

Returns
String  text String

Supported Clients
SmartClient, WebClient, NGClient


getAllFolders
Array<String>  getAllFolders( IEConnection, String, Boolean )
Retrieve all subfolders of the root or enter folder ID (optional boolean isDeepTraversel).
Parameters
IEConnection  connection:IEConnection  the connection
String  folderId:String  the folder id
Boolean  isDeepTraversel:boolean  the is deep traversal

Returns
Array<String>  folders String[]

Supported Clients
SmartClient, WebClient, NGClient

Sample
// While working with only one connection you can use a global to define it
// For further use of the IEConnection Object please see the getConnection sample data
var connection = globals.getConnection();

// This way you can retrieve all folders in the root
var folders = plugins.it2be_exchange.getAllFolders(connection);
var message = "";

// Loop through the found set.
if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
}
}

if (message) {
plugins.it2be_exchange.showInfoDialog("folders", message);
} else {
plugins.it2be_exchange.showErrorDialog("folders", "there are no subfolders!");
}


getConnection
IEConnection  getConnection( String, String, String, String, String, Boolean )
Returns connection object after authenticating. Returns null when not valid.
Parameters
String  host:String  the host
String  account:String  the account
String  password:String  the password
String  prefix:String  the prefix
String  mailbox:String  the mailbox
Boolean  useSSL:boolean  the use ssl

Returns
IEConnection  connection IEConnection

Supported Clients
SmartClient, WebClient, NGClient

Sample
// TReturns connection object after authenticating. Returns null when not valid.
// First thing to do is create a IEConnection Object to store credentials and Exchange Server details
var connection = plugins.it2be_exchange.getConnection("192.168.1.69", "marcel.test", "test", "Exchange");

// Optional arguments can be:
connection.appointmentFolderName = "Agenda";
connection.contactsFolderName = "Contactpersonen";
connection.deletedFolderName = "Verwijderde items";
connection.draftsFolderName = "Concepten";
connection.inboxFolderName = "Postvak IN";
connection.publicContactsFolderName = "Openbare mappen";
connection.tasksFolderName = "Taken";

// In which timezone is the Exchange server located
connection.timeZone = "GMT+1.00";

connection.domain = "exchange.vm.com";

// Check and authenticate the IEConnection Object against the Exchange Server
if (plugins.it2be_exchange.authenticate(connection)) {
// Output the connection with success
application.output(connection);

// And return the connection for later use
Return connection;
} else {
// Output the connection error
application.output(connection.getAuthenticationError());

// Return a null value to inform the calling method about the failed connection
Return null;
}


getContact
IEContact  getContact( IEConnection, String )
Retrieve a contact by ID and optional changeKey (can be null) for display and/or update purposes.
Parameters
IEConnection  connection  the connection
String  id  the id

Returns
IEContact  contact IEContact

Supported Clients
SmartClient, WebClient, NGClient

Sample
var record = foundset.getRecord(foundset.getSelectedIndex());

// While working with only one connection you can use a global to define it
// For further use of the IEConnection Object please see the getConnection sample data
var connection = globals.getConnection();

// return when no record available
if (controller.getSelectedIndex() < 0) {
Return;
}

// check the stored id in the database
if (!databaseManager.hasRecords(record.it2be_companies_to_it2be_contacts) || !record.it2be_companies_to_it2be_contacts.exchangeid) {
plugins.it2be_exchange.showErrorDialog("Error", "No exchange (unique) id found");

Return;
}

// and retrieve the actual contact from MS Exchange
var contact = plugins.it2be_exchange.getContact(connection, record.it2be_companies_to_it2be_contacts.exchangeid);

if (contact != null) {
var message = contact.firstName + " " + contact.lastName + "\n";

plugins.it2be_exchange.showInfoDialog("Information", message);
} else {
plugins.it2be_exchange.showErrorDialog("Error", "no records found");
}


getContactView
Array<IEContact>  getContactView( IEConnection, Number, Number, Boolean )
Retrieve an array of contacts with an optional offset and maximum count (this method is the only one supported by Kerio).
Parameters
IEConnection  connection:IEConnection  the connection
Number  offset:Number  the offset
Number  maximum:Number  the maximum
Boolean  basepointBeginning:boolean  the basepoint beginning

Returns
Array<IEContact>  contacts IEContact[]

Supported Clients
SmartClient, WebClient, NGClient


getContacts
Array<IEContact>  getContacts( IEConnection, String )
Retrieve an array of all contacts or by xmlSearchExpression.
Parameters
IEConnection  connection:IEConnection  the connection
String  xmlSearchExpression:String  the xml search expression

Returns
Array<IEContact>  contacts IEContact[]

Supported Clients
SmartClient, WebClient, NGClient

Sample
// Retrieve an array of all contacts or by xmlSearchExpression.
var record = foundset.getRecord(foundset.getSelectedIndex());

// While working with only one connection you can use a global to define it
// For further use of the IEConnection Object please see the getConnection sample data
var connection = globals.getConnection();

// retrieve a set from the root
var	set = plugins.it2be_exchange.getContacts(connection)

// or retrieve a set from a subfolder system
// var set = plugins.it2be_exchange.getContacts(connection, "private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
if (set.length > 0) {
for (var i = 0 ; i < set.length ; i++) {
var contact = set[i];

message += contact.firstName + " " + contact.lastName + "\n";
}
} else {
message = "No contacts found.";
}

if (message) {
plugins.it2be_exchange.showInfoDialog("find result", message);
} else {
plugins.it2be_exchange.showErrorDialog("find result", "no records found");
}


getEvent
IEEvent  getEvent( IEConnection, String, String )
Retrieve an event by ID and optional changeKey (can be null) for display and/or update purposes.
Parameters
IEConnection  connection:IEConnection  the connection
String  id:String  the id
String  changeKey:String  the change key

Returns
IEEvent  event IEEvent

Supported Clients
SmartClient, WebClient, NGClient


getEventView
Array<IEEvent>  getEventView( IEConnection, String, Number, Number, Boolean )
Retrieve an array of calendar events with an optional offset and maximum count (this method is the only one supported by Kerio).
Parameters
IEConnection  connection:IEConnection  the connection
String  folderId:String  the folder id
Number  offset:Number  the offset
Number  maximum:Number  the maximum
Boolean  basepointBeginning:boolean  the basepoint beginning

Returns
Array<IEEvent>  events IEEvent[]

Supported Clients
SmartClient, WebClient, NGClient


getEvents
Array<IEEvent>  getEvents( IEConnection, String, , Date )
Retrieve an array of events started between start and end date or by xmlSearchExpression.

getFolderId
String  getFolderId( IEConnection, String )
Returns the ID of the given folder.
Parameters
IEConnection  connection  the connection
String  folderName  the folder name

Returns
String  id String

Supported Clients
SmartClient, WebClient, NGClient


getFolderType
String  getFolderType( IEConnection, String )
Returns the type of the given folder ID.
Parameters
IEConnection  connection  the connection
String  folderId  the folder id

Returns
String  type String

Supported Clients
SmartClient, WebClient, NGClient


getMail
IEMail  getMail( IEConnection, String, String )
Retrieve an email by ID and optional changeKey (can be null) for display and/or update purposes.
Parameters
IEConnection  connection:IEConnection  the connection
String  id:String  the id
String  changeKey:String  the change key

Returns
IEMail  email IEMail

Supported Clients
SmartClient, WebClient, NGClient


getMailView
Array<IEMail>  getMailView( IEConnection, String, Number, Number, Boolean )
Retrieve an array of email messages with an optional offset and maximum count (this method is the only one supported by Kerio).
Parameters
IEConnection  connection:IEConnection  the connection
String  folderId:String  the folder id
Number  offset:Number  the offset
Number  maximum:Number  the maximum
Boolean  basepointBeginning:boolean  the basepoint beginning

Returns
Array<IEMail>  emails IEMail[]

Supported Clients
SmartClient, WebClient, NGClient


getMails
Array<IEMail>  getMails( IEConnection, String, , Date )
Retrieve an array of email messages received between (optional) start and end date or by xmlSearchExpression.

getOccurrences
Array<IEOccurrence>  getOccurrences( IEConnection, IEEvent, Date, Date, Number )
Get event occurrences
Parameters
IEConnection  connection  the connection
IEEvent  master  the master
Date  startDate  the start date
Date  endDate  the end date
Number  maximum  the maximum

Returns
Array<IEOccurrence>  occurrences IEOccurrence[]

Supported Clients
SmartClient, WebClient, NGClient


getOccurrencesDeleted
Array<IEOccurrence>  getOccurrencesDeleted( IEConnection, IEEvent )
Get event occurrences that were deleted
Parameters
IEConnection  connection  the connection
IEEvent  master  the master

Returns
Array<IEOccurrence>  occurrences IEOccurrence[]

Supported Clients
SmartClient, WebClient, NGClient


getOccurrencesModified
Array<IEOccurrence>  getOccurrencesModified( IEConnection, IEEvent )
Get event occurrences that were modified
Parameters
IEConnection  connection  the connection
IEEvent  master  the master

Returns
Array<IEOccurrence>  occurrences IEOccurrence[]

Supported Clients
SmartClient, WebClient, NGClient


getSubscription
IESubscription  getSubscription( )
Returns the current subscription
Returns
IESubscription  subscription IESubscription

Supported Clients
SmartClient, WebClient, NGClient


getTask
IETask  getTask( IEConnection, String, String )
Retrieve a task by ID and optional changeKey (can be null) for display and/or update purposes.
Parameters
IEConnection  connection:IEConnection  the connection
String  id:String  the id
String  changeKey:String  the change key

Returns
IETask  task IETask

Supported Clients
SmartClient, WebClient, NGClient

Sample
// Retrieve a task by ID and optional changeKey (can be null) for display and/or update purposes.
var record = foundset.getRecord(foundset.getSelectedIndex());

// While working with only one connection you can use a global to define it
// For further use of the IEConnection Object please see the getConnection sample data
var connection = globals.getConnection();

// check the stored id in the database
if (!record.exchangeid) {
plugins.it2be_exchange.showErrorDialog("Error", "No exchange (unique) id found");

Return;
}

// and retrieve the actual appointment from MS Exchange
var task = plugins.it2be_exchange.getTask(connection, record.exchangeid);

if (task != null) {
var message = task.startDate + " " + task.status + " " + task.subject + "\n";

plugins.it2be_exchange.showInfoDialog("Information", message);
} else {
plugins.it2be_exchange.showErrorDialog("Error", "no record found");
}


getTasks
Array<IETask>  getTasks( IEConnection, , Date )
Retrieve an array of tasks by started between start and end date or by xmlSearchExpression.

getTimezoneId
String  getTimezoneId( )
Return the timezone id for the client timezone.
Returns
String  timezone String

Supported Clients
SmartClient, WebClient, NGClient


getTimezoneOffset
Number  getTimezoneOffset( Date, String )
Returns the offset for the given date and timezone id.
Parameters
Date  date  the date
String  timezoneId  the timezone id

Returns
Number  offset int

Supported Clients
SmartClient, WebClient, NGClient


moveContact
void  moveContact( IEConnection, IEContact, String )
Move a contact from the current folder to a new folder (by folderId)
Parameters
IEConnection  connection  the connection
IEContact  contact  the contact
String  folderId  the folder id

Returns
void  

Supported Clients
SmartClient, WebClient, NGClient


moveContacts
void  moveContacts( IEConnection, Array<IEContact>, String )
Move an array of contacts from the current folder to a new folder (by folderId)
Parameters
IEConnection  connection  the connection
Array<IEContact>  contacts  the contacts
String  folderId  the folder id

Returns
void  

Supported Clients
SmartClient, WebClient, NGClient


moveEvent
void  moveEvent( IEConnection, IEEvent, String )
Move an event from the current folder to a new folder (by folderId)
Parameters
IEConnection  connection  the connection
IEEvent  event  the event
String  folderId  the folder id

Returns
void  

Supported Clients
SmartClient, WebClient, NGClient


moveEvents
void  moveEvents( IEConnection, Array<IEEvent>, String )
Move an array of events from the current folder to a new folder (by folderId)
Parameters
IEConnection  connection  the connection
Array<IEEvent>  events  the events
String  folderId  the folder id

Returns
void  

Supported Clients
SmartClient, WebClient, NGClient


moveMail
void  moveMail( IEConnection, IEMail, String )
Move an email from the current folder to a new folder (by folderId)
Parameters
IEConnection  connection  the connection
IEMail  email  the email
String  folderId  the folder id

Returns
void  

Supported Clients
SmartClient, WebClient, NGClient


moveMails
void  moveMails( IEConnection, Array<IEMail>, String )
Move an array of emails from the current folder to a new folder (by folderId)
Parameters
IEConnection  connection  the connection
Array<IEMail>  emails  the emails
String  folderId  the folder id

Returns
void  

Supported Clients
SmartClient, WebClient, NGClient


moveTask
void  moveTask( IEConnection, IETask, String )
Move a task from the current folder to a new folder (by folderId)
Parameters
IEConnection  connection  the connection
IETask  task  the task
String  folderId  the folder id

Returns
void  

Supported Clients
SmartClient, WebClient, NGClient


moveTasks
void  moveTasks( IEConnection, Array<IETask>, String )
Move an array of tasks from the current folder to a new folder (by folderId)
Parameters
IEConnection  connection  the connection
Array<IETask>  tasks  the tasks
String  folderId  the folder id

Returns
void  

Supported Clients
SmartClient, WebClient, NGClient


pullNotifications
void  pullNotifications( IEConnection )
Pull the notifications
Parameters
IEConnection  connection  the connection

Returns
void  

Supported Clients
SmartClient, WebClient, NGClient


register
Boolean  register( String )
Register your runtime license (use the Components Manager to request your license string)
Parameters
String  license  the license

Returns
Boolean  result boolean

Supported Clients
SmartClient, WebClient, NGClient

Sample
// You have to register your plug-in(s) and beans before you start using them
// One way to do so is create an 'onOpenSolution' method and add the 'register(.)' method(s) there
plugins.it2be_exchange.register("Insert the license string(s) from your '*_runtime_license.txt' file here!");


runMethod
void  runMethod( Array<Object> )
run the method using the arguments
Parameters
Array<Object>  arguments  the arguments

Returns
void  

Supported Clients
SmartClient, WebClient, NGClient


saveContacts
void  saveContacts( Array<IEContact> )
Save the contacts
Parameters
Array<IEContact>  contacts  the contacts

Returns
void  

Supported Clients
SmartClient, WebClient, NGClient


saveEvents
void  saveEvents( Array<IEEvent> )
Save the events
Parameters
Array<IEEvent>  events  the events

Returns
void  

Supported Clients
SmartClient, WebClient, NGClient


saveMails
void  saveMails( Array<IEMail> )
Save the emails
Parameters
Array<IEMail>  emails  the emails

Returns
void  

Supported Clients
SmartClient, WebClient, NGClient


saveTasks
void  saveTasks( Array<IETask> )
Save the tasks
Parameters
Array<IETask>  tasks  the tasks

Returns
void  

Supported Clients
SmartClient, WebClient, NGClient


subscribeNotifications
void  subscribeNotifications( IEConnection, Object, String, Number, Number, Number )
Subscribe to notifications for events based on the notification type(s).
Parameters
IEConnection  connection  the connection
Object  method  the method
String  folder  the folder
Number  types  the types
Number  delay  the delay
Number  keepAlive  the keep alive

Returns
void  

Supported Clients
SmartClient, WebClient, NGClient


unsubscribeNotification
void  unsubscribeNotification( IEConnection, String, String )
Unsubscribe from notification for events by id and watermark.
Parameters
IEConnection  connection  the connection
String  id  the id
String  watermark  the watermark

Returns
void  

Supported Clients
SmartClient, WebClient, NGClient


unsubscribeNotifications
void  unsubscribeNotifications( IEConnection )
Unsubscribe from notifications for events based on the notification type(s).
Parameters
IEConnection  connection  the connection

Returns
void  

Supported Clients
SmartClient, WebClient, NGClient