Oracle® Mail Java API Reference
10g Release 1 (10.1.1)

B14492-01

oracle.mail.sdk.esmail
Class OracleStore

java.lang.Object
  |
  +--javax.mail.Service
        |
        +--javax.mail.Store
              |
              +--oracle.mail.sdk.esmail.OracleStore

public class OracleStore
extends javax.mail.Store
implements javax.mail.event.ConnectionListener

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.


Constructor Summary
OracleStore(javax.mail.Session session, javax.mail.URLName aURL)
Constructor
Parameters:
session - Session object for this Store.

Method Summary
void close()
Use this method to get folder by name
void closed(javax.mail.event.ConnectionEvent e)
void connect(OESContext aOESContext)
Use this method to connect to a store.
void connect(OESLoginContext aOESLoginContext)
Deprecated. - Using OESLoginContext in connect method no longer supported.

Parameters:

aOESLoginContext - expect an authenticated context
void connect(OESUser aOESUser)
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(javax.mail.event.ConnectionEvent e)
void fake_connect(java.lang.String aUser, OracleUserConnectInfo aFolderConnectInfo)
javax.mail.Folder getDefaultFolder()
RecoveryHeader[] getDeletedMessages(java.lang.String timeStamp, java.lang.String folderName, boolean checkSubFolders)
Retrieve a list of deleted message headers and msg_ids
javax.mail.Folder getFolder(java.lang.String name)
Use this method to get folder by name
javax.mail.Folder getFolder(javax.mail.URLName uRLName)
Use this method to get folder by name
OracleUserConnectInfo getFolderConnectInfo(java.lang.String nameSpace)
long getLastUIDL()
This method returns the Unique Identifier validity value of the last created mailbox of the user.
long getLongUsage()
Get usage for the user.
javax.mail.Folder[] getPublicNamespaces()
OracleStore.getPublicNamespaces()
long getQuota()
Get quota for the user.
javax.mail.Folder[] getSharedNamespaces()
javax.mail.Folder[] getSharedNamespaces(boolean listPublicAndShared)
Retrieve a list of shared namespaces
int getUsage()
Deprecated. OJMA deprecate method "public int getUsage()"
boolean isConnected()
Use this method to get folder by name
OracleEsProfile[] listProfile()
List the existing wireless profiles for this user.
void opened(javax.mail.event.ConnectionEvent e)
int recoverMessages(int minutes, int quota, java.lang.String fromFolderName, java.lang.String toFolderName)
Deprecated. OJMA deprecate method "public int recoverMessages(int,int,String,String)"
int recoverMessages(int minutes, long quota, java.lang.String fromFolderName, java.lang.String toFolderName)
Retrieve a list of deleted messages
void recoverMessages(java.lang.String timeStamp, int[] msgIds, java.lang.String toFolder)
Recover Messages.
javax.mail.Message[] search(javax.mail.search.SearchTerm term)
Get the search results for all the users folders.
javax.mail.Message[] search(java.lang.String searchString)
Get the search results for all the users folders.
void setCurrentProfile(java.lang.String aProfileStr)
Set the current profile.

Methods inherited from class javax.mail.Store
addFolderListener, addStoreListener, getPersonalNamespaces, getUserNamespaces, removeFolderListener, removeStoreListener

Methods inherited from class javax.mail.Service
addConnectionListener, connect, getURLName, removeConnectionListener, toString

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

OracleStore

public OracleStore(javax.mail.Session session,
                   javax.mail.URLName aURL)

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

Method Detail

getDefaultFolder

public javax.mail.Folder getDefaultFolder()
                                   throws javax.mail.MessagingException
Overrides:
getDefaultFolder in class javax.mail.Store
See Also:
Store.getDefaultFolder

getFolder

public javax.mail.Folder getFolder(java.lang.String name)
                            throws javax.mail.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.
Overrides:
getFolder in class javax.mail.Store
See Also:
Store.getName

getFolder

public javax.mail.Folder getFolder(javax.mail.URLName uRLName)
                            throws javax.mail.MessagingException

Use this method to get folder by name

Overrides:
getFolder in class javax.mail.Store
See Also:
Store.getFolder()

getSharedNamespaces

public javax.mail.Folder[] getSharedNamespaces(boolean listPublicAndShared)

Retrieve a list of shared namespaces



