Oracle© Collaboration Suite Workspaces Web Services API Reference
10g Release 1 (10.1.2.2)

Part No. B28209-01


oracle.workspaces.ws
Interface InboxService


public interface InboxService

InboxService provides methods to operate on inbox resource within a workspace.

The major operations supported include creation of messages /threads , retrieval of messages /threads and deletion of messages /threads. The Axis specific code snippet given below, illustrates how a message can be posted within a workspace inbox.

   // Invoke an instance of the inbox service locator and get a handle to inbox
 service.
  InboxServiceServiceLocator issl = new InboxServiceServiceLocator();
  InboxService iService = issl.getInboxService();
  // Create a message definition and set properties.
  MessageDefinition msgDefn1 = new MessageDefinition();
  msgDefn1.setContentType("text/plain");
  msgDefn1.setSubject(messageName1);
  String text = "This is the first message to this email inbox";
  msgDefn1.setText(text);
  iService.createMessage(wspcId, "",msgDefn1,null);
  

Method Summary
 MessageItem createMessage(java.lang.String wspcUid, java.lang.String threadUid, MessageDefinition msgDf, java.lang.String[] attributes)
          Creates a message in the inbox of the workspace specified.
 MessageItem[] createMessages(java.lang.String wspcUid, java.lang.String threadUid, MessageDefinition[] msgDf, java.lang.String[] attributes)
          Creates the messages in the inbox, in the given workspace.
 void deleteAllThreads(java.lang.String wspcUid)
          Deletes all the threads in the inbox of the specified workspace.
 void deleteMessages(java.lang.String wspcUid, java.lang.String threadUid, java.lang.String[] msgUids)
          Delete the CwMessages referenced by the specified Ids from a thread.
 void deleteThreads(java.lang.String wspcUid, java.lang.String[] threadUids)
          Deletes the threads specified from the inbox of the workspace.
 BoardItem getInbox(java.lang.String wspcUid, java.lang.String[] attributes)
          Retrieves the inbox associated with the workspace specified.
 byte[] getMessageAsByteArray(java.lang.String wspcUid, java.lang.String threadUid, java.lang.String messageUid)
          Returns the byte array representation of a message.
 MessageItem getMessageByUid(java.lang.String wspcUid, java.lang.String threadUid, java.lang.String msgUid, java.lang.String[] attributes)
          Returns the MessageItem bean representing the message object specified by the uid supplied.
 MessageItem[] getMessages(java.lang.String wspcUid, java.lang.String threadUid, java.lang.String[] attributes)
          Returns the messages in the thread specified.
 MessageItem[] getMessagesByUid(java.lang.String wspcUid, java.lang.String threadUid, java.lang.String[] msgUids, java.lang.String[] attributes)
          Bulk service - returns messages identified by IDs.
 ThreadItem getThreadByUid(java.lang.String wspcUid, java.lang.String threadUid)
          Returns the ThreadItem bean representing the thread object specified by the uid.
 ThreadItem[] getThreads(java.lang.String wspcUid, int iFetchStart, int iFetchMax, boolean bSortByCreationDate, boolean bAscending)
          Returns the ThreadItem[] representing the required thread objects in the inbox of the workspace specified.
 ThreadItem[] getThreadsByUid(java.lang.String wspcUid, java.lang.String[] threadUids)
          Returns the array of thread item beans representing the thread objects specified by the uids supplied.

 

Method Detail

createMessage

public MessageItem createMessage(java.lang.String wspcUid,
                                 java.lang.String threadUid,
                                 MessageDefinition msgDf,
                                 java.lang.String[] attributes)
                          throws CwWSException
Creates a message in the inbox of the workspace specified.
Parameters:
msgDf - - MessageDefinition bean representing the message to be created.
wspcUid - - uid of the workspace in which the inbox is present.
attributes - - Array representing the properties that the client is interested in retrieving - Extra attributes which can be requested for are: CONTENT_TYPE,CONTENT,SIZE,LEVEL_IN_THREAD,IS_MARKED_DELETED,PRIORITY, HAS_ATTACHMENTS,FLAGS,ATTACHMENT. Note: Value of attributes FLAGS,ATTACHMENT should be obtained from the MessageItem bean.
Returns:
- MessageItem bean representing the message object created.
Throws:
CwWSException - - If objects passed are null or the id is not a message id or if the object does not exist or if the ResourceItem mapping has been corrupted for this user

getInbox

