public interface RuleManager
Modifier and Type | Method and Description |
---|---|
void |
delete(String ruleName)
Removes a rule from the server.
|
boolean |
exists(String ruleName)
Tests for existence of rule on the REST server.
|
<T extends RuleListReadHandle> |
match(QueryDefinition docQuery,
long start,
long pageLength,
String[] candidateRules,
T ruleListHandle)
Matches server rules based on results of a search, with pagination applied to search.
|
<T extends RuleListReadHandle> |
match(QueryDefinition docQuery,
long start,
long pageLength,
String[] candidateRules,
T ruleListHandle,
ServerTransform transform)
Matches server rules based on results of a search, with pagination applied to search.
|
<T extends RuleListReadHandle> |
match(QueryDefinition docQuery,
T ruleListHandle)
Matches server rules based on the results of a search.
|
<T extends RuleListReadHandle> |
match(String[] docIds,
String[] candidateRules,
T ruleListHandle)
Matches server rules based on an array of document IDs and an array of rule names.
|
<T extends RuleListReadHandle> |
match(String[] docIds,
String[] candidateRules,
T ruleListHandle,
ServerTransform transform)
Matches server rules based on an array of document IDs and an array of rule names.
|
<T extends RuleListReadHandle> |
match(String[] docIds,
T ruleListHandle)
Matches server rules based on an array of document IDS.
|
<T extends RuleListReadHandle> |
match(StructureWriteHandle document,
String[] candidateRules,
T ruleListHandle)
Matches server rules based on a document supplied in a write handle.
|
<T extends RuleListReadHandle> |
match(StructureWriteHandle document,
String[] candidateRules,
T ruleListHandle,
ServerTransform transform)
Matches server rules based on a document supplied in a write handle.
|
<T extends RuleListReadHandle> |
match(StructureWriteHandle document,
T ruleListHandle)
Matches server rules based on a document supplied in a write handle.
|
<T extends RuleListReadHandle> |
matchAs(Object content,
String[] candidateRules,
T ruleListHandle)
Matches server rules based on a document supplied
in a textual representation provided as an object of an IO class.
|
<T extends RuleListReadHandle> |
matchAs(Object content,
String[] candidateRules,
T ruleListHandle,
ServerTransform transform)
Matches server rules based on a document supplied
in a textual representation provided as an object of an IO class.
|
<T extends RuleListReadHandle> |
matchAs(Object content,
T ruleListHandle)
Matches server rules based on a document supplied
in a textual representation provided as an object of an IO class.
|
<T extends RuleReadHandle> |
readRule(String ruleName,
T readHandle)
Reads a rule from the server into the provided handle.
|
<T> T |
readRuleAs(String ruleName,
Class<T> as)
Reads a rule from the server in an XML representation provided
as an object of an IO class.
|
void |
writeRule(RuleDefinition writeHandle)
Writes a rule to the server from the provided handle.
|
void |
writeRule(String ruleName,
RuleWriteHandle writeHandle)
Writes a rule to the server from the provided handle.
|
void |
writeRuleAs(String ruleName,
Object ruleSource)
Writes a rule to the server in an XML representation provided
as an object of an IO class.
|
boolean exists(String ruleName)
ruleName
- Name of the rule<T> T readRuleAs(String ruleName, Class<T> as) throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException
ruleName
- name of rule on REST serveras
- the IO class for reading the ruleResourceNotFoundException
ForbiddenUserException
FailedRequestException
<T extends RuleReadHandle> T readRule(String ruleName, T readHandle) throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException
ruleName
- Name of rule on REST server.readHandle
- Handle that will accept the rule payload. Often will be an instance of RuleDefinition.ResourceNotFoundException
ForbiddenUserException
FailedRequestException
void writeRuleAs(String ruleName, Object ruleSource) throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException
ruleName
- name of rule on REST serverruleSource
- an IO representation of the ruleResourceNotFoundException
ForbiddenUserException
FailedRequestException
void writeRule(RuleDefinition writeHandle) throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException
writeHandle
- Handle that contains the rule payload. Must be a RuleDefinition object to use this method, which has no ruleName.ResourceNotFoundException
ForbiddenUserException
FailedRequestException
void writeRule(String ruleName, RuleWriteHandle writeHandle)
ruleName
- Name of rule on REST server.writeHandle
- Handle that contains the rule payload. Often will be an instance of RuleDefinition.void delete(String ruleName) throws ForbiddenUserException, FailedRequestException
ruleName
- Name of rule on REST server.ForbiddenUserException
FailedRequestException
<T extends RuleListReadHandle> T match(QueryDefinition docQuery, T ruleListHandle)
docQuery
- A query definition to qualify documents to match.ruleListHandle
- A handle to hold the match results.<T extends RuleListReadHandle> T match(QueryDefinition docQuery, long start, long pageLength, String[] candidateRules, T ruleListHandle)
docQuery
- A query definition to qualify documents to match.start
- The start position in query results to match.pageLength
- The number of results in the filtering query to match. Use null to return all matches.candidateRules
- An array of rule names to return in matches. Null matches all rules.ruleListHandle
- A handle to hold the match results.<T extends RuleListReadHandle> T match(QueryDefinition docQuery, long start, long pageLength, String[] candidateRules, T ruleListHandle, ServerTransform transform)
docQuery
- A query definition to qualify documents to match.start
- The start position in query results to match.pageLength
- The number of results in the filtering query to match. Use null to return all matches.candidateRules
- An array of rule names to return in matches. A zero-length array matches all rules.ruleListHandle
- A handle to hold the match results.transform
- a server transform to modify the rule list payload.<T extends RuleListReadHandle> T match(String[] docIds, T ruleListHandle)
docIds
- An array of document IDs to match against.ruleListHandle
- A handle to hold the match results.<T extends RuleListReadHandle> T match(String[] docIds, String[] candidateRules, T ruleListHandle)
docIds
- An array of document IDs to match against.candidateRules
- An array of rule names to return in matches. A zero-length array matches all rules.ruleListHandle
- A handle to hold the match results<T extends RuleListReadHandle> T match(String[] docIds, String[] candidateRules, T ruleListHandle, ServerTransform transform)
docIds
- An array of document IDs to match against.candidateRules
- An array of rule names to return in matches. A zero-length array matches all rules.ruleListHandle
- A handle to hold the match results.transform
- a server transform to modify the rule list payload.<T extends RuleListReadHandle> T matchAs(Object content, T ruleListHandle)
content
- an IO representation of the document to match against rulesruleListHandle
- a handle to hold the match results<T extends RuleListReadHandle> T matchAs(Object content, String[] candidateRules, T ruleListHandle)
content
- an IO representation of the document to match against rulescandidateRules
- an array of rule names to match. A zero-length array matches all rules.ruleListHandle
- a handle to hold the match results<T extends RuleListReadHandle> T matchAs(Object content, String[] candidateRules, T ruleListHandle, ServerTransform transform)
content
- an IO representation of the document to match against rulescandidateRules
- an array of rule names to match. A zero-length array matches all rules.ruleListHandle
- a handle to hold the match resultstransform
- a server transform to modify the rule list payload<T extends RuleListReadHandle> T match(StructureWriteHandle document, T ruleListHandle)
document
- A document payload to match against rules.ruleListHandle
- A handle to hold the match results.<T extends RuleListReadHandle> T match(StructureWriteHandle document, String[] candidateRules, T ruleListHandle)
document
- A document payload to match against rules.candidateRules
- An array of rule names to match. A zero-length array matches all rules.ruleListHandle
- A handle to hold the match results<T extends RuleListReadHandle> T match(StructureWriteHandle document, String[] candidateRules, T ruleListHandle, ServerTransform transform)
document
- A document payload to match against rules.candidateRules
- An array of rule names to match. A zero-length array matches all rules.ruleListHandle
- A handle to hold the match results.transform
- a server transform to modify the rule list payload.Copyright © 2013-2015 MarkLogic Corporation.