Commit b4824395 authored by Matija Obreza's avatar Matija Obreza
Browse files

Remove repository image

parent 1661e192
......@@ -173,4 +173,13 @@ public interface RepositoryService {
*/
RepositoryImage updateMetadata(RepositoryImage repositoryImage) throws NoSuchRepositoryFileException;
/**
* Remove repository image
*
* @param repositoryImage
* @return the original metadata
* @throws NoSuchRepositoryFileException when file is not available in the repository
*/
RepositoryImage removeImage(RepositoryImage repositoryImage) throws NoSuchRepositoryFileException, IOException;
}
......@@ -358,6 +358,13 @@ public class RepositoryServiceImpl implements RepositoryService, InitializingBea
return repositoryFile;
}
@Override
@Transactional
public RepositoryImage removeImage(RepositoryImage repositoryImage) throws NoSuchRepositoryFileException, IOException {
removeFile(repositoryImage);
return repositoryImage;
}
/*
* (non-Javadoc)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment