Interface TriggerApi
-
- All Superinterfaces:
ExternalizableStore
public interface TriggerApi extends ExternalizableStore
API for defining and modifying triggers.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.attivio.sdk.client.ExternalizableStore
ExternalizableStore.ImportOption
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSTORE_NAME
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description voidcompileDictionary(TriggerDictionaryName dictionaryName)Compile the trigger dictionary identified bydictionaryNameinto binary format.default voidcompileDictionary(java.lang.String dictionaryName)Deprecated.usecompileDictionary(TriggerDictionaryName)instead.voidcopyDictionary(TriggerDictionaryName dictionaryName, TriggerDictionaryName newName)Copy the trigger dictionary identified bydictionaryNameto a new dictionary withnewName.default voidcopyDictionary(java.lang.String dictionaryName, java.lang.String newName)Deprecated.voidcreateDictionary(TriggerDictionaryInfo info)Create a newtriggerdictionary.voidcreateTrigger(TriggerDictionaryName dictionaryName, TriggerDefinition trigger)Addtriggerto the dictionary identified bydictionaryName.default voidcreateTrigger(java.lang.String dictionaryName, TriggerDefinition trigger)Deprecated.voiddeleteDictionary(TriggerDictionaryName dictionaryName)Delete atriggerdictionary identified bydictionaryName.default voiddeleteDictionary(java.lang.String dictionaryName)Deprecated.usedeleteDictionary(TriggerDictionaryName)instead.voiddeleteTrigger(TriggerDictionaryName dictionaryName, java.lang.String triggerName)Delete trigger namedtriggerNamefor the dictionary identified bydictionaryName.default voiddeleteTrigger(java.lang.String dictionaryName, java.lang.String triggerName)Deprecated.usedeleteTrigger(TriggerDictionaryName, String)instead.voidexportDictionary(TriggerDictionaryName dictionaryName, java.io.OutputStream output)Export trigger dictionary bynametooutput.default voidexportDictionary(java.lang.String dictionaryName, java.io.OutputStream output)Deprecated.java.lang.Iterable<TriggerDictionaryInfo>getDictionaries(TriggerDictionaryName prefix, int offset, int rows)Get all dictionaries.default java.lang.Iterable<TriggerDictionaryInfo>getDictionaries(java.lang.String prefix, int offset, int rows)Deprecated.usegetDictionaries(TriggerDictionaryName, int, int)instead.TriggerDictionaryInfogetDictionary(TriggerDictionaryName dictionaryName)Get aTriggerDictionaryInfobydictionaryName.default TriggerDictionaryInfogetDictionary(java.lang.String dictionaryName)Deprecated.usegetDictionary(TriggerDictionaryName)instead.default java.util.List<java.lang.String>getDictionaryNames()Get the names of all dictionaries in the default namespace.java.util.Map<java.util.Locale,java.lang.Long>getLocales(TriggerDictionaryName dictionaryName, java.lang.String prefix)Get a map of locales for dictionary specified bydictionaryName.default java.util.Map<java.util.Locale,java.lang.Long>getLocales(java.lang.String dictionaryName, java.lang.String prefix)Deprecated.usegetLocales(TriggerDictionaryName, String)instead.default java.lang.StringgetStoreName()Get the name of this store.default longgetStoreRevision()Get the store revision for the default namespace.longgetStoreRevision(java.lang.String namespace)Get the store revision for the specifiednamespace.TriggerDefinitiongetTrigger(TriggerDictionaryName dictionaryName, java.lang.String triggerName)default TriggerDefinitiongetTrigger(java.lang.String dictionaryName, java.lang.String triggerName)Deprecated.use#getTrigger(String, String, String)instead.java.lang.Iterable<TriggerDefinition>getTriggers(TriggerDictionaryName dictionaryName, java.util.Locale locale, java.lang.String prefix, int offset, int rows)Get triggers for dictionary identified bydictionaryName.default java.lang.Iterable<TriggerDefinition>getTriggers(java.lang.String dictionaryName, java.util.Locale locale, java.lang.String prefix, int offset, int rows)Deprecated.default voidimportDictionary(byte[] input, TriggerDictionaryName newName, boolean replace)Deprecated.default voidimportDictionary(byte[] input, java.lang.String newName, boolean replace)Deprecated.voidimportDictionary(java.io.InputStream input, TriggerDictionaryName newName, boolean replace)Import a trigger dictionary frominput.default voidimportDictionary(java.io.InputStream input, java.lang.String newName, boolean replace)Deprecated.IngestDocumentprocess(TriggerDictionaryName dictionaryName, IngestDocument document, boolean published)Processdocumentaccording todictionaryName.default IngestDocumentprocess(java.lang.String dictionaryName, IngestDocument document, boolean published)Deprecated.voidpublishDictionary(TriggerDictionaryName dictionaryName)Publish the most recently compiled binary dictionary identified bydictionaryName.default voidpublishDictionary(java.lang.String dictionaryName)Deprecated.usepublishDictionary(TriggerDictionaryName)instead.voidupdateDictionary(TriggerDictionaryInfo info)Update the metadata for atriggerdictionary.voidupdateTrigger(TriggerDictionaryName dictionaryName, TriggerDefinition trigger)Updatetriggerfor the dictionary identified bydictionaryName.default voidupdateTrigger(java.lang.String dictionaryName, TriggerDefinition trigger)Deprecated.use#updateTrigger(String, String, TriggerDefinition)instead.-
Methods inherited from interface com.attivio.sdk.client.ExternalizableStore
exportStore, importStore
-
-
-
-
Field Detail
-
STORE_NAME
static final java.lang.String STORE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getStoreName
default java.lang.String getStoreName()
Description copied from interface:ExternalizableStoreGet the name of this store.This name will be the location that store configuration is synchronized to in the project's conf directory.
- Specified by:
getStoreNamein interfaceExternalizableStore
-
getStoreRevision
default long getStoreRevision() throws AttivioExceptionGet the store revision for the default namespace.- Specified by:
getStoreRevisionin interfaceExternalizableStore- Throws:
AttivioException
-
getStoreRevision
long getStoreRevision(java.lang.String namespace) throws AttivioExceptionGet the store revision for the specifiednamespace.- Throws:
AttivioException
-
getDictionary
@Deprecated default TriggerDictionaryInfo getDictionary(java.lang.String dictionaryName) throws AttivioException
Deprecated.usegetDictionary(TriggerDictionaryName)instead.Get aTriggerDictionaryInfobydictionaryName.Returns
nullif a trigger dictionary withdictionaryNamedoes not exist.- Throws:
AttivioException
-
getDictionary
TriggerDictionaryInfo getDictionary(TriggerDictionaryName dictionaryName) throws AttivioException
Get aTriggerDictionaryInfobydictionaryName.Returns
nullif a trigger dictionary withdictionaryNamedoes not exist.- Throws:
AttivioException
-
getDictionaries
@Deprecated default java.lang.Iterable<TriggerDictionaryInfo> getDictionaries(java.lang.String prefix, int offset, int rows) throws AttivioException
Deprecated.usegetDictionaries(TriggerDictionaryName, int, int)instead.Get all dictionaries.Dictionaries will be returned ordered by
name.If
prefixis specified, the result will be filtered to only include dictionaries whosenamestarts withprefix.- Throws:
AttivioException
-
getDictionaryNames
default java.util.List<java.lang.String> getDictionaryNames() throws AttivioExceptionGet the names of all dictionaries in the default namespace.- Throws:
AttivioException
-
getDictionaries
java.lang.Iterable<TriggerDictionaryInfo> getDictionaries(TriggerDictionaryName prefix, int offset, int rows) throws AttivioException
Get all dictionaries.Dictionaries will be returned ordered by
name.If
prefixis specified, the result will be filtered to only include dictionaries whosenamestarts withprefix.- Throws:
AttivioException
-
createDictionary
void createDictionary(TriggerDictionaryInfo info) throws AttivioException
Create a newtriggerdictionary.This dictionary will not be available to transformers/components until
compileDictionary(String)andpublishDictionary(String)has been called for this dictionary.- Throws:
AttivioException
-
updateDictionary
void updateDictionary(TriggerDictionaryInfo info) throws AttivioException
Update the metadata for atriggerdictionary.The changes to this dictionary will not be available to transformers/components until
compileDictionary(String)andpublishDictionary(String)has been called for this dictionary.- Throws:
AttivioException
-
deleteDictionary
@Deprecated default void deleteDictionary(java.lang.String dictionaryName) throws AttivioExceptionDeprecated.usedeleteDictionary(TriggerDictionaryName)instead.Delete atriggerdictionary identified bydictionaryName.- Throws:
AttivioException
-
deleteDictionary
void deleteDictionary(TriggerDictionaryName dictionaryName) throws AttivioException
Delete atriggerdictionary identified bydictionaryName.- Throws:
AttivioException
-
compileDictionary
@Deprecated default void compileDictionary(java.lang.String dictionaryName) throws AttivioExceptionDeprecated.usecompileDictionary(TriggerDictionaryName)instead.Compile the trigger dictionary identified bydictionaryNameinto binary format.- Throws:
AttivioException
-
compileDictionary
void compileDictionary(TriggerDictionaryName dictionaryName) throws AttivioException
Compile the trigger dictionary identified bydictionaryNameinto binary format.- Throws:
AttivioException
-
publishDictionary
@Deprecated default void publishDictionary(java.lang.String dictionaryName) throws AttivioExceptionDeprecated.usepublishDictionary(TriggerDictionaryName)instead.Publish the most recently compiled binary dictionary identified bydictionaryName.Upon successful completion of this method, all transformers/components will start using the newly published version of this dictionary.
- Throws:
AttivioException
-
publishDictionary
void publishDictionary(TriggerDictionaryName dictionaryName) throws AttivioException
Publish the most recently compiled binary dictionary identified bydictionaryName.Upon successful completion of this method, all transformers/components will start using the newly published version of this dictionary.
- Throws:
AttivioException
-
copyDictionary
@Deprecated default void copyDictionary(java.lang.String dictionaryName, java.lang.String newName) throws AttivioExceptionDeprecated.Copy the trigger dictionary identified bydictionaryNameto a new dictionary withnewName.NOTE: the newly created copy will not be available to transformers/components until
compileDictionary(String)andpublishDictionary(String)are called for the new dictionary.- Throws:
AttivioException
-
copyDictionary
void copyDictionary(TriggerDictionaryName dictionaryName, TriggerDictionaryName newName) throws AttivioException
Copy the trigger dictionary identified bydictionaryNameto a new dictionary withnewName.NOTE: the newly created copy will not be available to transformers/components until
compileDictionary(TriggerDictionaryName)andpublishDictionary(TriggerDictionaryName)are called for the new dictionary.- Throws:
AttivioException
-
getTrigger
@Deprecated default TriggerDefinition getTrigger(java.lang.String dictionaryName, java.lang.String triggerName) throws AttivioException
Deprecated.use#getTrigger(String, String, String)instead.- Throws:
AttivioException- if dictionary does not exist, or trigger does not exist.
-
getTrigger
TriggerDefinition getTrigger(TriggerDictionaryName dictionaryName, java.lang.String triggerName) throws AttivioException
- Throws:
AttivioException- if dictionary does not exist, or trigger does not exist.
-
createTrigger
@Deprecated default void createTrigger(java.lang.String dictionaryName, TriggerDefinition trigger) throws AttivioExceptionDeprecated.Addtriggerto the dictionary identified bydictionaryName.If the dictionary already contains a trigger with the same
name, an exception will be thrown.This new trigger will not be available to transformers/components until
compileDictionary(String)andpublishDictionary(String)has been called fordictionaryName.- Throws:
AttivioException
-
createTrigger
void createTrigger(TriggerDictionaryName dictionaryName, TriggerDefinition trigger) throws AttivioException
Addtriggerto the dictionary identified bydictionaryName.If the dictionary already contains a trigger with the same
name, an exception will be thrown.This new trigger will not be available to transformers/components until
compileDictionary(String)andpublishDictionary(String)has been called fordictionaryName.- Throws:
AttivioException
-
updateTrigger
@Deprecated default void updateTrigger(java.lang.String dictionaryName, TriggerDefinition trigger) throws AttivioExceptionDeprecated.use#updateTrigger(String, String, TriggerDefinition)instead.Updatetriggerfor the dictionary identified bydictionaryName.If the dictionary does not contain a trigger with the
namespecified, an exception will be thrown.NOTE: you cannot change the
nameof a trigger. In order to rename a trigger, you must first callcreateTrigger(String, TriggerDefinition)with the new trigger, and upon success, calldeleteTrigger(String, String)for the previous trigger.Updates to this trigger will not be available to transformers/components until
compileDictionary(String)andpublishDictionary(String)has been called fordictionaryName.- Throws:
AttivioException
-
updateTrigger
void updateTrigger(TriggerDictionaryName dictionaryName, TriggerDefinition trigger) throws AttivioException
Updatetriggerfor the dictionary identified bydictionaryName.If the dictionary does not contain a trigger with the
namespecified, an exception will be thrown.NOTE: you cannot change the
nameof a trigger. In order to rename a trigger, you must first callcreateTrigger(String, TriggerDefinition)with the new trigger, and upon success, calldeleteTrigger(String, String)for the previous trigger.Updates to this trigger will not be available to transformers/components until
compileDictionary(String)andpublishDictionary(String)has been called fordictionaryName.- Throws:
AttivioException
-
deleteTrigger
default void deleteTrigger(java.lang.String dictionaryName, java.lang.String triggerName) throws AttivioExceptionDeprecated.usedeleteTrigger(TriggerDictionaryName, String)instead.Delete trigger namedtriggerNamefor the dictionary identified bydictionaryName.This trigger will continue to be available to transformers/components until
compileDictionary(String)andpublishDictionary(String)has been called fordictionaryName, assuming this trigger has been published previously.- Throws:
AttivioException
-
deleteTrigger
void deleteTrigger(TriggerDictionaryName dictionaryName, java.lang.String triggerName) throws AttivioException
Delete trigger namedtriggerNamefor the dictionary identified bydictionaryName.This trigger will continue to be available to transformers/components until
compileDictionary(String)andpublishDictionary(String)has been called fordictionaryName, assuming this trigger has been published previously.- Throws:
AttivioException
-
getLocales
@Deprecated default java.util.Map<java.util.Locale,java.lang.Long> getLocales(java.lang.String dictionaryName, java.lang.String prefix) throws AttivioExceptionDeprecated.usegetLocales(TriggerDictionaryName, String)instead.Get a map of locales for dictionary specified bydictionaryName.The value for the map will contain the number of triggers in the dictionary specified for the locale.
If
prefixis specified, this will be used to filter the matching triggers to only include triggers with anamethat starts withprefix.- Throws:
AttivioException
-
getLocales
java.util.Map<java.util.Locale,java.lang.Long> getLocales(TriggerDictionaryName dictionaryName, java.lang.String prefix) throws AttivioException
Get a map of locales for dictionary specified bydictionaryName.The value for the map will contain the number of triggers in the dictionary specified for the locale.
If
prefixis specified, this will be used to filter the matching triggers to only include triggers with anamethat starts withprefix.- Throws:
AttivioException
-
getTriggers
@Deprecated default java.lang.Iterable<TriggerDefinition> getTriggers(java.lang.String dictionaryName, java.util.Locale locale, java.lang.String prefix, int offset, int rows) throws AttivioException
Deprecated.Get triggers for dictionary identified bydictionaryName.Returned triggers will be ordered according to
name.If
localeis specified, the result will be filtered to only include triggers for the specifiedlocale.If
prefixis specified, the result will be filtered to only include triggers whosenamestarts withprefix.- Throws:
AttivioException
-
getTriggers
java.lang.Iterable<TriggerDefinition> getTriggers(TriggerDictionaryName dictionaryName, java.util.Locale locale, java.lang.String prefix, int offset, int rows) throws AttivioException
Get triggers for dictionary identified bydictionaryName.Returned triggers will be ordered according to
name.If
localeis specified, the result will be filtered to only include triggers for the specifiedlocale.If
prefixis specified, the result will be filtered to only include triggers whosenamestarts withprefix.- Throws:
AttivioException
-
exportDictionary
@Deprecated default void exportDictionary(java.lang.String dictionaryName, java.io.OutputStream output) throws AttivioExceptionDeprecated.Export trigger dictionary bynametooutput.Dictionary will be output in XML format..
Triggers will be output in order according to
name.NOTE: this export will also include any changes not yet
compiledorpublished.- Throws:
AttivioException
-
exportDictionary
void exportDictionary(TriggerDictionaryName dictionaryName, java.io.OutputStream output) throws AttivioException
Export trigger dictionary bynametooutput.Dictionary will be output in XML format..
Triggers will be output in order according to
name.NOTE: this export will also include any changes not yet
compiledorpublished.- Throws:
AttivioException
-
importDictionary
@Deprecated default void importDictionary(java.io.InputStream input, java.lang.String newName, boolean replace) throws AttivioExceptionDeprecated.Import a trigger dictionary frominput.Dictionary must be in XML format as output from
exportDictionary(String, OutputStream).If
newNameis specified, the imported dictionary will be imported with this name instead of the name stored in the export.If
replaceistrue, this import will overwrite any existing dictionary.NOTE: the imported dictionary will not be available to transformers/components until
compileDictionary(String)andpublishDictionary(String)are called for the new dictionary.- Throws:
AttivioException
-
importDictionary
void importDictionary(java.io.InputStream input, TriggerDictionaryName newName, boolean replace) throws AttivioExceptionImport a trigger dictionary frominput.Dictionary must be in XML format as output from
exportDictionary(String, OutputStream).If
newNameis specified, the imported dictionary will be imported with this name instead of the name stored in the export.If
replaceistrue, this import will overwrite any existing dictionary.NOTE: the imported dictionary will not be available to transformers/components until
compileDictionary(String)andpublishDictionary(String)are called for the new dictionary.- Throws:
AttivioException
-
importDictionary
@Deprecated default void importDictionary(byte[] input, java.lang.String newName, boolean replace) throws AttivioExceptionDeprecated.Import a trigger dictionary frominputbytes.Dictionary must be in XML format as output from
exportDictionary(String, OutputStream).If
newNameis specified, the imported dictionary will be imported with this name instead of the name stored in the export.If
replaceistrue, this import will overwrite any existing dictionary.NOTE: the imported dictionary will not be available to transformers/components until
compileDictionary(String)andpublishDictionary(String)are called for the new dictionary.- Throws:
AttivioException
-
importDictionary
@Deprecated default void importDictionary(byte[] input, TriggerDictionaryName newName, boolean replace) throws AttivioExceptionDeprecated.Import a trigger dictionary frominputbytes.Dictionary must be in XML format as output from
exportDictionary(String, OutputStream).If
newNameis specified, the imported dictionary will be imported with this name instead of the name stored in the export.If
replaceistrue, this import will overwrite any existing dictionary.NOTE: the imported dictionary will not be available to transformers/components until
compileDictionary(String)andpublishDictionary(String)are called for the new dictionary.- Throws:
AttivioException
-
process
@Deprecated default IngestDocument process(java.lang.String dictionaryName, IngestDocument document, boolean published) throws AttivioException
Deprecated.Processdocumentaccording todictionaryName.- Parameters:
dictionaryName- the name of the dictionary to use for processingdocument- the document to process.published- iftruethe most recently published dictionary will be used for processing, iffalsethe most recently compiled dictionary will be used for processing.- Returns:
- The processed document.
- Throws:
AttivioException
-
process
IngestDocument process(TriggerDictionaryName dictionaryName, IngestDocument document, boolean published) throws AttivioException
Processdocumentaccording todictionaryName.- Parameters:
dictionaryName- the name of the dictionary to use for processingdocument- the document to process.published- iftruethe most recently published dictionary will be used for processing, iffalsethe most recently compiled dictionary will be used for processing.- Returns:
- The processed document.
- Throws:
AttivioException
-
-