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

B14492-01

oracle.mail.ldap
Class ESDSNNTPUtil

java.lang.Object
  |
  +--oracle.mail.ldap.ESDSNNTPUtil

public final class ESDSNNTPUtil
extends java.lang.Object

Constructor Summary
ESDSNNTPUtil(OESContext oesCtx)

Method Summary
void clearNewsgroupACI(java.lang.String newsGroupName, java.lang.String installName, java.lang.String domain)
This method clears all the ACIs set on a newsgroup.
void clearPiecewiseNewsGroupSearchFlags()
void createNewsGroup(ESDSLdapObject newsGroup, boolean ifGlobal, java.lang.String installName, java.lang.String domain)
This method creates a news group in the directory.
void createNewsPeer(ESDSLdapObject newspeer, java.lang.String installName)
This method creates a news peer in the directory.
void deleteNewsGroup(java.lang.String newsGroupName, java.lang.String installName, java.lang.String domain)
This method deletes a news group.
void deleteNewsPeer(java.lang.String newspeer, java.lang.String installName)
This method deletes a news peer.
boolean getIfGetNextBatchNewsGroup()
java.util.Hashtable getNewsgroupACI(java.lang.String newsGroupName, java.lang.String installName, java.lang.String domain)
This method gets the ACIs set on a newsgroup.
ESDSLdapObject getNewsGroupMetaData()
This method will return the list of mandatory and optional attributes for the newsgroup entry and the metadata associated with the newsgroup object.
ESDSLdapObject getNewsPeerMetaData()
This method will return the list of mandatory and optional attributes for the newspeer entry and the metadata associated with the newspeer object.
ESDSLdapObject lookupNewsGroup(java.lang.String newsGroup, java.lang.String installName, java.lang.String domain, java.util.Vector attrsToFetch)
This method looks up a global/local newsgroup in the directory.
ESDSLdapObject lookupNewsPeer(java.lang.String newspeer, java.lang.String installName, java.util.Vector attrsToFetch)
This method looks up a news peer in the directory.
void modifyNewsGroup(java.lang.String newsGroupName, java.lang.String installName, java.lang.String domain, ESDSLdapObject newsgroup)
This method modifies a news group in the directory.
void modifyNewsPeer(java.lang.String newsPeerName, java.lang.String installName, ESDSLdapObject newspeer)
This method modifies a news peer in the directory.
ESDSLdapObject[] searchNewsGroup(java.lang.String queryCriteria, java.lang.String installName, java.lang.String domain, java.util.Vector attrsToFetch)
This method searches for global/local newsgroup in the directory based on the specified search critiria.
ESDSLdapObject[] searchNewsGroup(java.lang.String queryCriteria, java.lang.String installName, java.lang.String domain, java.util.Vector attrsToFetch, int batchSize)
This method searches for global/local newsgroup in the directory based on the specified search critiria.
ESDSLdapObject[] searchNewsPeer(java.lang.String queryCriteria, java.lang.String installName, java.util.Vector attrsToFetch)
This method searchs for news peers based on search criteria.
java.util.Vector setNewsgroupACI(java.lang.String newsGroupName, java.lang.String installName, java.lang.String domain, java.util.Hashtable acis)
This method sets the ACIs on a newsgroup.

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

Constructor Detail

ESDSNNTPUtil

public ESDSNNTPUtil(OESContext oesCtx)
             throws ESDSException

Method Detail

getNewsGroupMetaData

public ESDSLdapObject getNewsGroupMetaData()
                                    throws ESDSException
This method will return the list of mandatory and optional attributes for the newsgroup entry and the metadata associated with the newsgroup object. The metadata for a newsgroup consists of the list of mandatory & optional attributes the caller needs to set in order to create a newsgroup. It also contains information about all these attributes, for example the syntax, multiplicity of the attributes etc. When the caller sets the attribute value on this metadata object, a validation is done to ensure that the caller sets the value of an attribute which is present in that particular entry. In UI based applications, using the metadata, the caller can do any input validations for the data entered.
Returns:
newsgroup metadata
Throws:
ESDSException - Throws ESDSException if any error is encountered. The getMessage method can be used to retrieve error message from this exception.

createNewsGroup

public void createNewsGroup(ESDSLdapObject newsGroup,
                            boolean ifGlobal,
                            java.lang.String installName,
                            java.lang.String domain)
                     throws ESDSException
