Oracle Email Java API Reference
Release 2(9.0.4)

B10724-01

oracle.mail.sdk.rule
Class RuleType

java.lang.Object
  |
  +--oracle.xml.classgen.CGXSDElement
        |
        +--oracle.mail.sdk.rule.RuleElement
              |
              +--oracle.mail.sdk.rule.RuleType

public class RuleType
extends RuleElement

This class represents one rule. A rule can contain a condition and a list of actions. RuleType objects are building blocks for RuleListType objects. A RuleType object may have the following attributes:

A RuleType object may have at most one Condition object. If there is no Condition object, the rule is said to be "unconditional". An unconditional rule will be executed every time. A RuleType object may have more than one action, and the actions are executed in order.

Since:
9.0
Version:
$Header: RuleType.java 10-jan-2002.17:06:29 haye Exp $
See Also:
RuleListType

Constructor Summary
RuleType()
           

 

Method Summary
 void addAction(ActionType theaction)
          Adds one action element.
 void addCondition(ConditionType thecondition)
          Adds the condition object.
 java.util.Vector getActions()
          Gets the Action list as a Vector.
 java.lang.String getActive()
          Gets the value of the Active attribute.
 ConditionType getCondition()
          Gets the condition object.
 java.lang.String getDescription()
          Gets the value of attribute Description.
 java.lang.String getGroup()
          Gets the value of attribute Group.
 java.lang.String getVisible()
          Gets the value of the Visible attribute.
 void print(oracle.xml.parser.v2.XMLOutputStream out)
          Prints in XML format of this object.
 void removeCondition()
          Removes the condition object.
 void setActions(java.util.Vector actions)
          Resets the action list with the given list of actions.
 void setActive(java.lang.String theactive)
          Sets the value of Active attribute, either "yes" or "no".
 void setDescription(java.lang.String thedescription)
          Sets the value of attribute Description.
 void setGroup(java.lang.String thegroup)
          Sets the value of attribute Group.
 void setVisible(java.lang.String thevisible)
          Sets the value of Visible attribute, either "yes" or "no".

 

Methods inherited from class oracle.mail.sdk.rule.RuleElement
getParent, getType, printAttributes, removeAll, removeAt

 

Methods inherited from class oracle.xml.classgen.CGXSDElement
getAttributes, getChildElements, getNodeValue, printAttributes

 

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

 

Constructor Detail

RuleType

public RuleType()
Method Detail

setVisible

public void setVisible(java.lang.String thevisible)
                throws java.lang.IllegalArgumentException,
                       oracle.xml.classgen.InvalidContentException
Sets the value of Visible attribute, either "yes" or "no". A non-visible rule may not be shown to the end user.
Parameters:
thevisible - the value to which the attribute is set
Throws:
java.lang.IllegalArgumentException - if the attribute is not valid.

getVisible

public java.lang.String getVisible()
Gets the value of the Visible attribute.
Returns:
the value of the Visible attribute

setActive

public void setActive(java.lang.String theactive)
               throws java.lang.IllegalArgumentException,
                      oracle.xml.classgen.InvalidContentException
Sets the value of Active attribute, either "yes" or "no". A non-active rule will not be executed at runtime.
Parameters:
theactive - the value to which the attribute is set
Throws:
java.lang.IllegalArgumentException - if the attribute is not valid.

getActive

public java.lang.String getActive()
Gets the value of the Active attribute.
Returns:
the value of the Active attribute

setDescription

public void setDescription(java.lang.String thedescription)
                    throws java.lang.IllegalArgumentException
Sets the value of attribute Description.
Parameters:
thedescription - the value to which the attribute is set
Throws:
java.lang.IllegalArgumentException - if the attribute is not valid.

getDescription

public java.lang.String getDescription()
Gets the value of attribute Description.
Returns:
description the attribute

setGroup

public void setGroup(java.lang.String thegroup)
              throws java.lang.IllegalArgumentException
Sets the value of attribute Group. Rules with the same group name can be operated upon together.
Parameters:
thegroup - the value to which the attribute is set
Throws:
java.lang.IllegalArgumentException - if the attribute is not valid.

getGroup

public java.lang.String getGroup()
Gets the value of attribute Group.
Returns:
the group attribute value.

addCondition

public void addCondition(ConditionType thecondition)
                  throws oracle.xml.classgen.InvalidContentException
Adds the condition object. If a condition object already exists, this new object will replace the original object, since there can be only one condition object for a rule.
Parameters:
thecondition - the element node
Throws:
oracle.xml.classgen.InvalidContentException - if the element is not valid.
See Also:
ConditionType

removeCondition

public void removeCondition()
Removes the condition object.

getCondition

public ConditionType getCondition()
Gets the condition object.
Returns:
the condition object of class ConditionType

addAction

public void addAction(ActionType theaction)
               throws oracle.xml.classgen.InvalidContentException
Adds one action element. More than one action objects can be added. The newest action object will be added to the end of the action list.
Parameters:
theaction - the element node
Throws:
oracle.xml.classgen.InvalidContentException - if the element is not valid.
See Also:
ActionType

setActions

public void setActions(java.util.Vector actions)
                throws oracle.xml.classgen.InvalidContentException
Resets the action list with the given list of actions. This method can be used to re-order actions within a rule.
Parameters:
actions - the list of action objects
Throws:
oracle.xml.classgen.InvalidContentException - if the element is not valid.

getActions

public java.util.Vector getActions()
Gets the Action list as a Vector.
Returns:
the list of action objects

print

public void print(oracle.xml.parser.v2.XMLOutputStream out)
           throws java.io.IOException
Prints in XML format of this object. The output is a fragment of an XML document.
Overrides:
print in class oracle.xml.classgen.CGXSDElement
Parameters:
out - the Output Stream
Throws:
java.io.IOException - if there is an error in writing the output
See Also:
XMLOutputStream

Oracle Email Java API Reference
Release 2(9.0.4)

B10724-01

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