public interface RuleManager
| Modifier and Type | Method | Description |
|---|---|---|
void |
delete(java.lang.String ruleName) |
Removes a rule from the server.
|
boolean |
exists(java.lang.String ruleName) |
Tests for existence of rule on the REST server.
|
<T extends RuleListReadHandle> |
match(StructureWriteHandle document,
java.lang.String[] candidateRules,
T ruleListHandle) |
Matches server rules based on a document supplied in a write handle.
|
<T extends RuleListReadHandle> |
match(StructureWriteHandle document,
java.lang.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> |
match(QueryDefinition docQuery,
long start,
long pageLength,
java.lang.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,
java.lang.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(java.lang.String[] docIds,
java.lang.String[] candidateRules,
T ruleListHandle) |
Matches server rules based on an array of document IDs and an array of rule names.
|
<T extends RuleListReadHandle> |
match(java.lang.String[] docIds,
java.lang.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(java.lang.String[] docIds,
T ruleListHandle) |
Matches server rules based on an array of document IDS.
|
<T extends RuleListReadHandle> |
matchAs(java.lang.Object content,
java.lang.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(java.lang.Object content,
java.lang.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(java.lang.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(java.lang.String ruleName,
T readHandle) |
Reads a rule from the server into the provided handle.
|
<T> T |
readRuleAs(java.lang.String ruleName,
java.lang.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(java.lang.String ruleName,
RuleWriteHandle writeHandle) |
Writes a rule to the server from the provided handle.
|
void |
writeRuleAs(java.lang.String ruleName,
java.lang.Object ruleSource) |
Writes a rule to the server in an XML representation provided
as an object of an IO class.
|
boolean exists(java.lang.String ruleName)
ruleName - Name of the rule<T> T readRuleAs(java.lang.String ruleName,
java.lang.Class<T> as)
throws ResourceNotFoundException,
ForbiddenUserException,
FailedRequestException
ContentHandle are registered.
Learn more about shortcut methodsT - the type of object that will be returned by the handle registered for itruleName - name of rule on REST serveras - the IO class for reading the ruleResourceNotFoundExceptionForbiddenUserExceptionFailedRequestException<T extends RuleReadHandle> T readRule(java.lang.String ruleName, T readHandle) throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException
T - the type of RuleReadHandle to returnruleName - Name of rule on REST server.readHandle - Handle that will accept the rule payload. Often will be an instance of RuleDefinition.ResourceNotFoundExceptionForbiddenUserExceptionFailedRequestExceptionvoid writeRuleAs(java.lang.String ruleName,
java.lang.Object ruleSource)
throws ResourceNotFoundException,
ForbiddenUserException,
FailedRequestException
ContentHandle are registered.
Learn more about shortcut methodsruleName - name of rule on REST serverruleSource - an IO representation of the ruleResourceNotFoundExceptionForbiddenUserExceptionFailedRequestExceptionvoid 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.ResourceNotFoundExceptionForbiddenUserExceptionFailedRequestExceptionvoid writeRule(java.lang.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(java.lang.String ruleName)
throws ForbiddenUserException,
FailedRequestException
ruleName - Name of rule on REST server.ForbiddenUserExceptionFailedRequestException<T extends RuleListReadHandle> T match(QueryDefinition docQuery, T ruleListHandle)
T - the type of RuleListReadHandle to returndocQuery - 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, java.lang.String[] candidateRules, T ruleListHandle)
T - the type of RuleListReadHandle to returndocQuery - 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, java.lang.String[] candidateRules, T ruleListHandle, ServerTransform transform)
T - the type of RuleListReadHandle to returndocQuery - 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(java.lang.String[] docIds, T ruleListHandle)
T - the type of RuleListReadHandle to returndocIds - An array of document IDs to match against.ruleListHandle - A handle to hold the match results.<T extends RuleListReadHandle> T match(java.lang.String[] docIds, java.lang.String[] candidateRules, T ruleListHandle)
T - the type of RuleListReadHandle to returndocIds - 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(java.lang.String[] docIds, java.lang.String[] candidateRules, T ruleListHandle, ServerTransform transform)
T - the type of RuleListReadHandle to returndocIds - 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(java.lang.Object content, T ruleListHandle)
ContentHandle are registered.
Learn more about shortcut methodsT - the type of object that will be returned by the handle registered for itcontent - an IO representation of the document to match against rulesruleListHandle - a handle to hold the match results<T extends RuleListReadHandle> T matchAs(java.lang.Object content, java.lang.String[] candidateRules, T ruleListHandle)
ContentHandle are registered.
Learn more about shortcut methodsT - the type of object that will be returned by the handle registered for itcontent - 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(java.lang.Object content, java.lang.String[] candidateRules, T ruleListHandle, ServerTransform transform)
ContentHandle are registered.
Learn more about shortcut methodsT - the type of RuleListReadHandle to returncontent - 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)
T - the type of RuleListReadHandle to returndocument - A document payload to match against rules.ruleListHandle - A handle to hold the match results.<T extends RuleListReadHandle> T match(StructureWriteHandle document, java.lang.String[] candidateRules, T ruleListHandle)
T - the type of RuleListReadHandle to returndocument - 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, java.lang.String[] candidateRules, T ruleListHandle, ServerTransform transform)
T - the type of RuleListReadHandle to returndocument - 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-2019 MarkLogic Corporation.