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

oracle.sdp.messaging.userprefs
Interface UserRule

All Superinterfaces:
Serializable

public interface UserRule
extends Serializable

This Interface represents each of the user defined rules

Since:
11.0.0

Method Summary
 void addDeviceid(java.lang.String id)
          Add a new device ID to the rule
 void addFilterCondition(FilterCondition fc)
          Add a filter condition to the rule
 boolean containsDeviceID(java.lang.String id)
           
 boolean containsFilterCondition(FilterCondition fc)
           
 boolean deleteDeviceid(java.lang.String id)
          Remove the device id from the device list.
 boolean deleteFilterCondition(FilterCondition fc)
          Delete the filter condition from the rule
 FilterCondition factoryFilterCondition()
          Factory method for the filter conditions
 ActionOperationType getActionOperation()
          Get the action operation type of the rule
 Iterator<java.lang.String> getDeviceid()
          Get an iterator for the devices selected for the rule
 Iterator<FilterCondition> getFilterCondition()
          Get an iterator with the filter conditions of the rule
 FilterOperationType getFilterOperation()
           
 java.lang.String getRuleDescription()
           
 java.lang.String getRuleName()
           
 boolean isEqual(UserRule u)
          Check if two objects represent the same rule
 void modifyFilterCondition(FilterCondition fc)
          Modify an existing filter condition
 void moveDeviceID(int origin, int destination)
          Move a device id to a different position
 void moveFilterCondition(int origin, int destination)
          Move a filter condition to a different position
 void setActionOperation(ActionOperationType value)
          Set the action operation type of the rule
 void setFilterOperation(FilterOperationType value)
          Set the filter operation of the rule to either ALL_CONDITIONS or ANY_CONDITION
 void setRuleDescription(java.lang.String value)
          Set the description of the rule
 void setRuleName(java.lang.String value)
          Set the name of the rule
 int sizeDeviceID()
          Query the number of devices in the rule
 int sizeFilterCondition()
          Query the number of filter conditions
 boolean validate()
           
 

Method Detail

addDeviceid

void addDeviceid(java.lang.String id)
                 throws UserRuleSetValidationException
Add a new device ID to the rule

Parameters:
id - the guid of the device being added
Throws:
UserRuleSetValidationException - if the ActionOperationType is not BROADCAST or FAIL_OVER or if the device has already been added

NOTE: The function does not check if the guid is a valid device.


addFilterCondition

void addFilterCondition(FilterCondition fc)
                        throws UserRuleSetValidationException
Add a filter condition to the rule

Parameters:
fc - the filter condition to be added
Throws:
UserRuleSetValidationException - if FilterOperation is not set or FilterCondition is invalid

containsDeviceID

boolean containsDeviceID(java.lang.String id)
Parameters:
id - the device id to be tested for containment
Returns:
true if the device id is contained in the class

containsFilterCondition

boolean containsFilterCondition(FilterCondition fc)
Parameters:
fc - the filter condition to be tested for containment
Returns:
true if the filter condition is contained in the class

deleteDeviceid

boolean deleteDeviceid(java.lang.String id)
Remove the device id from the device list.

Parameters:
id - the guid of the device to be removed
Returns:
true if the device id is deleted successfully

deleteFilterCondition

boolean deleteFilterCondition(FilterCondition fc)
Delete the filter condition from the rule

Parameters:
fc - the filter condition to be removed
Returns:
true if the filter condition was deleted successfully

factoryFilterCondition

FilterCondition factoryFilterCondition()
Factory method for the filter conditions

Returns:
the class created by the factory

getActionOperation

ActionOperationType getActionOperation()
Get the action operation type of the rule

Returns:
the ActionOperationType of the rule

getDeviceid

Iterator<java.lang.String> getDeviceid()
Get an iterator for the devices selected for the rule

Returns:
An iterator with the devices selected for the rule

getFilterCondition

Iterator<FilterCondition> getFilterCondition()
Get an iterator with the filter conditions of the rule

Returns:
an iterator with the filter conditions of the rule

getFilterOperation

FilterOperationType getFilterOperation()
Returns:
the filter operation type of the rule -- either ALL_CONDITIONS or ANY_CONDITION

getRuleDescription

java.lang.String getRuleDescription()
Returns:
the description of the rule

getRuleName

java.lang.String getRuleName()
Returns:
the name of the rule

isEqual

boolean isEqual(UserRule u)
Check if two objects represent the same rule

Parameters:
u - the UserRule to compare
Returns:
true if both objects represent the same rule

modifyFilterCondition

void modifyFilterCondition(FilterCondition fc)
                           throws UserRuleSetValidationException
Modify an existing filter condition

Parameters:
fc - the filter condition to be modified
Throws:
UserRuleSetValidationException - if the filter condition is invalid or does not exist in rule

moveDeviceID

void moveDeviceID(int origin,
                  int destination)
                  throws UserRuleSetValidationException
Move a device id to a different position

Parameters:
origin - the current position of the device id
destination - the position to which the device id will be moved
Throws:
UserRuleSetValidationException - if origin is greater than the number of devices

moveFilterCondition

void moveFilterCondition(int origin,
                         int destination)
                         throws UserRuleSetValidationException
Move a filter condition to a different position

Parameters:
origin - the current position of the filter condition
destination - the position to which the filter condition will be moved
Throws:
UserRuleSetValidationException - if origin is greater than the number of filter conditions

setActionOperation

void setActionOperation(ActionOperationType value)
Set the action operation type of the rule

Parameters:
value - the action operation type to be set

setFilterOperation

void setFilterOperation(FilterOperationType value)
Set the filter operation of the rule to either ALL_CONDITIONS or ANY_CONDITION

Parameters:
value - of the FiterOperationType (valid values are ALL_CONDITIONS and ANY_CONDITION)

setRuleDescription

void setRuleDescription(java.lang.String value)
Set the description of the rule

Parameters:
value - the description of the rule

setRuleName

void setRuleName(java.lang.String value)
Set the name of the rule

Parameters:
value - the name of the rule

sizeDeviceID

int sizeDeviceID()
Query the number of devices in the rule

Returns:
the number of devices in the rule

sizeFilterCondition

int sizeFilterCondition()
Query the number of filter conditions

Returns:
the number of filter conditions in the class

validate

boolean validate()
                 throws UserRuleSetValidationException
Returns:
true if the object is valid
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.