throw ioexception and repositoryexcetion on tags command

This commit is contained in:
Sebastian Sdorra
2012-07-05 19:11:38 +02:00
parent c157ac54e8
commit 12202058bd
2 changed files with 20 additions and 4 deletions

View File

@@ -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();

View File

@@ -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;
}