This method creates a news group in the directory. It creates global or local news group based on the args passed in. It also creates a folder entry in es_folder table in the mailstore database (provided by the caller as the value of orclmailstore attr). Caller must call getNewsGroupMetaData() before this. After retrieving the metadata, the user can set the value of an attribute in the following manner. The attribute value can be set using the setAttributeValue method of the ESDSLdapObject class.
This example sets a new set of values for the "telephonenumber".
Vector newVals = new Vector();
newVals.add("408 7394050");
newVals.add("650 7394050");
ldapobj.setAttributeValue("telephonenumber", newVals);
Parameters:
newsGroup - The news group attribute and values.
ifGlobal - true for a global news group, false for a local (domain ) newsgroup
installName - Name of the installation
domain - Name of the domain (when ifGlobal true), can be null for global newsgroups
Returns:
void
Throws:
ESDSException - Throws ESDSException if any error is encountered. The getMessage method can be used to retrieve error message from this exception.

lookupNewsGroup

public ESDSLdapObject lookupNewsGroup(java.lang.String newsGroup,
                                      java.lang.String installName,
                                      java.lang.String domain,
                                      java.util.Vector attrsToFetch)
                               throws ESDSException
This method looks up a global/local newsgroup in the directory. When domain name is passed, it searches for local newsgroup. Throws ESDSException if no news group is found
Parameters:
newsGroup - Name of the newsgroup
installName - Name of the installation - MUST be passed if looking for global newsgroups
domain - Domain name - MUST be passed if looking for local newsgroups
attrsToFetch - The list of attributes to be fetched - Vector of Strings null if all attributes are to be fetched
Returns:
The news group attribute and values.(similar to metadata). The news group attributes can be retrieved as shown in the following example.
Example:
Vector values = ldapobj.getAttributeValue("cn") The values vector contains strings, which are values of the cn This is null if no value is set for the "cn" attribute
Throws:
ESDSException - Throws ESDSException if any error is encountered. The getMessage method can be used to retrieve error message from this exception.

searchNewsGroup

public ESDSLdapObject[] searchNewsGroup(java.lang.String queryCriteria,
                                        java.lang.String installName,
                                        java.lang.String domain,
                                        java.util.Vector attrsToFetch,
                                        int batchSize)
                                 throws ESDSException
This method searches for global/local newsgroup in the directory based on the specified search critiria. When domain name is passed, it searches for local newsgroup. Returns null if no match is found. If looking for both global and local groups, then this API must be called twice, once for global groups and once for local groups.
Parameters:
queryCriteria - The criteria for search for newsgroup. For eg, t* for newsgroups with name "t*".
installName - Name of the installation - MUST be passed if looking for global newsgroups
domain - Domain name - MUST be passed if looking for local newsgroups
attrsToFetch - The list of attributes to be fetched - Vector of Strings null if all attributes are to be fetched
batchSize - The number of entries to be returned in a batch when searching piecewise. When this is 0, then no piecewise search is done. It returns everything.
Returns:
The news group attribute and values. (similar to metadata). The news group attributes can be retrieved as shown in the following example.
Example:
Vector values = ldapobj.getAttributeValue("cn") The values vector contains strings, which are values of the cn This is null if no value is set for the "cn" attribute
Throws:
ESDSException - Throws ESDSException if any error is encountered. The getMessage method can be used to retrieve error message from this exception.

getIfGetNextBatchNewsGroup

public boolean getIfGetNextBatchNewsGroup()

searchNewsGroup

public ESDSLdapObject[] searchNewsGroup(java.lang.String queryCriteria,
                                        java.lang.String installName,
                                        java.lang.String domain,
                                        java.util.Vector attrsToFetch)
                                 throws ESDSException
This method searches for global/local newsgroup in the directory based on the specified search critiria. When domain name is passed, it searches for local newsgroup. Returns null if no match is found. If looking for both global and local groups, then this API must be called twice, once for global groups and once for local groups.
Parameters:
queryCriteria - The criteria for search for newsgroup. For eg, t* for newsgroups with name "t*".
installName - Name of the installation - MUST be passed if looking for global newsgroups
domain - Domain name - MUST be passed if looking for local newsgroups
attrsToFetch - The list of attributes to be fetched - Vector of Strings null if all attributes are to be fetched
Returns:
The news group attribute and values. (similar to metadata). The news group attributes can be retrieved as shown in the following example.
Example:
Vector values = ldapobj.getAttributeValue("cn") The values vector contains strings, which are values of the cn This is null if no value is set for the "cn" attribute
Throws:
ESDSException - Throws ESDSException if any error is encountered. The getMessage method can be used to retrieve error message from this exception.

modifyNewsGroup

public void modifyNewsGroup(java.lang.String newsGroupName,
                            java.lang.String installName,
                            java.lang.String domain,
                            ESDSLdapObject newsgroup)
                     throws ESDSException
This method modifies a news group in the directory.
Parameters:
newsGroupName - Name of the newsgroup
installName - Name of the installation - MUST be passed if looking for global newsgroups
domain - Domain name - MUST be passed if looking for local newsgroups
newsgroup - The new data for modification. The new data can be set using the modifyAttributeValue method of the ESDSLdapObject class. The caller needs to specify the type of modification. The list of allowed modifications are as follows.
  • ESDSConstants.DS_MODIFY_ADD : This adds the given set of values to the existing values
  • ESDSConstants.DS_MODIFY_DELETE : This deletes the given set of values from the existing values.
  • ESDSConstants.DS_MODIFY_REPLACE: This replaces the existing values with these new set of values.

Example: This example adds two new values for the "telephonenumber" attribute.
Vector newVals = new Vector();
newVals.add("408 7394050");
newVals.add("650 7394050");
ldapobj.modifyAttributeValue("telephonenumber", newVals, ESDSConstants.DS_MODIFY_ADD);
Returns:
void
Throws:
ESDSException - Throws ESDSException if any error is encountered. The getMessage method can be used to retrieve error message from this exception.

deleteNewsGroup

public void deleteNewsGroup(java.lang.String newsGroupName,
                            java.lang.String installName,
                            java.lang.String domain)
                     throws ESDSException
This method deletes a news group.
Parameters:
newsGroupName - Name of the newsgroup
installName - Name of the installation - MUST be passed if looking for global newsgroups
domain - Domain name - MUST be passed if looking for local newsgroups
Returns:
void
Throws:
ESDSException - Throws ESDSException if any error is encountered. The getMessage method can be used to retrieve error message from this exception.

getNewsPeerMetaData

public ESDSLdapObject getNewsPeerMetaData()
                                   throws ESDSException
This method will return the list of mandatory and optional attributes for the newspeer entry and the metadata associated with the newspeer object. The metadata for a newspeer consists of the list of mandatory & optional attributes the caller needs to set in order to create a newsgroup. It also contains information about all these attributes, for example the syntax, multiplicity of the attributes etc. When the caller sets the attribute value on this metadata object, a validation is done to ensure that the caller sets the value of an attribute which is present in that particular entry. In UI based applications, using the metadata, the caller can do any input validations for the data entered.
Returns:
newspeer metadata
Throws:
ESDSException - Throws ESDSException if any error is encountered. The getMessage method can be used to retrieve error message from this exception.

createNewsPeer

public void createNewsPeer(ESDSLdapObject newspeer,
                           java.lang.String installName)
                    throws ESDSException
This method creates a news peer in the directory. Caller must call getNewsPeerMetaData() before this. After retrieving the metadata, the user can set the value of an attribute in the following manner. The attribute value can be set using the setAttributeValue method of the ESDSLdapObject class.
This example sets a new set of values for the "telephonenumber".
Vector newVals = new Vector();
newVals.add("408 7394050");
newVals.add("650 7394050");
ldapobj.setAttributeValue("telephonenumber", newVals);
Parameters:
newsPeer - The news group attribute and values.
installName - Name of the installation
Returns:
void
Throws:
ESDSException - Throws ESDSException if any error is encountered. The getMessage method can be used to retrieve error message from this exception.

lookupNewsPeer

public ESDSLdapObject lookupNewsPeer(java.lang.String newspeer,
                                     java.lang.String installName,
                                     java.util.Vector attrsToFetch)
                              throws ESDSException
This method looks up a news peer in the directory. Throws ESDSException if no news peer is found
Parameters:
newspeer - Name of the news peer
installName - Name of the installation
attrsToFetch - The list of attributes to be fetched - Vector of Strings null if all attributes are to be fetched
Returns:
The news peer attribute and values.(similar to metadata). The news peer attributes can be retrieved as shown in the following example.
Example:
Vector values = ldapobj.getAttributeValue("cn") The values vector contains strings, which are values of the cn This is null if no value is set for the "cn" attribute
Throws:
ESDSException - Throws ESDSException if any error is encountered. The getMessage method can be used to retrieve error message from this exception.

searchNewsPeer