public BoardItem getInbox(java.lang.String wspcUid,
                          java.lang.String[] attributes)
                   throws CwWSException
Retrieves the inbox associated with the workspace specified.
Parameters:
wspcUid - - workspace in which the inbox is present
attributes - - Array representing the properties that the client is interested in retrieving - extra attributes which can be requested for are BEGIN_QUOTE_PREFIX,EDIT_DELETE_POLICY,EMAIL_ADDRESS,INBOUND_POLICY, ORIGINAL_QUOTED,SUBJECT_REPLY_PREFIX,SUBSCRIPTION_FORMAT,FORWARDING_EMAIL_ADDRESS
Returns:
BoardItem bean representing the inbox retrieved
Throws:
CwWSException - - If objects passed are null or if the object does not exist or if the ResourceItem mapping has been corrupted for this user

getThreadByUid

public ThreadItem getThreadByUid(java.lang.String wspcUid,
                                 java.lang.String threadUid)
                          throws CwWSException
Returns the ThreadItem bean representing the thread object specified by the uid.
Parameters:
threadUid - - uid of the thread to be retrieved.
wspcUid - - workspace in which the inbox is present.
Returns:
ThreadItem bean representing the thread object retrieved
Throws:
CwWSException - - If objects passed are null or the id is not a message id or if the object does not exist or if the ResourceItem mapping has been corrupted for this user

getMessageByUid

public MessageItem getMessageByUid(java.lang.String wspcUid,
                                   java.lang.String threadUid,
                                   java.lang.String msgUid,
                                   java.lang.String[] attributes)
                            throws CwWSException
Returns the MessageItem bean representing the message object specified by the uid supplied.
Parameters:
msgUid - - uid of the message to be retrieved
threadUid - - uid of the parent thread in which the message is present
wspcUid - - uid of the workspace in which the inbox is present.
attributes - - Array representing the properties that the client is interested in retrieving - Extra attributes which can be requested for are: CONTENT_TYPE,CONTENT,SIZE,LEVEL_IN_THREAD,IS_MARKED_DELETED,PRIORITY, HAS_ATTACHMENTS,FLAGS,ATTACHMENT. Note: Value of attributes FLAGS,ATTACHMENT should be obtained from the MessageItem bean.
Returns:
- MessageItem bean representing the messageobject.
Throws:
CwWSException - - If objects passed are null or the id is not a message id or if the object does not exist or if the ResourceItem mapping has been corrupted for this user

getMessageAsByteArray

public byte[] getMessageAsByteArray(java.lang.String wspcUid,
                                    java.lang.String threadUid,
                                    java.lang.String messageUid)
                             throws CwWSException
Returns the byte array representation of a message.
Parameters:
wspcUid - - Id of the workspace the message belongs to
threadUid - - Id of the thread the message belongs to
messageUid - - The Id of the message that needs to be got.
Returns:
Array of bytes representing the entire message.
Throws:
CwWSException - - If the workspace Id or thread Id or message Id is invalid. Note:The byte array is constructed out of the RFC 822 format stream representing the message.

deleteThreads

public void deleteThreads(java.lang.String wspcUid,
                          java.lang.String[] threadUids)
                   throws CwWSException
Deletes the threads specified from the inbox of the workspace.
Parameters:
threadUids - - uids of the threads to be deleted
wspcUid - - workspace in which the inbox is present
Throws:
CwWSException - - If objects passed are null or the id is not a message id or if the object does not exist or if the ResourceItem mapping has been corrupted for this user

getThreads

public ThreadItem[] getThreads(java.lang.String wspcUid,
                               int iFetchStart,
                               int iFetchMax,
                               boolean bSortByCreationDate,
                               boolean bAscending)
                        throws CwWSException
Returns the ThreadItem[] representing the required thread objects in the inbox of the workspace specified.
Parameters:
wspcUid - - Workspace in which the inbox is present
iFetchStart - - Index of the first thread to return (Zero based indexing).
iFetchMax - - Maximum number of threads to be retrieved
bSortByCreationDate - - If true, will sort threads by creation date rather than by last posting date.
bAscending - - If true, will sort in ascending rather than descending order.
Returns:
ThreadItem[] array
Throws:
CwWSException - - If iFetchMax exceeds 500.

deleteAllThreads

public void deleteAllThreads(java.lang.String wspcUid)
                      throws CwWSException
