Interface DictionaryClient
-
- All Superinterfaces:
ExposedApi
public interface DictionaryClient extends ExposedApi
Dictionary Management API.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
AUTO_REFRESH_INTERVAL_SECS_CUSTOM_PROPERTY
static java.lang.String
AUTO_REFRESH_INTERVAL_SECS_CUSTOM_PROPERTY_DEFAULT
static java.lang.String
AUTO_REFRESH_INTERVAL_SECS_CUSTOM_PROPERTY_NEVER
static java.lang.String
DICTIONARY_RESOURCES_NAME
Name ofGlobalMap
that contains published dictionaries.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description DictionaryInfo
approveDictionary(DictionaryInfo info)
Approve pending changes to dictionary identified byinfo
.DictionaryInfo
cloneDictionary(DictionaryInfo source, DictionaryInfo dest)
Clone dictionarysource
todest
.DictionaryInfo
createDictionary(DictionaryInfo info)
Create dictionaryinfo
.DictionaryInfo
createDictionaryEntries(DictionaryInfo info, java.lang.String contentStoreId)
Add all entries fromcontentStorId
in csv format to dictionary identified byinfo
.DictionaryEntry
createDictionaryEntry(DictionaryEntry entry)
Create a dictionary entry.DictionaryInfo
deleteDictionary(DictionaryInfo info)
Delete dictionaryinfo
.DictionaryEntry
deleteDictionaryEntry(DictionaryEntry entry)
Delete a dictionary entry.void
deleteDictionaryFromContentStore(java.lang.String contentStoreId)
Deprecated.java.lang.String
exportDictionary(DictionaryInfo info)
Export published form of dictionary.AdminQueryResult<DictionaryInfo>
getDictionaries(AdminQuery query, int offset, int rows)
Get all matching dictionaries.DictionaryInfo
getDictionary(RevisionStatus view, DictionaryType type, java.lang.String name, java.lang.String group)
Get a dictionary info based on the (type, name, group).AdminQueryResult<DictionaryEntry>
getDictionaryEntries(AdminQuery query, int offset, int rows)
Get dictionary entries.DictionaryEntry
getDictionaryEntry(RevisionStatus view, java.lang.String entryId)
Get a dictionary entry based on its entryId.java.lang.String
getDictionaryUri(DictionaryInfo info)
java.lang.String
getIndexFeature()
AdminQueryResult<DictionaryEntry>
getPublishedEntities(DictionaryType type, java.lang.String name, java.lang.String group, java.lang.String query, int offset, int rows)
Get a list of published entries for an entity dictionary.AdminQueryResult<DictionaryEntry>
getPublishedEntities(java.lang.String name, java.lang.String group, java.lang.String query, int offset, int rows)
Get a list of published entries for an entity dictionary.void
importDictionary(java.lang.String contentStoreId)
DictionaryInfo
publishDictionary(DictionaryInfo info)
Publish approved changes to dictionary identified byinfo
.DictionaryInfo
refreshDictionary(DictionaryInfo info)
Refresh dictionary identified byinfo
.DictionaryInfo
registerDictionary(DictionaryInfo info, java.lang.String contentStoreId)
Create dictionary defined byinfo
and import all dictionary entries atcontentStoreId
in csv format.void
replaceDictionary(java.lang.String contentStoreId)
Replace dictionary with import.DictionaryInfo
replaceDictionaryEntries(DictionaryInfo info, java.lang.String contentStoreId)
Add all entries fromcontentStorId
in csv format to dictionary identified byinfo
.DictionaryInfo
revertDictionary(DictionaryInfo info, boolean recursive)
Revert pending changes to dictionary.DictionaryInfo
revertDictionaryApproval(DictionaryInfo info, boolean recursive)
Revert approved changes to dictionary.DictionaryEntry
revertDictionaryEntry(DictionaryEntry entry)
Revert pending changes to dictionary entry.DictionaryEntry
revertDictionaryEntryApproval(DictionaryEntry entry)
Revert approved changes to dictionary entry.void
storeDictionaryInContentStore(java.lang.String contentStoreId, byte[] bytes)
Deprecated.DictionaryInfo
updateDictionary(DictionaryInfo info)
Update dictionaryinfo
.DictionaryEntry
updateDictionaryEntry(DictionaryEntry entry)
Update a dictionary entry.
-
-
-
Field Detail
-
DICTIONARY_RESOURCES_NAME
static final java.lang.String DICTIONARY_RESOURCES_NAME
Name ofGlobalMap
that contains published dictionaries.- See Also:
- Constant Field Values
-
AUTO_REFRESH_INTERVAL_SECS_CUSTOM_PROPERTY
static final java.lang.String AUTO_REFRESH_INTERVAL_SECS_CUSTOM_PROPERTY
- See Also:
- Constant Field Values
-
AUTO_REFRESH_INTERVAL_SECS_CUSTOM_PROPERTY_NEVER
static final java.lang.String AUTO_REFRESH_INTERVAL_SECS_CUSTOM_PROPERTY_NEVER
- See Also:
- Constant Field Values
-
AUTO_REFRESH_INTERVAL_SECS_CUSTOM_PROPERTY_DEFAULT
static final java.lang.String AUTO_REFRESH_INTERVAL_SECS_CUSTOM_PROPERTY_DEFAULT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDictionaryUri
java.lang.String getDictionaryUri(DictionaryInfo info)
-
getIndexFeature
java.lang.String getIndexFeature()
-
registerDictionary
DictionaryInfo registerDictionary(DictionaryInfo info, java.lang.String contentStoreId) throws AttivioException
Create dictionary defined byinfo
and import all dictionary entries atcontentStoreId
in csv format.Dictionary identified by
info
must not exist.- Throws:
AttivioException
-
createDictionaryEntries
DictionaryInfo createDictionaryEntries(DictionaryInfo info, java.lang.String contentStoreId) throws AttivioException
Add all entries fromcontentStorId
in csv format to dictionary identified byinfo
.Dictionary identified by
info
must already exist.- Throws:
AttivioException
-
cloneDictionary
DictionaryInfo cloneDictionary(DictionaryInfo source, DictionaryInfo dest) throws AttivioException
Clone dictionarysource
todest
.Dictionary type for
source
anddest
must be the same.- Throws:
AttivioException
-
exportDictionary
java.lang.String exportDictionary(DictionaryInfo info) throws AttivioException
Export published form of dictionary.Returns ContentStore Id where export has been stored.
- Throws:
AttivioException
-
importDictionary
void importDictionary(java.lang.String contentStoreId) throws AttivioException
- Throws:
AttivioException
-
storeDictionaryInContentStore
@Deprecated void storeDictionaryInContentStore(java.lang.String contentStoreId, byte[] bytes) throws AttivioException
Deprecated.Put the content of bytes into the content store with the given contentStoreId.- Parameters:
contentStoreId
-bytes
-- Throws:
AttivioException
-
deleteDictionaryFromContentStore
@Deprecated void deleteDictionaryFromContentStore(java.lang.String contentStoreId) throws AttivioException
Deprecated.Delete the data from the content store with the supplied contentStoreId.- Parameters:
contentStoreId
-- Throws:
AttivioException
-
replaceDictionary
void replaceDictionary(java.lang.String contentStoreId) throws AttivioException
Replace dictionary with import.- Throws:
AttivioException
-
replaceDictionaryEntries
DictionaryInfo replaceDictionaryEntries(DictionaryInfo info, java.lang.String contentStoreId) throws AttivioException
Add all entries fromcontentStorId
in csv format to dictionary identified byinfo
.All dictionary entries that previously existed for
info
will be removed.Dictionary identified by
info
must already exist.- Throws:
AttivioException
-
createDictionary
DictionaryInfo createDictionary(DictionaryInfo info) throws AttivioException
Create dictionaryinfo
.Dictionary must not exist yet.
- Throws:
AttivioException
-
updateDictionary
DictionaryInfo updateDictionary(DictionaryInfo info) throws AttivioException
Update dictionaryinfo
.Dictionary must already exist and must not be deleted.
- Throws:
AttivioException
-
deleteDictionary
DictionaryInfo deleteDictionary(DictionaryInfo info) throws AttivioException
Delete dictionaryinfo
.Dictionary must already exist and must not be deleted already.
- Throws:
AttivioException
-
revertDictionary
DictionaryInfo revertDictionary(DictionaryInfo info, boolean recursive) throws AttivioException
Revert pending changes to dictionary.Dictionary already must exist
- Throws:
AttivioException
-
revertDictionaryApproval
DictionaryInfo revertDictionaryApproval(DictionaryInfo info, boolean recursive) throws AttivioException
Revert approved changes to dictionary.NOTE: any pending changes will be replaced with current approved version.
Dictionary must already exist
- Throws:
AttivioException
-
createDictionaryEntry
DictionaryEntry createDictionaryEntry(DictionaryEntry entry) throws AttivioException
Create a dictionary entry.Dictionary for entry must exist and dictionary term for entry must not yet exist.
- Throws:
AttivioException
-
updateDictionaryEntry
DictionaryEntry updateDictionaryEntry(DictionaryEntry entry) throws AttivioException
Update a dictionary entry.DictionaryEntry must exist (identified by
DictionaryEntry.getEntryId()
)Dictionary term (if changed) must not exist yet.
Dictionary type/name/id must not be changed.
- Throws:
AttivioException
-
deleteDictionaryEntry
DictionaryEntry deleteDictionaryEntry(DictionaryEntry entry) throws AttivioException
Delete a dictionary entry.DictionaryEntry must exist (identified by
DictionaryEntry.getEntryId()
)- Throws:
AttivioException
-
revertDictionaryEntry
DictionaryEntry revertDictionaryEntry(DictionaryEntry entry) throws AttivioException
Revert pending changes to dictionary entry.DictionaryEntry must exist (identified by
DictionaryEntry.getEntryId()
)- Throws:
AttivioException
-
revertDictionaryEntryApproval
DictionaryEntry revertDictionaryEntryApproval(DictionaryEntry entry) throws AttivioException
Revert approved changes to dictionary entry.NOTE: any pending changes will be replaced with previously approved version.
DictionaryEntry must exist (identified by
DictionaryEntry.getEntryId()
)- Throws:
AttivioException
-
getDictionary
DictionaryInfo getDictionary(RevisionStatus view, DictionaryType type, java.lang.String name, java.lang.String group) throws AttivioException
Get a dictionary info based on the (type, name, group).- Throws:
AttivioException
-
getPublishedEntities
AdminQueryResult<DictionaryEntry> getPublishedEntities(java.lang.String name, java.lang.String group, java.lang.String query, int offset, int rows) throws AttivioException
Get a list of published entries for an entity dictionary.The returned entries will be extracted from the published dictionary.
- Parameters:
name
- The dictionary name (entity or autocomplete) to select entries from.group
- The dictionary group to select entries from.query
- The prefix query to select terms from dictionary.offset
- the offset into the result set for returned entries.rows
- the maximum number of entries to return (starting at offset).- Throws:
AttivioException
-
getPublishedEntities
AdminQueryResult<DictionaryEntry> getPublishedEntities(DictionaryType type, java.lang.String name, java.lang.String group, java.lang.String query, int offset, int rows) throws AttivioException
Get a list of published entries for an entity dictionary.The returned entries will be extracted from the published dictionary.
- Parameters:
type
- DictionaryType.ENTITY or AUTOCOMPLETEname
- The dictionary name to select entries from.group
- The dictionary group to select entries from.query
- The prefix query to select terms from dictionary.offset
- the offset into the result set for returned entries.rows
- the maximum number of entries to return (starting at offset).- Throws:
AttivioException
-
getDictionaries
AdminQueryResult<DictionaryInfo> getDictionaries(AdminQuery query, int offset, int rows) throws AttivioException
Get all matching dictionaries.- Parameters:
query
- Query for selecting matching dictionaries.offset
- the offset into the result set for returned entries.rows
- the maximum number of dictionaries to return (starting at offset)- Throws:
AttivioException
-
getDictionaryEntry
DictionaryEntry getDictionaryEntry(RevisionStatus view, java.lang.String entryId) throws AttivioException
Get a dictionary entry based on its entryId.- Throws:
AttivioException
-
getDictionaryEntries
AdminQueryResult<DictionaryEntry> getDictionaryEntries(AdminQuery query, int offset, int rows) throws AttivioException
Get dictionary entries.- Parameters:
query
- Query for selecting matching entries.offset
- the offset into the result set for returned entries.rows
- the maximum number of entries to return (starting at offset)- Throws:
AttivioException
-
approveDictionary
DictionaryInfo approveDictionary(DictionaryInfo info) throws AttivioException
Approve pending changes to dictionary identified byinfo
.- Throws:
AttivioException
-
publishDictionary
DictionaryInfo publishDictionary(DictionaryInfo info) throws AttivioException
Publish approved changes to dictionary identified byinfo
.- Throws:
AttivioException
-
refreshDictionary
DictionaryInfo refreshDictionary(DictionaryInfo info) throws AttivioException
Refresh dictionary identified byinfo
.For spellcheck dictionaries, this will result in extracting new terms/frequencies from the index.
For all dictionaries, this will result in notifying Query Transformers to reload their dictionary.
- Throws:
AttivioException
-
-