summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-rest
diff options
context:
space:
mode:
Diffstat (limited to 'archiva-modules/archiva-web/archiva-rest')
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ArchivaAdministrationService.java8
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaAdministrationService.java38
2 files changed, 0 insertions, 46 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ArchivaAdministrationService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ArchivaAdministrationService.java
index 87c464285..612ed0a96 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ArchivaAdministrationService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ArchivaAdministrationService.java
@@ -51,14 +51,6 @@ public interface ArchivaAdministrationService
List<LegacyArtifactPath> getLegacyArtifactPaths()
throws ArchivaRestServiceException;
- @Path( "addLegacyArtifactPath" )
- @POST
- @Consumes( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
- @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
- @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
- void addLegacyArtifactPath( LegacyArtifactPath legacyArtifactPath )
- throws ArchivaRestServiceException;
-
@Path( "deleteLegacyArtifactPath" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaAdministrationService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaAdministrationService.java
index 9edafe78e..ff1d3fd18 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaAdministrationService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaAdministrationService.java
@@ -25,8 +25,6 @@ import org.apache.archiva.admin.model.beans.LegacyArtifactPath;
import org.apache.archiva.admin.model.beans.NetworkConfiguration;
import org.apache.archiva.admin.model.beans.OrganisationInformation;
import org.apache.archiva.admin.model.beans.UiConfiguration;
-import org.apache.archiva.model.ArtifactReference;
-import org.apache.archiva.repository.ManagedRepositoryContent;
import org.apache.archiva.repository.scanner.RepositoryContentConsumers;
import org.apache.archiva.rest.api.model.AdminRepositoryConsumer;
import org.apache.archiva.rest.api.services.ArchivaAdministrationService;
@@ -38,8 +36,6 @@ import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
import javax.inject.Inject;
-import javax.inject.Named;
-import javax.ws.rs.core.Response;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -56,9 +52,6 @@ public class DefaultArchivaAdministrationService
@Inject
private ArchivaAdministration archivaAdministration;
- @Inject
- @Named ( value = "managedRepositoryContent#legacy" )
- private ManagedRepositoryContent repositoryContent;
@Inject
private RepositoryContentConsumers repoConsumerUtil;
@@ -77,37 +70,6 @@ public class DefaultArchivaAdministrationService
}
}
- @Override
- public void addLegacyArtifactPath( LegacyArtifactPath legacyArtifactPath )
- throws ArchivaRestServiceException
- {
-
- // Check the proposed Artifact matches the path
- ArtifactReference artifact = new ArtifactReference();
-
- artifact.setGroupId( legacyArtifactPath.getGroupId() );
- artifact.setArtifactId( legacyArtifactPath.getArtifactId() );
- artifact.setClassifier( legacyArtifactPath.getClassifier() );
- artifact.setVersion( legacyArtifactPath.getVersion() );
- artifact.setType( legacyArtifactPath.getType() );
- String path = repositoryContent.toPath( artifact );
- if ( !StringUtils.equals( path, legacyArtifactPath.getPath() ) )
- {
- throw new ArchivaRestServiceException(
- "artifact path reference '" + legacyArtifactPath.getPath() + "' does not match the initial path: '"
- + path + "'", Response.Status.BAD_REQUEST.getStatusCode(), null );
- }
-
- try
- {
-
- archivaAdministration.addLegacyArtifactPath( legacyArtifactPath, getAuditInformation() );
- }
- catch ( RepositoryAdminException e )
- {
- throw new ArchivaRestServiceException( e.getMessage(), e );
- }
- }
@Override
public Boolean deleteLegacyArtifactPath( String path )