package org.apache.archiva.repository; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.archiva.model.ArchivaArtifact; import org.apache.archiva.model.ArtifactReference; import org.apache.archiva.model.ProjectReference; import org.apache.archiva.model.VersionedReference; import java.nio.file.Path; import java.util.Set; /** * ManagedRepositoryContent interface for interacting with a managed repository in an abstract way, * without the need for processing based on filesystem paths, or working with the database. * * This interface */ public interface ManagedRepositoryContent extends RepositoryContent { /** * Delete from the managed repository all files / directories associated with the * provided version reference. * * @param reference the version reference to delete. * @throws ContentNotFoundException */ void deleteVersion( VersionedReference reference ) throws ContentNotFoundException; /** * delete a specified artifact from the repository * * @param artifactReference * @throws ContentNotFoundException */ void deleteArtifact( ArtifactReference artifactReference ) throws ContentNotFoundException; /** * @param groupId * @throws ContentNotFoundException * @since 1.4-M3 */ void deleteGroupId( String groupId ) throws ContentNotFoundException; /** * * @param namespace groupId for maven * @param projectId artifactId for maven * @throws ContentNotFoundException */ void deleteProject( String namespace, String projectId ) throws RepositoryException; /** *
* Convenience method to get the repository id. *
*
* Equivalent to calling .getRepository().getId()
*
* Gather up the list of related artifacts to the ArtifactReference provided. * This typically inclues the pom files, and those things with * classifiers (such as doc, source code, test libs, etc...) *
** NOTE: Some layouts (such as maven 1 "legacy") are not compatible with this query. *
* * @param reference the reference to work off of. * @return the set of ArtifactReferences for related artifacts. * @throws ContentNotFoundException if the initial artifact reference does not exist within the repository. */ Set* Convenience method to get the repository (on disk) root directory. *
*
* Equivalent to calling .getRepository().getLocation()
*
* Given a specific {@link VersionedReference}, return the list of available versions for that * versioned reference. *
** NOTE: This is really only useful when working with SNAPSHOTs. *
* * @param reference the versioned reference to work off of. * @return the set of versions found. * @throws ContentNotFoundException if the versioned reference does not exist within the repository. */ Set