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.String
STORE_NAME
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
compileDictionary(TriggerDictionaryName dictionaryName)
Compile the trigger dictionary identified bydictionaryName
into binary format.default void
compileDictionary(java.lang.String dictionaryName)
Deprecated.usecompileDictionary(TriggerDictionaryName)
instead.void
copyDictionary(TriggerDictionaryName dictionaryName, TriggerDictionaryName newName)
Copy the trigger dictionary identified bydictionaryName
to a new dictionary withnewName
.default void
copyDictionary(java.lang.String dictionaryName, java.lang.String newName)
Deprecated.void
createDictionary(TriggerDictionaryInfo info)
Create a newtrigger
dictionary.void
createTrigger(TriggerDictionaryName dictionaryName, TriggerDefinition trigger)
Addtrigger
to the dictionary identified bydictionaryName
.default void
createTrigger(java.lang.String dictionaryName, TriggerDefinition trigger)
Deprecated.void
deleteDictionary(TriggerDictionaryName dictionaryName)
Delete atrigger
dictionary identified bydictionaryName
.default void
deleteDictionary(java.lang.String dictionaryName)
Deprecated.usedeleteDictionary(TriggerDictionaryName)
instead.void
deleteTrigger(TriggerDictionaryName dictionaryName, java.lang.String triggerName)
Delete trigger namedtriggerName
for the dictionary identified bydictionaryName
.default void
deleteTrigger(java.lang.String dictionaryName, java.lang.String triggerName)
Deprecated.usedeleteTrigger(TriggerDictionaryName, String)
instead.void
exportDictionary(TriggerDictionaryName dictionaryName, java.io.OutputStream output)
Export trigger dictionary byname
tooutput
.default void
exportDictionary(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.TriggerDictionaryInfo
getDictionary(TriggerDictionaryName dictionaryName)
Get aTriggerDictionaryInfo
bydictionaryName
.default TriggerDictionaryInfo
getDictionary(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.String
getStoreName()
Get the name of this store.default long
getStoreRevision()
Get the store revision for the default namespace.long
getStoreRevision(java.lang.String namespace)
Get the store revision for the specifiednamespace
.TriggerDefinition
getTrigger(TriggerDictionaryName dictionaryName, java.lang.String triggerName)
default TriggerDefinition
getTrigger(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 void
importDictionary(byte[] input, TriggerDictionaryName newName, boolean replace)
Deprecated.default void
importDictionary(byte[] input, java.lang.String newName, boolean replace)
Deprecated.void
importDictionary(java.io.InputStream input, TriggerDictionaryName newName, boolean replace)
Import a trigger dictionary frominput
.default void
importDictionary(java.io.InputStream input, java.lang.String newName, boolean replace)
Deprecated.IngestDocument
process(TriggerDictionaryName dictionaryName, IngestDocument document, boolean published)
Processdocument
according todictionaryName
.default IngestDocument
process(java.lang.String dictionaryName, IngestDocument document, boolean published)
Deprecated.void
publishDictionary(TriggerDictionaryName dictionaryName)
Publish the most recently compiled binary dictionary identified bydictionaryName
.default void
publishDictionary(java.lang.String dictionaryName)
Deprecated.usepublishDictionary(TriggerDictionaryName)
instead.void
updateDictionary(TriggerDictionaryInfo info)
Update the metadata for atrigger
dictionary.void
updateTrigger(TriggerDictionaryName dictionaryName, TriggerDefinition trigger)
Updatetrigger
for the dictionary identified bydictionaryName
.default void
updateTrigger(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:ExternalizableStore
Get 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:
getStoreName
in interfaceExternalizableStore
-
getStoreRevision
default long getStoreRevision() throws AttivioException
Get the store revision for the default namespace.- Specified by:
getStoreRevision
in interfaceExternalizableStore
- Throws:
AttivioException
-
getStoreRevision
long getStoreRevision(java.lang.String namespace) throws AttivioException
Get the store revision for the specifiednamespace
.- Throws:
AttivioException
-
getDictionary
@Deprecated default TriggerDictionaryInfo getDictionary(java.lang.String dictionaryName) throws AttivioException
Deprecated.usegetDictionary(TriggerDictionaryName)
instead.Get aTriggerDictionaryInfo
bydictionaryName
.Returns
null
if a trigger dictionary withdictionaryName
does not exist.- Throws:
AttivioException
-
getDictionary
TriggerDictionaryInfo getDictionary(TriggerDictionaryName dictionaryName) throws AttivioException
Get aTriggerDictionaryInfo
bydictionaryName
.Returns
null
if a trigger dictionary withdictionaryName
does 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
prefix
is specified, the result will be filtered to only include dictionaries whosename
starts withprefix
.- Throws:
AttivioException
-
getDictionaryNames
default java.util.List<java.lang.String> getDictionaryNames() throws AttivioException
Get 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
prefix
is specified, the result will be filtered to only include dictionaries whosename
starts withprefix
.- Throws:
AttivioException
-
createDictionary
void createDictionary(TriggerDictionaryInfo info) throws AttivioException
Create a newtrigger
dictionary.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 atrigger
dictionary.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 AttivioException
Deprecated.usedeleteDictionary(TriggerDictionaryName)
instead.Delete atrigger
dictionary identified bydictionaryName
.- Throws:
AttivioException
-
deleteDictionary
void deleteDictionary(TriggerDictionaryName dictionaryName) throws AttivioException
Delete atrigger
dictionary identified bydictionaryName
.- Throws:
AttivioException
-
compileDictionary
@Deprecated default void compileDictionary(java.lang.String dictionaryName) throws AttivioException
Deprecated.usecompileDictionary(TriggerDictionaryName)
instead.Compile the trigger dictionary identified bydictionaryName
into binary format.- Throws:
AttivioException
-
compileDictionary
void compileDictionary(TriggerDictionaryName dictionaryName) throws AttivioException
Compile the trigger dictionary identified bydictionaryName
into binary format.- Throws:
AttivioException
-
publishDictionary
@Deprecated default void publishDictionary(java.lang.String dictionaryName) throws AttivioException
Deprecated.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 AttivioException
Deprecated.Copy the trigger dictionary identified bydictionaryName
to 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 bydictionaryName
to 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 AttivioException
Deprecated.Addtrigger
to 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
Addtrigger
to 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 AttivioException
Deprecated.use#updateTrigger(String, String, TriggerDefinition)
instead.Updatetrigger
for the dictionary identified bydictionaryName
.If the dictionary does not contain a trigger with the
name
specified, an exception will be thrown.NOTE: you cannot change the
name
of 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
Updatetrigger
for the dictionary identified bydictionaryName
.If the dictionary does not contain a trigger with the
name
specified, an exception will be thrown.NOTE: you cannot change the
name
of 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 AttivioException
Deprecated.usedeleteTrigger(TriggerDictionaryName, String)
instead.Delete trigger namedtriggerName
for 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 namedtriggerName
for 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 AttivioException
Deprecated.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
prefix
is specified, this will be used to filter the matching triggers to only include triggers with aname
that 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
prefix
is specified, this will be used to filter the matching triggers to only include triggers with aname
that 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
locale
is specified, the result will be filtered to only include triggers for the specifiedlocale
.If
prefix
is specified, the result will be filtered to only include triggers whosename
starts 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
locale
is specified, the result will be filtered to only include triggers for the specifiedlocale
.If
prefix
is specified, the result will be filtered to only include triggers whosename
starts withprefix
.- Throws:
AttivioException
-
exportDictionary
@Deprecated default void exportDictionary(java.lang.String dictionaryName, java.io.OutputStream output) throws AttivioException
Deprecated.Export trigger dictionary byname
tooutput
.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
compiled
orpublished
.- Throws:
AttivioException
-
exportDictionary
void exportDictionary(TriggerDictionaryName dictionaryName, java.io.OutputStream output) throws AttivioException
Export trigger dictionary byname
tooutput
.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
compiled
orpublished
.- Throws:
AttivioException
-
importDictionary
@Deprecated default void importDictionary(java.io.InputStream input, java.lang.String newName, boolean replace) throws AttivioException
Deprecated.Import a trigger dictionary frominput
.Dictionary must be in XML format as output from
exportDictionary(String, OutputStream)
.If
newName
is specified, the imported dictionary will be imported with this name instead of the name stored in the export.If
replace
istrue
, 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 AttivioException
Import a trigger dictionary frominput
.Dictionary must be in XML format as output from
exportDictionary(String, OutputStream)
.If
newName
is specified, the imported dictionary will be imported with this name instead of the name stored in the export.If
replace
istrue
, 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 AttivioException
Deprecated.Import a trigger dictionary frominput
bytes.Dictionary must be in XML format as output from
exportDictionary(String, OutputStream)
.If
newName
is specified, the imported dictionary will be imported with this name instead of the name stored in the export.If
replace
istrue
, 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 AttivioException
Deprecated.Import a trigger dictionary frominput
bytes.Dictionary must be in XML format as output from
exportDictionary(String, OutputStream)
.If
newName
is specified, the imported dictionary will be imported with this name instead of the name stored in the export.If
replace
istrue
, 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.Processdocument
according todictionaryName
.- Parameters:
dictionaryName
- the name of the dictionary to use for processingdocument
- the document to process.published
- iftrue
the most recently published dictionary will be used for processing, iffalse
the 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
Processdocument
according todictionaryName
.- Parameters:
dictionaryName
- the name of the dictionary to use for processingdocument
- the document to process.published
- iftrue
the most recently published dictionary will be used for processing, iffalse
the most recently compiled dictionary will be used for processing.- Returns:
- The processed document.
- Throws:
AttivioException
-
-