public abstract class AbstractRepositoryPurge extends Object implements RepositoryPurge
Modifier and Type | Class and Description |
---|---|
(package private) class |
AbstractRepositoryPurge.ArtifactInfo |
Modifier and Type | Field and Description |
---|---|
private static char |
DELIM |
protected List<RepositoryListener> |
listeners |
protected org.slf4j.Logger |
log |
private org.slf4j.Logger |
logger |
protected ManagedRepositoryContent |
repository |
protected RepositorySession |
repositorySession |
Constructor and Description |
---|
AbstractRepositoryPurge(ManagedRepositoryContent repository,
RepositorySession repositorySession,
List<RepositoryListener> listeners) |
Modifier and Type | Method and Description |
---|---|
static void |
deleteArtifactFiles(Path directory,
int maxDepth,
String artifactName) |
private void |
deleteSilently(Path path) |
protected void |
purge(Set<ArtifactReference> references)
Purge the repo.
|
private void |
purgeMetadata(MetadataRepository metadataRepository,
Map<AbstractRepositoryPurge.ArtifactInfo,ArtifactMetadata> dataList) |
private void |
purgeSupportFiles(Path artifactFile)
This find support files for the artifactFile and deletes them.
|
private void |
removeArtifact(MetadataRepository metadataRepository,
AbstractRepositoryPurge.ArtifactInfo artifactInfo,
ArtifactMetadata artifactMetadata) |
private void |
triggerAuditEvent(String repoId,
String resource,
String action) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
process
protected org.slf4j.Logger log
protected final ManagedRepositoryContent repository
protected final RepositorySession repositorySession
protected final List<RepositoryListener> listeners
private org.slf4j.Logger logger
private static final char DELIM
public AbstractRepositoryPurge(ManagedRepositoryContent repository, RepositorySession repositorySession, List<RepositoryListener> listeners)
protected void purge(Set<ArtifactReference> references)
references
- private void purgeMetadata(MetadataRepository metadataRepository, Map<AbstractRepositoryPurge.ArtifactInfo,ArtifactMetadata> dataList)
private void removeArtifact(MetadataRepository metadataRepository, AbstractRepositoryPurge.ArtifactInfo artifactInfo, ArtifactMetadata artifactMetadata) throws MetadataRepositoryException
MetadataRepositoryException
private void deleteSilently(Path path)
private void purgeSupportFiles(Path artifactFile)
This find support files for the artifactFile and deletes them.
Support Files are things like ".sha1", ".md5", ".asc", etc.
artifactFile
- the file to base off of.public static void deleteArtifactFiles(Path directory, int maxDepth, String artifactName) throws IOException
IOException
private void triggerAuditEvent(String repoId, String resource, String action)
Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.