mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 00:15:44 +01:00
Renamed NotSupportedFeatureException
This commit is contained in:
@@ -41,13 +41,13 @@ import java.util.Collections;
|
|||||||
* @version 1.6
|
* @version 1.6
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("squid:MaximumInheritanceDepth") // exceptions have a deep inheritance depth themselves; therefore we accept this here
|
@SuppressWarnings("squid:MaximumInheritanceDepth") // exceptions have a deep inheritance depth themselves; therefore we accept this here
|
||||||
public class NotSupportedFeatureException extends BadRequestException {
|
public class FeatureNotSupportedException extends BadRequestException {
|
||||||
|
|
||||||
private static final long serialVersionUID = 256498734456613496L;
|
private static final long serialVersionUID = 256498734456613496L;
|
||||||
|
|
||||||
private static final String CODE = "9SR8G0kmU1";
|
private static final String CODE = "9SR8G0kmU1";
|
||||||
|
|
||||||
public NotSupportedFeatureException(String feature)
|
public FeatureNotSupportedException(String feature)
|
||||||
{
|
{
|
||||||
super(Collections.emptyList(),createMessage(feature));
|
super(Collections.emptyList(),createMessage(feature));
|
||||||
}
|
}
|
||||||
@@ -38,7 +38,7 @@ package sonia.scm.repository;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import sonia.scm.NotSupportedFeatureException;
|
import sonia.scm.FeatureNotSupportedException;
|
||||||
import sonia.scm.SCMContextProvider;
|
import sonia.scm.SCMContextProvider;
|
||||||
import sonia.scm.event.ScmEventBus;
|
import sonia.scm.event.ScmEventBus;
|
||||||
|
|
||||||
@@ -167,12 +167,12 @@ public abstract class AbstractRepositoryHandler<C extends RepositoryConfig>
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*
|
*
|
||||||
* @throws NotSupportedFeatureException
|
* @throws FeatureNotSupportedException
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ImportHandler getImportHandler()
|
public ImportHandler getImportHandler()
|
||||||
{
|
{
|
||||||
throw new NotSupportedFeatureException("import");
|
throw new FeatureNotSupportedException("import");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ package sonia.scm.repository;
|
|||||||
//~--- non-JDK imports --------------------------------------------------------
|
//~--- non-JDK imports --------------------------------------------------------
|
||||||
|
|
||||||
import sonia.scm.Handler;
|
import sonia.scm.Handler;
|
||||||
import sonia.scm.NotSupportedFeatureException;
|
import sonia.scm.FeatureNotSupportedException;
|
||||||
import sonia.scm.plugin.ExtensionPoint;
|
import sonia.scm.plugin.ExtensionPoint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -59,9 +59,9 @@ public interface RepositoryHandler
|
|||||||
* @return {@link ImportHandler} for the repository type of this handler
|
* @return {@link ImportHandler} for the repository type of this handler
|
||||||
* @since 1.12
|
* @since 1.12
|
||||||
*
|
*
|
||||||
* @throws NotSupportedFeatureException
|
* @throws FeatureNotSupportedException
|
||||||
*/
|
*/
|
||||||
public ImportHandler getImportHandler() throws NotSupportedFeatureException;
|
public ImportHandler getImportHandler() throws FeatureNotSupportedException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns informations about the version of the RepositoryHandler.
|
* Returns informations about the version of the RepositoryHandler.
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ package sonia.scm.repository.api;
|
|||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import sonia.scm.NotSupportedFeatureException;
|
import sonia.scm.FeatureNotSupportedException;
|
||||||
import sonia.scm.repository.Feature;
|
import sonia.scm.repository.Feature;
|
||||||
import sonia.scm.repository.spi.DiffCommand;
|
import sonia.scm.repository.spi.DiffCommand;
|
||||||
import sonia.scm.repository.spi.DiffCommandRequest;
|
import sonia.scm.repository.spi.DiffCommandRequest;
|
||||||
@@ -203,7 +203,7 @@ public final class DiffCommandBuilder
|
|||||||
public DiffCommandBuilder setAncestorChangeset(String revision)
|
public DiffCommandBuilder setAncestorChangeset(String revision)
|
||||||
{
|
{
|
||||||
if (!supportedFeatures.contains(Feature.INCOMING_REVISION)) {
|
if (!supportedFeatures.contains(Feature.INCOMING_REVISION)) {
|
||||||
throw new NotSupportedFeatureException(Feature.INCOMING_REVISION.name());
|
throw new FeatureNotSupportedException(Feature.INCOMING_REVISION.name());
|
||||||
}
|
}
|
||||||
request.setAncestorChangeset(revision);
|
request.setAncestorChangeset(revision);
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ import com.google.common.base.Objects;
|
|||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import sonia.scm.NotSupportedFeatureException;
|
import sonia.scm.FeatureNotSupportedException;
|
||||||
import sonia.scm.cache.Cache;
|
import sonia.scm.cache.Cache;
|
||||||
import sonia.scm.cache.CacheManager;
|
import sonia.scm.cache.CacheManager;
|
||||||
import sonia.scm.repository.Changeset;
|
import sonia.scm.repository.Changeset;
|
||||||
@@ -410,7 +410,7 @@ public final class LogCommandBuilder
|
|||||||
*/
|
*/
|
||||||
public LogCommandBuilder setAncestorChangeset(String ancestorChangeset) {
|
public LogCommandBuilder setAncestorChangeset(String ancestorChangeset) {
|
||||||
if (!supportedFeatures.contains(Feature.INCOMING_REVISION)) {
|
if (!supportedFeatures.contains(Feature.INCOMING_REVISION)) {
|
||||||
throw new NotSupportedFeatureException(Feature.INCOMING_REVISION.name());
|
throw new FeatureNotSupportedException(Feature.INCOMING_REVISION.name());
|
||||||
}
|
}
|
||||||
request.setAncestorChangeset(ancestorChangeset);
|
request.setAncestorChangeset(ancestorChangeset);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ import org.apache.shiro.SecurityUtils;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import sonia.scm.NotFoundException;
|
import sonia.scm.NotFoundException;
|
||||||
import sonia.scm.NotSupportedFeatureException;
|
import sonia.scm.FeatureNotSupportedException;
|
||||||
import sonia.scm.Type;
|
import sonia.scm.Type;
|
||||||
import sonia.scm.api.rest.RestActionUploadResult;
|
import sonia.scm.api.rest.RestActionUploadResult;
|
||||||
import sonia.scm.api.v2.resources.RepositoryResource;
|
import sonia.scm.api.v2.resources.RepositoryResource;
|
||||||
@@ -394,7 +394,7 @@ public class RepositoryImportResource
|
|||||||
|
|
||||||
response = Response.ok(result).build();
|
response = Response.ok(result).build();
|
||||||
}
|
}
|
||||||
catch (NotSupportedFeatureException ex)
|
catch (FeatureNotSupportedException ex)
|
||||||
{
|
{
|
||||||
logger
|
logger
|
||||||
.warn(
|
.warn(
|
||||||
@@ -609,7 +609,7 @@ public class RepositoryImportResource
|
|||||||
types.add(t);
|
types.add(t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (NotSupportedFeatureException ex)
|
catch (FeatureNotSupportedException ex)
|
||||||
{
|
{
|
||||||
if (logger.isTraceEnabled())
|
if (logger.isTraceEnabled())
|
||||||
{
|
{
|
||||||
@@ -711,7 +711,7 @@ public class RepositoryImportResource
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (NotSupportedFeatureException ex)
|
catch (FeatureNotSupportedException ex)
|
||||||
{
|
{
|
||||||
throw new WebApplicationException(ex, Response.Status.BAD_REQUEST);
|
throw new WebApplicationException(ex, Response.Status.BAD_REQUEST);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user