|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--oracle.mail.sdk.rule.RuleParser
This class provides APIs to store, retrieve and validate rules. Before using this class, you need an OESContext object that has been authenticated.
OESContext| Constructor Summary | |
RuleParser()Default Constructor |
|
RuleParser(oracle.mail.OESContext thecontext)Constructs a RuleParser object with a given authentication context |
|
| Method Summary | |
oracle.xml.parser.v2.XMLDocument |
fileToDoc(java.lang.String fileName)Parse rule data in XML text from a file and return an XMLDocument object. |
java.lang.String |
getRule()Gets a user level rule as XML text as a regular mail user |
java.lang.String |
getRule(long userid)Deprecated. use of numerical userid is no longer supported, use String getRule(String name, String ruleType) instead |
java.lang.String |
getRule(java.lang.String name, java.lang.String ruleType)Retrieves rule as XML text as an administrator |
java.io.InputStream |
getRuleAsStream(long userid)Deprecated. use of numerical userid is no longer supported, use String getRule(String name, Strin ruleType) instead |
Account |
getRuleObjects()Retrieves rule data as Java objects as a regular mail user |
Account |
getRuleObjects(java.io.InputStream ruleStream)Deprecated. use getRuleObjects(Reader) instead |
Account |
getRuleObjects(long userid)Deprecated. use of numerical userid is no longer supported, use getRuleObjects() or getRuleObjects(String name, String ruleType) instead |
Account |
getRuleObjects(java.io.Reader ruleReader)Retreives rule data in Java objects given a Reader |
Account |
getRuleObjects(java.lang.String name, java.lang.String ruleType)Retrieves rule data in Java objects for a user as an administrator |
static int |
loadRule(java.lang.String filename)Deprecated. user of static method to load rule is no longer supported. Use instance method setRule() instead. |
void |
renameUpdate(java.lang.String oldUsername, java.lang.String newUsername, oracle.mail.ldap.ESDSContext dctx, java.sql.Connection conn)Perform rule update as a result of a rename. |
static java.lang.String |
retrieveRule(long userid)Deprecated. use of numeric userid is no longer supported, as well as access from static methods. Use instance method getRule() to retrieve rules instead. |
void |
setAuthContext(oracle.mail.OESContext oes)Sets authentication context. |
void |
setConnection(java.sql.Connection conn)Deprecated. Database connection will be managed internally. There's no need to call this method anymore. |
static void |
setDBProperties(java.util.Properties dbinfo)Deprecated. use OESContext to access LDAP directory instead, which takes care of managing database connect info internally |
void |
setDebugMode(boolean mode)Change debug setting (stdout based logging) |
void |
setRule(oracle.xml.parser.v2.XMLDocument rule)Validate and save rule data in persistent storage. |
void |
setRuleObjects(Account rules)Saves rule to the directory given an Account object |
void |
setValidation(boolean toValidate)Sets rule validation mode. |
oracle.xml.parser.v2.XMLDocument |
stringToDoc(java.lang.String str)Parses rule data in XML text and return an XMLDocument object. |
static int |
writeRule(java.lang.String ruleStr)Deprecated. use of static method is no longer supported. Use instance method setRule() instead |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RuleParser()
throws java.lang.Exception
public RuleParser(oracle.mail.OESContext thecontext)
throws java.lang.Exception
thecontext - the authenticated OESContext objectOESContext| Method Detail |
public static void setDBProperties(java.util.Properties dbinfo)
throws java.sql.SQLException
public static java.lang.String retrieveRule(long userid)
userid - user IDpublic static int loadRule(java.lang.String filename)
filename - name of file containing XML textpublic static int writeRule(java.lang.String ruleStr)
ruleStr - rule XML text in String
public void setDebugMode(boolean mode)
throws java.lang.Exception
mode - the debug mode, true for stdout logging, false otherwisepublic void setValidation(boolean toValidate)
whether - to validate rules inputpublic void setAuthContext(oracle.mail.OESContext oes)
oes - the OESContext object containing authentication infoOESContextpublic void setConnection(java.sql.Connection conn)
conn - the connection to use for database operations
public oracle.xml.parser.v2.XMLDocument stringToDoc(java.lang.String str)
throws java.lang.Exception
str - rule data in XML text
public oracle.xml.parser.v2.XMLDocument fileToDoc(java.lang.String fileName)
throws java.lang.Exception
fileName - file containing XML text
public java.io.InputStream getRuleAsStream(long userid)
throws java.lang.Exception
userid - user ID
public java.lang.String getRule(java.lang.String name,
java.lang.String ruleType)
throws java.lang.Exception
name - the fully qualified name of the rule owner, can be either a user email address, a domain name or an installation name eg. john.doe@oracle.com, dmv.gov, install1ruleType - values from ownerType attribute: "user", "domain" or "system"
public java.lang.String getRule()
throws java.lang.Exception
public java.lang.String getRule(long userid)
throws java.lang.Exception
userid - user ID
public Account getRuleObjects(java.io.InputStream ruleStream)
throws java.io.IOException,
org.xml.sax.SAXException,
oracle.xml.parser.v2.XMLParseException
ruleStream - an InputStream containing rule XML text
public Account getRuleObjects(java.io.Reader ruleReader)
throws java.io.IOException,
org.xml.sax.SAXException,
oracle.xml.parser.v2.XMLParseException
ruleReader - a Reader object containing rule XML textAccount
public Account getRuleObjects(long userid)
throws java.lang.Exception
userid - user ID
public Account getRuleObjects(java.lang.String name,
java.lang.String ruleType)
throws java.lang.Exception
name - rule owner name, either a qualified username, domain name or installation nameruleType - valid values in ownerType attribute: "user", "domain" or "system"Account
public Account getRuleObjects()
throws java.lang.Exception
Account
public void setRule(oracle.xml.parser.v2.XMLDocument rule)
throws java.lang.Exception
rule - an XMLDocument object containing rule dataXMLDocument
public void setRuleObjects(Account rules)
throws java.lang.Exception
rules - an Account object containing rule dataAccount
public void renameUpdate(java.lang.String oldUsername,
java.lang.String newUsername,
oracle.mail.ldap.ESDSContext dctx,
java.sql.Connection conn)
throws java.lang.Exception
oldUsername - old mail user ID (qualified)newUsername - new name (qualified)dctx - authenticated LDAP contextconn - JDBC database connection
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||