1 package org.apache.maven.archiva.web.action.admin.legacy;
\r
4 * Licensed to the Apache Software Foundation (ASF) under one
\r
5 * or more contributor license agreements. See the NOTICE file
\r
6 * distributed with this work for additional information
\r
7 * regarding copyright ownership. The ASF licenses this file
\r
8 * to you under the Apache License, Version 2.0 (the
\r
9 * "License"); you may not use this file except in compliance
\r
10 * with the License. You may obtain a copy of the License at
\r
12 * http://www.apache.org/licenses/LICENSE-2.0
\r
14 * Unless required by applicable law or agreed to in writing,
\r
15 * software distributed under the License is distributed on an
\r
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
\r
17 * KIND, either express or implied. See the License for the
\r
18 * specific language governing permissions and limitations
\r
19 * under the License.
\r
22 import org.apache.archiva.admin.repository.RepositoryAdminException;
\r
23 import org.apache.archiva.admin.repository.admin.ArchivaAdministration;
\r
24 import org.apache.maven.archiva.web.action.AbstractActionSupport;
\r
25 import org.springframework.context.annotation.Scope;
\r
26 import org.springframework.stereotype.Controller;
\r
28 import javax.inject.Inject;
\r
31 * Delete a LegacyArtifactPath to archiva configuration
\r
35 @Controller( "deleteLegacyArtifactPathAction" )
\r
36 @Scope( "prototype" )
\r
37 public class DeleteLegacyArtifactPathAction
\r
38 extends AbstractActionSupport
\r
42 private ArchivaAdministration archivaAdministration;
\r
44 private String path;
\r
46 public String delete()
\r
48 log.info( "remove [" + path + "] from legacy artifact path resolution" );
\r
51 getArchivaAdministration().deleteLegacyArtifactPath( path );
\r
53 catch ( RepositoryAdminException e )
\r
55 log.error( e.getMessage(), e );
\r
56 addActionError( "Exception during delete " + e.getMessage() );
\r
61 public String getPath()
\r
66 public void setPath( String path )
\r
71 public ArchivaAdministration getArchivaAdministration()
\r
73 return archivaAdministration;
\r
76 public void setArchivaAdministration( ArchivaAdministration archivaAdministration )
\r
78 this.archivaAdministration = archivaAdministration;
\r