Parameters:
listPublicAndShared - - By default, set to false. Only shared folders are listed. To list both shared and public, set to true

getSharedNamespaces

public javax.mail.Folder[] getSharedNamespaces()
Overrides:
getSharedNamespaces in class javax.mail.Store
See Also:
Store.getSharedNamespaces()

isConnected

public boolean isConnected()

Use this method to get folder by name

Overrides:
isConnected in class javax.mail.Service
See Also:
Service.isConnected

close

public void close()

Use this method to get folder by name

Overrides:
close in class javax.mail.Service
See Also:
Store.close()

getFolderConnectInfo

public OracleUserConnectInfo getFolderConnectInfo(java.lang.String nameSpace)

getPublicNamespaces

public javax.mail.Folder[] getPublicNamespaces()
OracleStore.getPublicNamespaces()

connect

public void connect(java.lang.String ldapHost,
                    java.lang.String user,
                    java.lang.String password)
             throws javax.mail.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
Overrides:
connect in class javax.mail.Service
See Also:
Store.getFolder()

connect

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

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

Overrides:
connect in class javax.mail.Service
See Also:
Store.getFolder()

connect

public void connect(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

connect

public void connect(OESLoginContext aOESLoginContext)
Deprecated. - Using OESLoginContext in connect method no longer supported.

Parameters:

aOESLoginContext - expect an authenticated context

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.


connect

public void connect(OESUser aOESUser)

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


closed

public void closed(javax.mail.event.ConnectionEvent e)
Specified by:
closed in interface javax.mail.event.ConnectionListener
See Also:
ConnectionListener.closed()

disconnected

public void disconnected(javax.mail.event.ConnectionEvent e)
Specified by:
disconnected in interface javax.mail.event.ConnectionListener
See Also:
ConnectionListener.disconnected

opened

public void opened(javax.mail.event.ConnectionEvent e)
Specified by:
opened in interface javax.mail.event.ConnectionListener
See Also:
ConnectionListener.opened

listProfile

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

List the existing wireless profiles for this user.


getQuota

public long getQuota()
              throws javax.mail.MessagingException

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




Parameters: None.

Returns:
long quota

getUsage

public int getUsage()
             throws javax.mail.MessagingException
Deprecated. OJMA deprecate method "public int getUsage()"

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




Parameters: None.

See Also:
"public long getLongUsage()"

getLongUsage

public long getLongUsage()
                  throws javax.mail.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 javax.mail.MessagingException
Set the current profile. OCS profiles are defined as wp<number>

search

public javax.mail.Message[] search(java.lang.String searchString)
                            throws javax.mail.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: searchString - IMAP style search string


search

public javax.mail.Message[] search(javax.mail.search.SearchTerm term)
                            throws javax.mail.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


recoverMessages

public int recoverMessages(int minutes,
                           int quota,
                           java.lang.String fromFolderName,
                           java.lang.String toFolderName)
                    throws javax.mail.MessagingException
Deprecated. OJMA deprecate method "public int recoverMessages(int,int,String,String)"

Retrieve a list of deleted messages



Parameters:
minutes - - time in minutes
fromFolderName - - Folder from which to recover messages
quota - - quota
toFolderName - - Folder to recover messages into
Returns:
message count
See Also:
"public int recoverMessages(int,long,String,String)"

recoverMessages

public int recoverMessages(int minutes,
                           long quota,
                           java.lang.String fromFolderName,
                           java.lang.String toFolderName)
                    throws javax.mail.MessagingException

Retrieve a list of deleted messages



Parameters:
minutes - - time in minutes
fromFolderName - - Folder from which to recover messages
quota - - quota
toFolderName - - Folder to recover messages into
Returns:
message count

getDeletedMessages

public RecoveryHeader[] getDeletedMessages(java.lang.String timeStamp,
                                           java.lang.String folderName,
                                           boolean checkSubFolders)
                                    throws javax.mail.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 javax.mail.MessagingException
Recover Messages.

fake_connect

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

getLastUIDL

public long getLastUIDL()

This method returns the Unique Identifier validity value of the last created mailbox of the user.



Returns:
UID validity value of the last created mailbox of the user.

Oracle® Mail Java API Reference
10g Release 1 (10.1.1)

B14492-01

Copyright © 1988, 2005, Oracle. All rights reserved.