Deletes all the threads in the inbox of the specified workspace.
Parameters:
wspcUid - - workspace in which the threads are to be deleted.
Throws:
CwWSException - - If objects passed are null or if the object does not exist or if the ResourceItem mapping has been corrupted for this user

getThreadsByUid

public ThreadItem[] getThreadsByUid(java.lang.String wspcUid,
                                    java.lang.String[] threadUids)
                             throws CwWSException
Returns the array of thread item beans representing the thread objects specified by the uids supplied.
Parameters:
threadUids - - Thread uid listing for which the thread objects are to be returned
wspcUid - - workspace in which the threads are present.
Returns:
- an array of ThreadItem beans representing the thread objects.
Throws:
CwWSException - - If objects passed are null or the id is not a message id or if the object does not exist or if the ResourceItem mapping has been corrupted for this user

getMessages

public MessageItem[] getMessages(java.lang.String wspcUid,
                                 java.lang.String threadUid,
                                 java.lang.String[] attributes)
                          throws CwWSException
Returns the messages in the thread specified.
Parameters:
threadUid - - The thread in which the messages are present
wspcUid - - The workspace in which the messages are present.
attributes - - Array representing the properties that the client is interested in retrieving - Extra attributes which can be requested for are: CONTENT_TYPE,CONTENT,SIZE,LEVEL_IN_THREAD,IS_MARKED_DELETED,PRIORITY, HAS_ATTACHMENTS,FLAGS,ATTACHMENT. Note: Value of attributes FLAGS,ATTACHMENT should be obtained from the MessageItem bean.
Returns:
MessageItem[] an array of beans representing the messages in the thread.
Throws:
CwWSException - - If objects passed are null or the id is not a message id or if the object does not exist or if the ResourceItem mapping has been corrupted for this user

createMessages

public MessageItem[] createMessages(java.lang.String wspcUid,
                                    java.lang.String threadUid,
                                    MessageDefinition[] msgDf,
                                    java.lang.String[] attributes)
                             throws CwWSException
Creates the messages in the inbox, in the given workspace.
Parameters:
msgDf - - message definition bean representing the message to be created.
wspcUid - - Uid of the workspace containing the inbox,in which the messages are to be created.
attributes - - Array representing the properties that the client is interested in retrieving - Extra attributes which can be requested for are: CONTENT_TYPE,CONTENT,SIZE,LEVEL_IN_THREAD,IS_MARKED_DELETED,PRIORITY, HAS_ATTACHMENTS,FLAGS,ATTACHMENT. Note: Value of attributes FLAGS,ATTACHMENT should be obtained from the MessageItem bean.
Returns:
MessageItem[] - array of beans representing the created messages.
Throws:
CwWSException - - If objects passed are null or the id is not a message id or if the object does not exist or if the ResourceItem mapping has been corrupted for this user

getMessagesByUid

public MessageItem[] getMessagesByUid(java.lang.String wspcUid,
                                      java.lang.String threadUid,
                                      java.lang.String[] msgUids,
                                      java.lang.String[] attributes)
                               throws CwWSException
Bulk service - returns messages identified by IDs.
Parameters:
wspcUid - - Id of the workspace the message belongs to
msgUids - - The Id of the messages that needs to be fetched.
attributes - - Array representing the properties that the client is interested in retrieving - Extra attributes which can be requested for are: CONTENT_TYPE,CONTENT,SIZE,LEVEL_IN_THREAD,IS_MARKED_DELETED,PRIORITY, HAS_ATTACHMENTS,FLAGS,ATTACHMENT. Note: Value of attributes FLAGS,ATTACHMENT should be obtained from the MessageItem bean.
Returns:
MessageItem[] - Abstraction of a persistent repository object. Encapsulates method call results
Throws:
CwWSException - - If objects passed are null or the id is not a message id or if the object does not exist or if the ResourceItem mapping has been corrupted for this user

deleteMessages

public void deleteMessages(java.lang.String wspcUid,
                           java.lang.String threadUid,
                           java.lang.String[] msgUids)
                    throws CwWSException
Delete the CwMessages referenced by the specified Ids from a thread.
Parameters:
wspcUid - - Id of the workspace the messages belong to
threadUid - - Id of the thread the messages belong to
msgUids - - Ids of the messages to be deleted
Throws:
CwWSException - - If objects passed are null or the id is not a message id or if the object does not exist or if the ResourceItem mapping has been corrupted for this user

Copyright © 2001, 2006, Oracle. All rights reserved.