mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-19 14:02:13 +01:00
throw ioexception and repositoryexcetion on tags command
This commit is contained in:
@@ -39,12 +39,15 @@ import sonia.scm.cache.Cache;
|
||||
import sonia.scm.cache.CacheManager;
|
||||
import sonia.scm.repository.Repository;
|
||||
import sonia.scm.repository.RepositoryCacheKey;
|
||||
import sonia.scm.repository.RepositoryException;
|
||||
import sonia.scm.repository.Tag;
|
||||
import sonia.scm.repository.Tags;
|
||||
import sonia.scm.repository.spi.TagsCommand;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -74,6 +77,7 @@ public final class TagsCommandBuilder
|
||||
*
|
||||
* @param cacheManager cache manager
|
||||
* @param logCommand implementation of the {@link TagsCommand}
|
||||
* @param command
|
||||
* @param repository repository
|
||||
*/
|
||||
TagsCommandBuilder(CacheManager cacheManager, TagsCommand command,
|
||||
@@ -84,15 +88,18 @@ public final class TagsCommandBuilder
|
||||
this.repository = repository;
|
||||
}
|
||||
|
||||
//~--- methods --------------------------------------------------------------
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Returns all tags from the repository.
|
||||
*
|
||||
*
|
||||
* @return tags from the repository
|
||||
*
|
||||
* @throws IOException
|
||||
* @throws RepositoryException
|
||||
*/
|
||||
public Tags getTags()
|
||||
public Tags getTags() throws RepositoryException, IOException
|
||||
{
|
||||
Tags tags = null;
|
||||
|
||||
@@ -146,8 +153,11 @@ public final class TagsCommandBuilder
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
* @throws RepositoryException
|
||||
*/
|
||||
private Tags getTagsFromCommand()
|
||||
private Tags getTagsFromCommand() throws RepositoryException, IOException
|
||||
{
|
||||
List<Tag> tagList = command.getTags();
|
||||
|
||||
|
||||
@@ -33,10 +33,13 @@ package sonia.scm.repository.spi;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import sonia.scm.repository.RepositoryException;
|
||||
import sonia.scm.repository.Tag;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -51,6 +54,9 @@ public interface TagsCommand
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
* @throws RepositoryException
|
||||
*/
|
||||
public List<Tag> getTags();
|
||||
public List<Tag> getTags() throws RepositoryException, IOException;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user