RuleSetRepository Interface

com.bea.p13n.rules.manager
RuleSetRepository Interface

public interface RuleSetRepository

This interface defines the operations necessary to add, remove, and retrieve rule set XML documents to and from a rule set store. All rule set repository subsystems must implement this interface; however, the following operations are optional, and may not be supported by all implementations:

Related Topics

RuleSetArchive


All Known Subinterfaces

RulesManager

Field Summary

public static final int
BINARY_FORMAT
Rule set format: binary representation.
public static final int
STRING_FORMAT
Rule set format: XML string representation.
 

Method Summary

public Object
getRuleSet(String ruleSetUri, int format)
Retrieves the rule set with the given URI in the specified format.
public Collection
getRuleSets()
Retrieves a Collection containing the URI strings of all the rule sets available in the rule set repository subsystem.
public void
removeRuleSet(String ruleSetUri)
Removes a rule set with the given URI.
public void
setRuleSet(RuleSetArchive archive)
Saves a new or updated rule set.

Field Detail

BINARY_FORMAT

public static final int BINARY_FORMAT
Rule set format: binary representation.


STRING_FORMAT

public static final int STRING_FORMAT
Rule set format: XML string representation.

 

Method Detail

getRuleSet(String, int) Method

public Object getRuleSet(String ruleSetUri, 
                         int format)
throws RuleSetNotFoundException, ApplicationException, IllegalArgumentException, RemoteException
Retrieves the rule set with the given URI in the specified format. The format of a returned rule set may be one of the following:

Parameters

ruleSetUri
the URI of the target rule set.
format
the desired format of the returned rule set.

Returns

the rule set in the specified format.

Exceptions

RuleSetNotFoundException
if the rule set referenced by the supplied URI cannot be located by the rule set repository subsystem.
ApplicationException
if the rule set repository subsystem is unable to retrieve the rule set.
IllegalArgumentException
if the ruleSetUri is an invalid rule set URI or if the format is not supported.
RemoteException
if a communication error occurs during the execution of a remote method call.

getRuleSets() Method

public Collection getRuleSets()
throws ApplicationException, RemoteException
Retrieves a Collection containing the URI strings of all the rule sets available in the rule set repository subsystem.

The rule sets represented by the returned URI strings may then be retrieved by supplying each returned rule set URI string to the getRuleSet method.

Returns

a Collection of all rule set URI strings.

Exceptions

ApplicationException
if the rule set repository subsystem is unable to retrieve the rule set URI strings.
RemoteException
if a communication error occurs during the execution of a remote method call.

removeRuleSet(String) Method

public void removeRuleSet(String ruleSetUri)
throws RuleSetNotFoundException, ApplicationException, IllegalArgumentException, UnsupportedOperationException, RemoteException
Removes a rule set with the given URI.

Parameters

ruleSetUri
the URI of the target rule set.

Exceptions

RuleSetNotFoundException
if the rule set referenced by the supplied URI cannot be located by the rule set repository subsystem.
ApplicationException
if the rule set repository subsystem is unable to remove the rule set.
IllegalArgumentException
if the ruleSetUri is an invalid rule set URI.
UnsupportedOperationException
if the setRuleSet operation is not supported by the rule set repository subsystem.
RemoteException
if a communication error occurs during the execution of a remote method call.

setRuleSet(RuleSetArchive) Method

public void setRuleSet(RuleSetArchive archive)
throws ApplicationException, IllegalArgumentException, UnsupportedOperationException, RemoteException
Saves a new or updated rule set. This method is an optional operation that may not be supported by the rule set repository subsystem.

Parameters

archive
the RuleSetArchive that contains the rule set deployment information.

Exceptions

ApplicationException
if the rule set repository subsystem is unable to persist the rule set.
IllegalArgumentException
if the RuleSetArchive is invalid.
UnsupportedOperationException
if the setRuleSet operation is not supported by the rule set repository subsystem.
RemoteException
if a communication error occurs during the execution of a remote method call.