Oracle Fusion Middleware User Messaging Service 11.1.1.3.0 Java API Reference
E14011-02

oracle.sdp.messaging.userprefs
Interface UserPrefsServices


public interface UserPrefsServices

This is the root interface for creating, deleting, and finding the user extension objects such as devices, addresses, rulesets, etc.


Method Summary
 DeviceAddress createDeviceAddress(UserDevice userDevice, java.lang.String address)
          Create a device address for use in User Delivery Preference.
 RuleSet createRuleSet(java.lang.String userID)
           
 UserDevice createUserDevice(java.lang.String userID, java.lang.String name)
          Create a new user device object.
 UserRuleSet createUserRuleSet(java.lang.String userID)
          Create user rule set for the specified user.
 void delete(UserPrefsObject object)
          Delete the specified UserPrefsObject.
 Set<DeviceAddress> findAllDeviceAddresses(DeliveryType[] deliveryTypes, java.lang.String addressExp)
           
 DeviceAddress findDeviceAddress(java.lang.String address)
          Finds the device address object which contains the specified address value.
 Set<RuleSet> findRuleSets(java.lang.String[] guids)
          Find the rule sets for the specified users.
 Set<UserDevice> findUserDevices(java.lang.String userID, java.lang.String nameExp)
          Finds all user devices for a given user id that match the user name name regular expression value.
 Set<UserRuleSet> findUserRuleSets(java.lang.String[] guids)
           
 BusinessRuleTerm[] getBusinessRuleTerms()
           
 java.lang.String getBusinessTermType(java.lang.String businessTermName)
           
 DeviceAddress getDefaultAddress(java.lang.String userID)
          gets the DefaultAddress of the specified user
 DeliveryPreference getDeliveryPreference(java.lang.String userID, Hashtable<java.lang.String,java.lang.Object> facts)
          getDeliveryPreference
 Set<DeliveryPreference> getDeliveryPreferences(java.lang.String[] guids, Hashtable<java.lang.String,java.lang.Object> facts)
          getDeliveryPreferences
 Set<DeviceAddress> getDeviceAddresses(java.lang.String[] addrids)
          Get device addresses for the specified address ids.
 Set<DeviceAddress> getDeviceAddresses(java.lang.String userGUID, java.lang.String[] addrids)
          Get device addresses for the specified user and address ids.
 RuleSet getRuleSet(java.lang.String userID)
          Get the rule set for the specified user.
 UserRuleSet getUserRuleSet(java.lang.String userID)
          Retrieve the rule set for the specified userID.
 UserRuleSet getUserRuleSet(java.lang.String userID, boolean create)
          Retrieve the rule set for the specified userID, and specify whether to create a new rule set if one does not already exist.
 TermOperationType[] getValidOperations(java.lang.String type)
           
 void reload(UserPrefsObject object)
           
 void removeRuleSet(java.lang.String userID)
          Remove the rule set for the specified user.
 void removeUserRuleSet(java.lang.String userID)
           
 void save(UserPrefsObject object)
           
 

Method Detail

createDeviceAddress

DeviceAddress createDeviceAddress(UserDevice userDevice,
                                  java.lang.String address)
                                  throws UserPrefsException,
                                         java.lang.IllegalArgumentException,
                                         ObjectAlreadyExistsException
Create a device address for use in User Delivery Preference.

Parameters:
userDevice - the device to which the created address is associated
address - the unique user device address
Returns:
create a unique DeviceAddress instance
Throws:
UserPrefsException - if there is a fault or exception on the server side
java.lang.IllegalArgumentException - if a parameter is null
ObjectAlreadyExistsException - if duplicate object creation is attempted

createRuleSet

RuleSet createRuleSet(java.lang.String userID)
                      throws UserPrefsException,
                             java.lang.IllegalArgumentException,
                             ObjectAlreadyExistsException
Parameters:
userID - globally unique user id
Returns:
create a unique RuleSet instance
Throws:
UserPrefsException - if there is a fault or exception on the server side
java.lang.IllegalArgumentException - if the userID is null
ObjectAlreadyExistsException - if duplicate object creation is attempted

createUserDevice

UserDevice createUserDevice(java.lang.String userID,
                            java.lang.String name)
                            throws UserPrefsException,
                                   java.lang.IllegalArgumentException,
                                   ObjectAlreadyExistsException
Create a new user device object. *

Parameters:
userID - globally unique user id
name - the name of the user device. It is unique per device.
Returns:
a new UserDevice instance
Throws:
UserPrefsException - if there is a fault or exception on the server side
java.lang.IllegalArgumentException - if userID or name is null
ObjectAlreadyExistsException - if duplicate object creation is attempted

createUserRuleSet

UserRuleSet createUserRuleSet(java.lang.String userID)
                              throws UserPrefsException,
                                     java.lang.IllegalArgumentException,
                                     ObjectAlreadyExistsException
Create user rule set for the specified user.

Parameters:
userID - globally unique user id
Returns:
create a unique UserRuleSet instance
Throws:
UserPrefsException - if there is a fault or exception on the server side
java.lang.IllegalArgumentException - if the userID is null
ObjectAlreadyExistsException - if duplicate object creation is attempted

delete

void delete(UserPrefsObject object)
            throws UserPrefsException,
                   java.lang.IllegalArgumentException,
                   ObjectNotFoundException
Delete the specified UserPrefsObject. *

Parameters:
object - Object(RuleSet, DeviceAddress, UserDevice) to be removed from the persistent store.
Throws:
UserPrefsException - thrown if there is a fault or exception on the server side
java.lang.IllegalArgumentException - if the argument is null
ObjectNotFoundException - if the UserPrefsObject does not exist

findAllDeviceAddresses

Set<DeviceAddress> findAllDeviceAddresses(DeliveryType[] deliveryTypes,
                                          java.lang.String addressExp)
                                          throws UserPrefsException,
                                                 java.lang.IllegalArgumentException
Parameters:
deliveryTypes - array of delivery type objects
addressExp - the regular expression of the address. The expression is limited to semantics of 'LIKE' clause in SQL.
Returns:
a set of DeviceAddress objects that match the search criteria. If both the arguments are null values, all the DeviceAddress objects are returned
Throws:
UserPrefsException - if there is a fault or exception on the server side
java.lang.IllegalArgumentException - if a parameter is null

findDeviceAddress

DeviceAddress findDeviceAddress(java.lang.String address)
                                throws UserPrefsException,
                                       java.lang.IllegalArgumentException
Finds the device address object which contains the specified address value.

Parameters:
address - the address value for the device address
Returns:
a DeviceAddress objects that matches the address value.
Throws:
UserPrefsException - if there is a fault or exception on the server side
java.lang.IllegalArgumentException - if a parameter is null

findRuleSets

Set<RuleSet> findRuleSets(java.lang.String[] guids)
                          throws UserPrefsException
Find the rule sets for the specified users.

Parameters:
guids - the array of global user ids
Returns:
a set of RuleSet objects. The resulting set is empty if the argument array is null or empty.
Throws:
UserPrefsException - if there is a fault or exception on the server side

findUserDevices

Set<UserDevice> findUserDevices(java.lang.String userID,
                                java.lang.String nameExp)
                                throws UserPrefsException
Finds all user devices for a given user id that match the user name name regular expression value.

Parameters:
userID - globally unique user id
nameExp - the regular expression of the user device name. The expression is limited to semantics of 'LIKE' clause in SQL.
Returns:
a set of UserDevice objects that match the search criteria. If both the arguments are null, all the UserDevice objects are returned
Throws:
UserPrefsException - if there is a fault or exception on the server side

findUserRuleSets

Set<UserRuleSet> findUserRuleSets(java.lang.String[] guids)
                                  throws UserPrefsException
Parameters:
guids - array of global user ids
Returns:
a set of RuleSet objects. The resulting set is empty if the argument array is null or empty.
Throws:
UserPrefsException - if there is a fault or exception on the server side

getBusinessRuleTerms

BusinessRuleTerm[] getBusinessRuleTerms()
Returns:
an array containing all valid BusinessRuleTerms

getBusinessTermType

java.lang.String getBusinessTermType(java.lang.String businessTermName)
Parameters:
businessTermName - the name of the Business Term
Returns:
a string describing the BusinessTermType

getDefaultAddress

DeviceAddress getDefaultAddress(java.lang.String userID)
                                throws UserPrefsException
gets the DefaultAddress of the specified user

Parameters:
userID -
Returns:
default address of the specified user, or null if no default address is set for the specified user
Throws:
UserPrefsException

getDeliveryPreference

DeliveryPreference getDeliveryPreference(java.lang.String userID,
                                         Hashtable<java.lang.String,java.lang.Object> facts)
                                         throws UserPrefsException,
                                                java.lang.IllegalArgumentException
getDeliveryPreference

Parameters:
userID - the user id
facts - the hashtable containing the business terms and values
Returns:
DeliveryPreference (contains the action and device addresses)
Throws:
UserPrefsException
java.lang.IllegalArgumentException

getDeliveryPreferences

Set<DeliveryPreference> getDeliveryPreferences(java.lang.String[] guids,
                                               Hashtable<java.lang.String,java.lang.Object> facts)
                                               throws UserPrefsException
getDeliveryPreferences

