org.mobicents.csapi.jr.slee.gms
Interface IpMailboxFolderConnection

All Superinterfaces:
IpServiceConnection

public interface IpMailboxFolderConnection
extends IpServiceConnection

This class represents the Parlay < IpMailboxFolderConnection > interface


Method Summary
 void close()
          This method closes a specified folder.
 int getInfoAmount()
          This method returns the number of folder information properties of the specified folder.
 TpFolderInfoProperty[] getInfoProperties(int firstProperty, int numberOfProperties)
          This method returns the properties of a folder.
 IpMessage getMessage(java.lang.String messageID)
          This method gets a message from an open mailbox folder.
 void putMessage(java.lang.String message, TpMessageInfoProperty[] messageInfoProperties)
          This method puts a message into an open mailbox folder.
 void remove(java.lang.String folderID)
          This method removes a folder from the mailbox.
 void setInfoProperties(int firstProperty, TpFolderInfoProperty[] folderInfoProperties)
          Sets the properties of a folder.
 
Methods inherited from interface org.mobicents.csapi.jr.slee.IpServiceConnection
closeConnection
 

Method Detail

getInfoAmount

int getInfoAmount()
                  throws TpCommonExceptions,
                         javax.slee.resource.ResourceException
This method returns the number of folder information properties of the specified folder.

Returns:
numberOfProperties The number of properties associated with the folder. The number of properties is zero or positive.
Throws:
TpCommonExceptions
javax.slee.resource.ResourceException

getInfoProperties

TpFolderInfoProperty[] getInfoProperties(int firstProperty,
                                         int numberOfProperties)
                                         throws TpCommonExceptions,
                                                P_GMS_NUMBER_NOT_POSITIVE,
                                                javax.slee.resource.ResourceException
This method returns the properties of a folder.

Parameters:
firstProperty - This is the first property of interest. This number represents the starting point where the first property of the list to be retrieved from the folder is located. Properties are numbered from zero.
numberOfProperties - The number of properties to return. If the value of this parameter is zero, then all properties will be returned. Otherwise, the value must be a positive number. If the number is not positive, the error code P_GMS_NUMBER_NOT_POSITIVE is returned.
Returns:
folderInfoProperties The folder information properties (names and values) present in the folder. Folder properties include parent folder, sub folders, number of messages contained, date created, date last accessed, and read/write access.
Throws:
TpCommonExceptions
P_GMS_NUMBER_NOT_POSITIVE
javax.slee.resource.ResourceException

setInfoProperties

void setInfoProperties(int firstProperty,
                       TpFolderInfoProperty[] folderInfoProperties)
                       throws TpCommonExceptions,
                              P_GMS_PROPERTY_NOT_SET,
                              javax.slee.resource.ResourceException
Sets the properties of a folder.

Parameters:
firstProperty - This is the first property of interest. This number represents the starting point where the first property of the list to be updated in the folder is located. Properties are numbered from zero.
folderInfoProperties - This specifies the folder information properties (names and values) to be set in the folder. Folder properties that may be changed include parent folder, sub folders and read/write access. If the properties cannot be changed, then the error code P_GMS_PROPERTY_NOT_SET is returned.
Throws:
TpCommonExceptions
P_GMS_PROPERTY_NOT_SET
javax.slee.resource.ResourceException

putMessage

void putMessage(java.lang.String message,
                TpMessageInfoProperty[] messageInfoProperties)
                throws TpCommonExceptions,
                       javax.slee.resource.ResourceException
This method puts a message into an open mailbox folder. The message and the headers are transferred to the Messaging service. The message will be taken as is. No checking is done on the message. Further more, the message is assumed to be a simple message, that is, with no attachments. If the application knows the messaging system and understands the format to send attachments, it can do so. The service will not flag any inconsistencies if the formatting of the message is not correct.

Parameters:
message - The message to put into the mailbox.
messageInfoProperties - This specifies the message information properties (names and values).
Throws:
TpCommonExceptions
javax.slee.resource.ResourceException

getMessage

IpMessage getMessage(java.lang.String messageID)
                     throws TpCommonExceptions,
                            P_GMS_INVALID_MESSAGE_ID,
                            javax.slee.resource.ResourceException
This method gets a message from an open mailbox folder. The message ID can be obtained by calling the getFolderInfo and getFolderInfoProperties or embedded in an event notification from the messaging service, with information on the mailbox and notifications contained in that operation.

Parameters:
messageID - Specifies the identity of the message. If the message ID given is not present, the error code P_GMS_INVALID_MESSAGE_ID is returned.
Returns:
message The message associated with the messageID.
Throws:
TpCommonExceptions
P_GMS_INVALID_MESSAGE_ID
javax.slee.resource.ResourceException

close

void close()
           throws TpCommonExceptions,
                  javax.slee.resource.ResourceException
This method closes a specified folder. All subfolders of the folder are also closed.

Throws:
TpCommonExceptions
javax.slee.resource.ResourceException

remove

void remove(java.lang.String folderID)
            throws TpCommonExceptions,
                   P_GMS_INSUFFICIENT_PRIVILEGE,
                   P_GMS_INVALID_FOLDER_ID,
                   P_GMS_FOLDER_IS_OPEN,
                   javax.slee.resource.ResourceException
This method removes a folder from the mailbox. All subfolders of the folder are also removed. The folder must be already closed, otherwise the error code P_GMS_FOLDER_IS_OPEN is returned. If the application does not have sufficient privilege to remove the folder, the error code P_GMS_INSUFFICIENT_PRIVILEGE is returned.

Parameters:
folderID - Specifies the identity of the folder. If the folder ID given is not present, the error code P_GMS_INVALID_FOLDER_ID is returned.
Throws:
TpCommonExceptions
P_GMS_INSUFFICIENT_PRIVILEGE
P_GMS_INVALID_FOLDER_ID
P_GMS_FOLDER_IS_OPEN
javax.slee.resource.ResourceException


Copyright © 2008. All Rights Reserved.