@Component(value="resource-dao") public class ESCatalogDAO extends ESGenericSearchDAO implements ICatalogDAO
ARTIFACT_NAME_FIELD, REF_NAME_FIELD, REF_VERSION_FIELD, RESOURCES_INDEX, TOSCA_ELEMENT_INDEX
Constructor and Description |
---|
ESCatalogDAO() |
Modifier and Type | Method and Description |
---|---|
void |
deleteAllArtifacts()
delete all artifacts
|
void |
deleteArtifact(String id)
Delete the given image.
|
fj.data.Either<ESArtifactData,ResourceUploadStatus> |
getArtifact(String id)
Get an artifact as a byte array based on the artifact id.
|
fj.data.Either<List<ESArtifactData>,ResourceUploadStatus> |
getArtifacts(String[] ids) |
HealthCheckInfo.HealthCheckStatus |
getHealth() |
void |
initCompleted() |
boolean |
isInitCompleted() |
void |
writeArtifact(ESArtifactData artifactData)
Save an artifact in the DAO layer.
|
count, doCustomFind, toGetListOfData
addToIndicesMap, delete, deleteIndex, findById, findByIds, getClient, getEsClient, getIndexForType, getJsonMapper, indexTypeFromClass, saveResourceData, setJsonMapper
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addToIndicesMap
getIndexForType
delete, findById, findByIds
@PostConstruct public void initCompleted()
public void writeArtifact(ESArtifactData artifactData) throws ResourceDAOException
ICatalogDAO
writeArtifact
in interface ICatalogDAO
ResourceDAOException
public fj.data.Either<ESArtifactData,ResourceUploadStatus> getArtifact(String id)
ICatalogDAO
getArtifact
in interface ICatalogDAO
id
- The id of the artifact to read.public void deleteArtifact(String id)
ICatalogDAO
deleteArtifact
in interface ICatalogDAO
id
- Id of the image to delete.public fj.data.Either<List<ESArtifactData>,ResourceUploadStatus> getArtifacts(String[] ids)
getArtifacts
in interface ICatalogDAO
public void deleteAllArtifacts()
ICatalogDAO
deleteAllArtifacts
in interface ICatalogDAO
public boolean isInitCompleted()
public HealthCheckInfo.HealthCheckStatus getHealth()
Copyright © 2017. All rights reserved.