Oracle Fusion Middleware User Messaging Service 11.1.1.6.0 Java API Reference
E14011-04

oracle.sdp.messaging.userprefs
Interface FilterCondition

All Superinterfaces:
Serializable

public interface FilterCondition
extends Serializable

This class represents the conditions defined in the user rules

FilterCondition helper function to create conditions to the rule type. It use exceptions to enforce that the operation types and the number and types of the arguments are correct.

Since:
11.0.0

Method Summary
 BusinessRuleTerm getBusinessRuleTerm()
          Get the business term that is to be used by the condition
 java.lang.String getBusinessTermName()
          Get the name of the business term
 java.lang.String getBusinessTermType()
          Get the type of the business term
 java.lang.Object getOperandOne()
          Get the first operand of the condition
 java.lang.Object getOperandTwo()
          Get the second operand of the condition
 TermOperationType getTermOperation()
          Get the operation of the condition
 Iterator<BusinessRuleTerm> getValidBusinessTerms()
           
 Iterator<java.lang.String> getValidTerms()
           
 boolean isEqual(FilterCondition f)
          Check if the two filter conditions are the same
 boolean isValidTerm(BusinessRuleTerm t)
          Validate if the RuleTerm is a valid business term
 boolean isValidTerm(java.lang.String t)
          Validate if the RuleTerm is a valid business term
 void setFilterTerm(java.lang.String name)
          Set the business term that is to be used by the condition
 void setOperandOne(java.lang.Object o1)
          Set the first operand of the condition
 void setOperandTwo(java.lang.Object o2)
          Set the second operand of the condition
 void setTermOperation(TermOperationType value)
          Sets the operation of the condition
 boolean validate()
          Check that the Object is valid
 

Method Detail

getBusinessRuleTerm

BusinessRuleTerm getBusinessRuleTerm()
Get the business term that is to be used by the condition

Returns:
the BusinessRuleTerm of the condition

getBusinessTermName

java.lang.String getBusinessTermName()
Get the name of the business term

Returns:
the name of the business term

getBusinessTermType

java.lang.String getBusinessTermType()
Get the type of the business term

Returns:
the type of the business term in the rule

getOperandOne

java.lang.Object getOperandOne()
Get the first operand of the condition

Returns:
the first operand of the condition

getOperandTwo

java.lang.Object getOperandTwo()
Get the second operand of the condition

Returns:
the second operand of the condition

getTermOperation

TermOperationType getTermOperation()
Get the operation of the condition

Returns:
the operation of the condition

getValidBusinessTerms

Iterator<BusinessRuleTerm> getValidBusinessTerms()
Returns:
an iterator of the defined business terms

getValidTerms

Iterator<java.lang.String> getValidTerms()
Returns:
an iterator of the defined business terms

isEqual

boolean isEqual(FilterCondition f)
Check if the two filter conditions are the same

Parameters:
f - the filter condition to compare
Returns:
true if both objects represent the same filter condition, false otherwise

isValidTerm

boolean isValidTerm(BusinessRuleTerm t)
Validate if the RuleTerm is a valid business term

Parameters:
t - Business term
Returns:
true if t is a defined business term, false otherwise

isValidTerm

boolean isValidTerm(java.lang.String t)
Validate if the RuleTerm is a valid business term

Parameters:
t - business term
Returns:
true if t is a defined business term

setFilterTerm

void setFilterTerm(java.lang.String name)
                   throws UserRuleSetValidationException
Set the business term that is to be used by the condition

Parameters:
name - the name of the business term
Throws:
UserRuleSetValidationException - it the value of bt is not a defined business term

setOperandOne

void setOperandOne(java.lang.Object o1)
                   throws UserRuleSetValidationException
Set the first operand of the condition

Parameters:
o1 - the first operand of the condition
Throws:
UserRuleSetValidationException - if TermOperation has not been set, the operation does not accept operands, or the operand is of the wrong type.

setOperandTwo

void setOperandTwo(java.lang.Object o2)
                   throws UserRuleSetValidationException
Set the second operand of the condition

Parameters:
o2 - the second operand of the condition
Throws:
UserRuleSetValidationException - if TermOperation has not been set, the operation does not accept two operands, or the operand is of the wrong type.

setTermOperation

void setTermOperation(TermOperationType value)
                      throws UserRuleSetValidationException
Sets the operation of the condition

Parameters:
value - the operation of the condition
Throws:
UserRuleSetValidationException - if the business term has not been set or operation is not valid for the business term

validate

boolean validate()
                 throws UserRuleSetValidationException
Check that the Object is valid

Returns:
true if the object is valid, false otherwise
Throws:
UserRuleSetValidationException - if the object is invalid

Oracle Fusion Middleware User Messaging Service 11.1.1.6.0 Java API Reference
E14011-04

Copyright © 2009, 2011 Oracle and/or its affiliates. All rights reserved.