public ESDSLdapObject[] searchNewsPeer(java.lang.String queryCriteria,
                                       java.lang.String installName,
                                       java.util.Vector attrsToFetch)
                                throws ESDSException
This method searchs for news peers based on search criteria. Returns null if no match is found.
Parameters:
queryCriteria - The criteria for search for newspeers. For eg, t* for newspeers with name "t*".
installName - Name of the installation
attrsToFetch - The list of attributes to be fetched - Vector of Strings null if all attributes are to be fetched
Returns:
The news peer attribute and values. (similar to metadata). The news peer attributes can be retrieved as shown in the following example.
Example:
Vector values = ldapobj.getAttributeValue("cn") The values vector contains strings, which are values of the cn This is null if no value is set for the "cn" attribute
Throws:
ESDSException - Throws ESDSException if any error is encountered. The getMessage method can be used to retrieve error message from this exception.

modifyNewsPeer

public void modifyNewsPeer(java.lang.String newsPeerName,
                           java.lang.String installName,
                           ESDSLdapObject newspeer)
                    throws ESDSException
This method modifies a news peer in the directory.
Parameters:
newsPeerName - Name of the newspeer
installName - Name of the installation
newspeer - The new data for modification. The new data can be set using the modifyAttributeValue method of the ESDSLdapObject class. The caller needs to specify the type of modification. The list of allowed modifications are as follows.
  • ESDSConstants.DS_MODIFY_ADD : This adds the given set of values to the existing values
  • ESDSConstants.DS_MODIFY_DELETE : This deletes the given set of values from the existing values.
  • ESDSConstants.DS_MODIFY_REPLACE: This replaces the existing values with these new set of values.

Example: This example adds two new values for the "telephonenumber" attribute.
Vector newVals = new Vector();
newVals.add("408 7394050");
newVals.add("650 7394050");
ldapobj.modifyAttributeValue("telephonenumber", newVals, ESDSConstants.DS_MODIFY_ADD);
Returns:
void
Throws:
ESDSException - Throws ESDSException if any error is encountered. The getMessage method can be used to retrieve error message from this exception.

deleteNewsPeer

public void deleteNewsPeer(java.lang.String newspeer,
                           java.lang.String installName)
                    throws ESDSException
This method deletes a news peer.
Parameters:
newsPeer - Name of the news peer
installName - Name of the installation
Returns:
void
Throws:
ESDSException - Throws ESDSException if any error is encountered. The getMessage method can be used to retrieve error message from this exception.

clearPiecewiseNewsGroupSearchFlags

public void clearPiecewiseNewsGroupSearchFlags()

getNewsgroupACI

public java.util.Hashtable getNewsgroupACI(java.lang.String newsGroupName,
                                           java.lang.String installName,
                                           java.lang.String domain)
                                    throws ESDSException
This method gets the ACIs set on a newsgroup.
Parameters:
newsGroupName - Name of the group whose ACI is to be fetched
installName - MUST be specified if the group is global
domain - MUST be specified if the group is a local newsgroup
Returns:
Hashtable with the mailids as the key and the ACI string as the value. If no ACIs are set, then null is returned.
Throws:
ESDSException - if any error occurs

clearNewsgroupACI

public void clearNewsgroupACI(java.lang.String newsGroupName,
                              java.lang.String installName,
                              java.lang.String domain)
                       throws ESDSException
This method clears all the ACIs set on a newsgroup.
Parameters:
newsGroupName - Name of the group on which the ACI is to be set
installName - MUST be specified if the group is global
domain - MUST be specified if the group is a local newsgroup
Returns:
void
Throws:
ESDSException - if any error occurs

setNewsgroupACI

public java.util.Vector setNewsgroupACI(java.lang.String newsGroupName,
                                        java.lang.String installName,
                                        java.lang.String domain,
                                        java.util.Hashtable acis)
                                 throws ESDSException
This method sets the ACIs on a newsgroup. This method will check if ACIs exist for the entities for whom ACIs are being set using this method. If so, the older values will be replaced with the new ACI values.
Parameters:
newsGroupName - Name of the group on which ACI is to be set
installName - MUST be specified if the group is global
domain - MUST be specified if the group is a local newsgroup
acis - Hashtable containing the ACIs to be set. The key should be the mailid and the value is the ACI string.
Returns:
Vector containing the mailids for which the ACIs could not be set. This would happen if the mailids are invalid. A null is returned if all mailids are valid.
Throws:
ESDSException - if any error occurs

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

B14492-01

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