Parameters:
guids - array of user ids
facts - the hashtable containing the business terms and values
Returns:
a set of DeliveryPreference (contains the action and device addresses)
Throws:
UserPrefsException

getDeviceAddresses

Set<DeviceAddress> getDeviceAddresses(java.lang.String[] addrids)
                                      throws UserPrefsException
Get device addresses for the specified address ids.

Parameters:
addrids - the array of global device address ids
Returns:
a set of DeviceAddress objects. The resulting set is empty if the argument array is null or empty.
Throws:
UserPrefsException - if there is a fault or exception on the server side

getDeviceAddresses

Set<DeviceAddress> getDeviceAddresses(java.lang.String userGUID,
                                      java.lang.String[] addrids)
                                      throws UserPrefsException
Get device addresses for the specified user and address ids.

Parameters:
userGUID - globally unique id
addrids - the array of global device address ids
Returns:
a set of DeviceAddress objects. The resulting set is empty if the argument array is null or empty.
Throws:
UserPrefsException - if there is a fault or exception on the server side

getRuleSet

RuleSet getRuleSet(java.lang.String userID)
                   throws UserPrefsException,
                          java.lang.IllegalArgumentException
Get the rule set for the specified user. *

Parameters:
userID - the unique id for the RuleSet
Returns:
ruleset for the userID
Throws:
UserPrefsException - if there is a fault or exception on the server side
java.lang.IllegalArgumentException - if userID is null

getUserRuleSet

UserRuleSet getUserRuleSet(java.lang.String userID)
                           throws UserPrefsException,
                                  java.lang.IllegalArgumentException,
                                  ObjectNotFoundException
Retrieve the rule set for the specified userID. Equivalent to calling getUserRuleSet(userID, false)

Parameters:
userID - the unique id for the RuleSet
Returns:
UserRuleSet for the userID
Throws:
UserPrefsException - if there is a fault or exception on the server side
java.lang.IllegalArgumentException - if userID is null
ObjectNotFoundException - if no rule set exists for the specified user

getUserRuleSet

UserRuleSet getUserRuleSet(java.lang.String userID,
                           boolean create)
                           throws UserPrefsException,
                                  java.lang.IllegalArgumentException,
                                  ObjectNotFoundException
Retrieve the rule set for the specified userID, and specify whether to create a new rule set if one does not already exist.

Parameters:
userID - the unique id for the RuleSet
create - flag to indicate if a user rule set should be created if it does not exist
Returns:
UserRuleSet for the userID
Throws:
UserPrefsException - if there is a fault or exception on the server side
java.lang.IllegalArgumentException - if userID is null
ObjectNotFoundException - if no rule set exists for the specified user, and the create parameter is false

getValidOperations

TermOperationType[] getValidOperations(java.lang.String type)
Parameters:
type - String describing the Business Term Type
Returns:
an array of TermOperationType

reload

void reload(UserPrefsObject object)
            throws UserPrefsException,
                   java.lang.IllegalArgumentException
Parameters:
object - Object (RuleSet, DeviceAddress, UserDevice) to be reloaded from the persistent store. It will then hold the current vaues.
Throws:
UserPrefsException - if there is a fault or exception on the server side
java.lang.IllegalArgumentException - if the argument is null

removeRuleSet

void removeRuleSet(java.lang.String userID)
                   throws UserPrefsException,
                          java.lang.IllegalArgumentException,
                          ObjectNotFoundException
Remove the rule set for the specified user.

Parameters:
userID - the unique id for the RuleSet
Throws:
UserPrefsException - if there is a fault or exception on the server side
java.lang.IllegalArgumentException - if userID is null
ObjectNotFoundException - thrown if rule set does not exist

removeUserRuleSet

void removeUserRuleSet(java.lang.String userID)
                       throws UserPrefsException,
                              java.lang.IllegalArgumentException,
                              ObjectNotFoundException
Parameters:
userID - the unique id for the UserRuleSet
Throws:
UserPrefsException - if there is a fault or exception on the server side
java.lang.IllegalArgumentException - if userID is null
ObjectNotFoundException - if userID does not exist

save

void save(UserPrefsObject object)
          throws UserPrefsException,
                 java.lang.IllegalArgumentException
Parameters:
object - Object(RuleSet, DeviceAddress, UserDevice) to be saved into the persistent store. This is used to permanantly save the values of the object after any changes have been made.
Throws:
UserPrefsException - if there is a fault or exception on the server side
java.lang.IllegalArgumentException - if the argument is null

Oracle Fusion Middleware User Messaging Service 11.1.1.3.0 Java API Reference
E14011-02

Copyright © 2010 Oracle and/or its affiliates. All rights reserved.