@Component(value="resource-upload") public class ResourceUploader extends Object implements IResourceUploader
Constructor and Description |
---|
ResourceUploader() |
ResourceUploader(ICatalogDAO resourcetDAO) |
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.
|
ICatalogDAO |
getResourceDAO() |
void |
init() |
ResourceUploadStatus |
saveArtifact(ESArtifactData artifactData,
boolean isReload)
Save an artifact in the DAO layer.
|
void |
setResourceDAO(ICatalogDAO resourceDAO) |
ResourceUploadStatus |
updateArtifact(ESArtifactData artifactUpdateData)
Save an artifact in the DAO layer.
|
public ResourceUploader()
public ResourceUploader(ICatalogDAO resourcetDAO)
@PostConstruct public void init()
public ICatalogDAO getResourceDAO()
public void setResourceDAO(ICatalogDAO resourceDAO)
public ResourceUploadStatus saveArtifact(ESArtifactData artifactData, boolean isReload)
IResourceUploader
saveArtifact
in interface IResourceUploader
public ResourceUploadStatus updateArtifact(ESArtifactData artifactUpdateData)
IResourceUploader
updateArtifact
in interface IResourceUploader
public fj.data.Either<ESArtifactData,ResourceUploadStatus> getArtifact(String id)
IResourceUploader
getArtifact
in interface IResourceUploader
id
- The id of the artifact to read.public void deleteArtifact(String id)
IResourceUploader
deleteArtifact
in interface IResourceUploader
id
- Id of the image to delete.public void deleteAllArtifacts()
IResourceUploader
deleteAllArtifacts
in interface IResourceUploader
Copyright © 2017. All rights reserved.