Oracle Email Java API Reference
Release 2(9.0.4)

B10724-01

oracle.mail.sdk.esmail
Class OracleStore

oracle.mail.sdk.esmail.OracleStore

public class OracleStore

This class implements an OracleStore.



When a user connects to the Oracle mail store, the user will be authenticated. From the store, the user can get a folder by name, get the default folder (user's namespace) or the list of shared folders. We are assuming that the shared namespace is anything that does not match /user.
The following properties need to be set before calling the connect method: oracle.mail.ldap.admin_dn cn=umadmin,cn=emailservercontainer,cn=products,cn=oraclecontext oracle.mail.ldap.admin_password {password} OR oracle.mail.ldap.admin_dn cn=orcladmin oracle.mail.ldap.admin_password {password}
OR In the IAS environment, If the oracle.mail.ldap.oracle_home property is set, then the connect method may be used by setting the hostname to null and port to -1.

Version:
1.0, 2001/01/14

Constructor Summary
OracleStore(oracle.mail.sdk.esmail.Session session, oracle.mail.sdk.esmail.URLName aURL)
           Constructor
Parameters:
session - Session object for this Store.
 
Method Summary
 void close()
           Use this method to get folder by name
 void closed(oracle.mail.sdk.esmail.ConnectionEvent e)
           
 void connect(oracle.mail.OESContext aOESContext)
           Use this method to connect to a store.
 void connect(java.lang.String ldapHost, int ldapPort, java.lang.String User, java.lang.String password)
           Use this method to connect to a store
Parameters:
ldapHost - LDAP Host Name ldapPort - LDAP Port user - User@Domain password - Password
 void connect(java.lang.String ldapHost, java.lang.String user, java.lang.String password)
           Use this method to connect to a store
 void disconnected(oracle.mail.sdk.esmail.ConnectionEvent e)
           
 void fake_connect(java.lang.String aUser, OracleUserConnectInfo aFolderConnectInfo)
           
 oracle.mail.sdk.esmail.Folder getDefaultFolder()
           
 RecoveryHeader[] getDeletedMessages(java.lang.String timeStamp, java.lang.String folderName, boolean checkSubFolders)
           Retrieve a list of deleted message headers and msg_ids
 oracle.mail.sdk.esmail.Folder getFolder(java.lang.String name)
           Use this method to get folder by name
 oracle.mail.sdk.esmail.Folder getFolder(oracle.mail.sdk.esmail.URLName uRLName)
           Use this method to get folder by name
 oracle.mail.sdk.esmail.Folder[] getPublicNamespaces()
          OracleStore.getPublicNamespaces()
 oracle.mail.sdk.esmail.Folder[] getSharedNamespaces()
           
 int getUsage()
           Get usage for the user.
 boolean isConnected()
           Use this method to get folder by name
 OracleEsProfile[] listProfile()
           List the existing wireless profiles for this user.
 void opened(oracle.mail.sdk.esmail.ConnectionEvent e)
           
 void recoverMessages(java.lang.String timeStamp, int[] msgIds, java.lang.String toFolder)
           
 javax.mail.Message[] search(javax.mail.search.SearchTerm term)
           Get the search results for all the users folders.
 void setCurrentProfile(java.lang.String aProfileStr)
          Set the current profile.
 

Constructor Detail

OracleStore

public OracleStore(oracle.mail.sdk.esmail.Session session,
                   oracle.mail.sdk.esmail.URLName aURL)

Constructor
Parameters:
session - Session object for this Store. url - URL Name object to be used for this store.

Method Detail

getDefaultFolder

public oracle.mail.sdk.esmail.Folder getDefaultFolder()
                                               throws oracle.mail.sdk.esmail.MessagingException
See Also:
Store.getDefaultFolder

getFolder

public oracle.mail.sdk.esmail.Folder getFolder(java.lang.String name)
                                        throws oracle.mail.sdk.esmail.MessagingException

Use this method to get folder by name

NOTE: The INBOX is case-sensitive, all caps. In addition, creation or deletion of any folder with the name inbox is not allowed.
See Also:
Store.getName

getFolder

public oracle.mail.sdk.esmail.Folder getFolder(oracle.mail.sdk.esmail.URLName uRLName)
                                        throws oracle.mail.sdk.esmail.MessagingException

Use this method to get folder by name

See Also:
Store.getFolder()

getSharedNamespaces

public oracle.mail.sdk.esmail.Folder[] getSharedNamespaces()
See Also:
Store.getSharedNamespaces()

isConnected

public boolean isConnected()

Use this method to get folder by name

See Also:
Service.isConnected

close

public void close()

Use this method to get folder by name

See Also:
Store.close()

getPublicNamespaces

public oracle.mail.sdk.esmail.Folder[] getPublicNamespaces()
OracleStore.getPublicNamespaces()

connect

public void connect(java.lang.String ldapHost,
                    java.lang.String user,
                    java.lang.String password)
             throws oracle.mail.sdk.esmail.MessagingException

Use this method to connect to a store


Parameters:
ldapHost - LDAP Host Name. LDAP port is assumed to be 389. user - User@Domain password - Password
See Also:
Store.getFolder()

connect

public void connect(java.lang.String ldapHost,
                    int ldapPort,
                    java.lang.String User,
                    java.lang.String password)
             throws oracle.mail.sdk.esmail.MessagingException

Use this method to connect to a store
Parameters:
ldapHost - LDAP Host Name ldapPort - LDAP Port user - User@Domain password - Password

See Also:
Store.getFolder()

connect

public void connect(oracle.mail.OESContext aOESContext)

Use this method to connect to a store. This is a method specific to OracleStore. An authenticated user's login context should be passed in.



Parameters:

OESContext - expect an authenticated context

closed

public void closed(oracle.mail.sdk.esmail.ConnectionEvent e)
See Also:
ConnectionListener.closed()

disconnected

public void disconnected(oracle.mail.sdk.esmail.ConnectionEvent e)
See Also:
ConnectionListener.disconnected

opened

public void opened(oracle.mail.sdk.esmail.ConnectionEvent e)
See Also:
ConnectionListener.opened

listProfile

public OracleEsProfile[] listProfile()
                              throws java.lang.Exception

List the existing wireless profiles for this user.


getUsage

public int getUsage()
             throws oracle.mail.sdk.esmail.MessagingException

Get usage for the user. Throws exception if user has not been authenticated




Parameters: None.


setCurrentProfile

public void setCurrentProfile(java.lang.String aProfileStr)
                       throws oracle.mail.sdk.esmail.MessagingException
Set the current profile. OCS profiles are defined as wp

search

public javax.mail.Message[] search(javax.mail.search.SearchTerm term)
                            throws oracle.mail.sdk.esmail.MessagingException

Get the search results for all the users folders. This api returs a array of message objects. Folder operations on folders obtained from the message objects will give inconsistent results and will not be supported. Throws exception if user has not been authenticated




Parameters: term - javax.mail.search.SearchTerm


getDeletedMessages

public RecoveryHeader[] getDeletedMessages(java.lang.String timeStamp,
                                           java.lang.String folderName,
                                           boolean checkSubFolders)
                                    throws oracle.mail.sdk.esmail.MessagingException

Retrieve a list of deleted message headers and msg_ids



Parameters:
timeStamp - - the timestamp to recover messages from
folderName - - the name of the folder to retrieve deleted messages. If left null, all folders are mined
checkSubFolders - - boolean value to indicate if messages from subfolder will be retrieved.
Returns:
Array of RecoveryHeader objects.

recoverMessages

public void recoverMessages(java.lang.String timeStamp,
                            int[] msgIds,
                            java.lang.String toFolder)
                     throws oracle.mail.sdk.esmail.MessagingException

fake_connect

public void fake_connect(java.lang.String aUser,
                         OracleUserConnectInfo aFolderConnectInfo)
                  throws oracle.mail.sdk.esmail.MessagingException

Oracle Email Java API Reference
Release 2(9.0.4)

B10724-01

Copyright © 1988, 2003 Oracle Corporation. All Rights Reserved.