Class CollectionWriterES
java.lang.Object
io.camunda.optimize.service.db.es.writer.CollectionWriterES
- All Implemented Interfaces:
CollectionWriter
@Component
@Conditional(io.camunda.optimize.service.util.configuration.condition.ElasticSearchCondition.class)
public class CollectionWriterES
extends Object
implements CollectionWriter
-
Field Summary
Fields inherited from interface io.camunda.optimize.service.db.writer.CollectionWriter
ADD_ROLE_TO_COLLECTION_SCRIPT_CODE, DEFAULT_COLLECTION_NAME, REMOVE_ROLE_FROM_COLLECTION_SCRIPT_CODE, REMOVE_ROLE_FROM_COLLECTION_UNLESS_IS_LAST_MANAGER, REMOVE_SCOPE_ENTRIES_SCRIPT_CODE, REMOVE_SCOPE_ENTRY_FROM_COLLECTION_SCRIPT_CODE, REMOVE_SCOPE_ENTRY_SCRIPT_CODE, UPDATE_ENTITY_SCRIPT_CODE, UPDATE_ROLE_IN_COLLECTION_SCRIPT_CODE, UPDATE_SCOPE_ENTITY_SCRIPT_CODE -
Constructor Summary
ConstructorsConstructorDescriptionCollectionWriterES(OptimizeElasticsearchClient esClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, DateTimeFormatter formatter, TaskRepositoryES taskRepositoryES) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRoleToCollection(String collectionId, List<CollectionRoleRequestDto> rolesToAdd, String userId) voidaddScopeEntriesToCollection(String userId, String collectionId, List<CollectionScopeEntryDto> scopeUpdates) voiddeleteCollection(String collectionId) voiddeleteScopeEntryFromAllCollections(String scopeEntryId) voidpersistCollection(String id, CollectionDefinitionDto collectionDefinitionDto) voidremoveRoleFromCollectionUnlessIsLastManager(String collectionId, String roleEntryId, String userId) voidremoveScopeEntries(String collectionId, List<String> scopeEntryIds, String userId) voidremoveScopeEntry(String collectionId, String scopeEntryId, String userId) voidupdateCollection(CollectionDefinitionUpdateDto collection, String id) voidupdateRoleInCollection(String collectionId, String roleEntryId, CollectionRoleUpdateRequestDto roleUpdateDto, String userId) voidupdateScopeEntity(String collectionId, CollectionScopeEntryUpdateDto scopeEntry, String userId, String scopeEntryId) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.camunda.optimize.service.db.writer.CollectionWriter
createNewCollection, createNewCollectionAndReturnId, createNewCollectionAndReturnId
-
Constructor Details
-
CollectionWriterES
public CollectionWriterES(OptimizeElasticsearchClient esClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, DateTimeFormatter formatter, TaskRepositoryES taskRepositoryES)
-
-
Method Details
-
updateCollection
- Specified by:
updateCollectionin interfaceCollectionWriter
-
deleteCollection
- Specified by:
deleteCollectionin interfaceCollectionWriter
-
addScopeEntriesToCollection
public void addScopeEntriesToCollection(String userId, String collectionId, List<CollectionScopeEntryDto> scopeUpdates) - Specified by:
addScopeEntriesToCollectionin interfaceCollectionWriter
-
deleteScopeEntryFromAllCollections
- Specified by:
deleteScopeEntryFromAllCollectionsin interfaceCollectionWriter
-
updateScopeEntity
public void updateScopeEntity(String collectionId, CollectionScopeEntryUpdateDto scopeEntry, String userId, String scopeEntryId) - Specified by:
updateScopeEntityin interfaceCollectionWriter
-
removeScopeEntries
public void removeScopeEntries(String collectionId, List<String> scopeEntryIds, String userId) throws NotFoundException - Specified by:
removeScopeEntriesin interfaceCollectionWriter- Throws:
NotFoundException
-
removeScopeEntry
public void removeScopeEntry(String collectionId, String scopeEntryId, String userId) throws NotFoundException - Specified by:
removeScopeEntryin interfaceCollectionWriter- Throws:
NotFoundException
-
addRoleToCollection
public void addRoleToCollection(String collectionId, List<CollectionRoleRequestDto> rolesToAdd, String userId) - Specified by:
addRoleToCollectionin interfaceCollectionWriter
-
updateRoleInCollection
public void updateRoleInCollection(String collectionId, String roleEntryId, CollectionRoleUpdateRequestDto roleUpdateDto, String userId) throws OptimizeConflictException - Specified by:
updateRoleInCollectionin interfaceCollectionWriter- Throws:
OptimizeConflictException
-
removeRoleFromCollectionUnlessIsLastManager
public void removeRoleFromCollectionUnlessIsLastManager(String collectionId, String roleEntryId, String userId) throws OptimizeConflictException - Specified by:
removeRoleFromCollectionUnlessIsLastManagerin interfaceCollectionWriter- Throws:
OptimizeConflictException
-
persistCollection
- Specified by:
persistCollectionin interfaceCollectionWriter
-