@Service(value="repositoriesService#rest") public class DefaultRepositoriesService extends AbstractRestService implements RepositoriesService
Modifier and Type | Field and Description |
---|---|
private ChecksumAlgorithm[] |
algorithms |
private ArchivaIndexingTaskExecutor |
archivaIndexingTaskExecutor |
private DownloadRemoteIndexScheduler |
downloadRemoteIndexScheduler |
protected List<RepositoryListener> |
listeners |
private org.slf4j.Logger |
log |
private ManagedRepositoryAdmin |
managedRepositoryAdmin |
private MavenIndexerUtils |
mavenIndexerUtils |
private org.apache.archiva.redback.components.cache.Cache<String,Collection<String>> |
namespacesCache
Cache used for namespaces
|
private PlexusSisuBridge |
plexusSisuBridge |
private RepositoryScanner |
repoScanner |
private RepositoryContentFactory |
repositoryFactory |
protected RepositorySessionFactory |
repositorySessionFactory |
private ArchivaTaskScheduler |
scheduler |
private org.apache.archiva.redback.system.SecuritySystem |
securitySystem |
archivaAdministration, config, httpServletRequest, httpServletResponse, proxyConnectorAdmin, repositoryContentFactory, repositoryTaskScheduler, userRepositories
Constructor and Description |
---|
DefaultRepositoriesService() |
Modifier and Type | Method and Description |
---|---|
Boolean |
alreadyScanning(String repositoryId) |
Boolean |
copyArtifact(ArtifactTransferRequest artifactTransferRequest)
permissions are checked in impl
will copy an artifact from the source repository to the target repository
|
private void |
copyFile(File sourceFile,
File targetPath,
String targetFilename,
boolean fixChecksums) |
Boolean |
deleteArtifact(Artifact artifact)
permissions are checked in impl
|
Boolean |
deleteGroupId(String groupId,
String repositoryId)
permissions are checked in impl
|
Boolean |
deleteProject(String groupId,
String projectId,
String repositoryId)
permissions are checked in impl
|
private void |
fixChecksums(File file) |
ArchivaAdministration |
getArchivaAdministration() |
List<RepositoryListener> |
getListeners() |
ManagedRepositoryAdmin |
getManagedRepositoryAdmin() |
private ArchivaRepositoryMetadata |
getMetadata(File metadataFile) |
private File |
getMetadata(String targetPath) |
RepositoryContentFactory |
getRepositoryFactory() |
RepositorySessionFactory |
getRepositorySessionFactory() |
StringList |
getRunningRemoteDownloadIds() |
Boolean |
isAuthorizedToDeleteArtifacts(String repoId) |
private void |
queueRepositoryTask(String repositoryId,
File localFile) |
Boolean |
removeProjectVersion(String repositoryId,
String namespace,
String projectId,
String version)
permissions are checked in impl
|
Boolean |
removeScanningTaskFromQueue(String repositoryId) |
Boolean |
scanRepository(String repositoryId,
boolean fullScan)
index repository
|
RepositoryScanStatistics |
scanRepositoryDirectoriesNow(String repositoryId)
scan directories
|
Boolean |
scanRepositoryNow(String repositoryId,
boolean fullScan) |
Boolean |
scheduleDownloadRemoteIndex(String repositoryId,
boolean now,
boolean fullDownload) |
void |
setArchivaAdministration(ArchivaAdministration archivaAdministration) |
void |
setListeners(List<RepositoryListener> listeners) |
void |
setManagedRepositoryAdmin(ManagedRepositoryAdmin managedRepositoryAdmin) |
void |
setRepositoryFactory(RepositoryContentFactory repositoryFactory) |
void |
setRepositorySessionFactory(RepositorySessionFactory repositorySessionFactory) |
private void |
updateMetadata(ArchivaRepositoryMetadata metadata,
File metadataFile,
Date lastUpdatedTimestamp,
Artifact artifact)
Update artifact level metadata.
|
private void |
updateProjectMetadata(String targetPath,
Date lastUpdatedTimestamp,
String timestamp,
int buildNumber,
boolean fixChecksums,
ArtifactTransferRequest artifactTransferRequest) |
buildArtifacts, doScanRepository, getArtifactUrl, getArtifactUrl, getAuditInformation, getAuditListeners, getBaseUrl, getBeansOfType, getModelMapper, getObservableRepos, getPrincipal, setAuditListeners, triggerAuditEvent
private org.slf4j.Logger log
@Inject @Named(value="taskExecutor#indexing") private ArchivaIndexingTaskExecutor archivaIndexingTaskExecutor
@Inject private ManagedRepositoryAdmin managedRepositoryAdmin
@Inject private PlexusSisuBridge plexusSisuBridge
@Inject private MavenIndexerUtils mavenIndexerUtils
@Inject private org.apache.archiva.redback.system.SecuritySystem securitySystem
@Inject private RepositoryContentFactory repositoryFactory
@Inject @Named(value="archivaTaskScheduler#repository") private ArchivaTaskScheduler scheduler
@Inject private DownloadRemoteIndexScheduler downloadRemoteIndexScheduler
@Inject @Named(value="repositorySessionFactory") protected RepositorySessionFactory repositorySessionFactory
@Inject @Autowired(required=false) protected List<RepositoryListener> listeners
@Inject private RepositoryScanner repoScanner
@Inject @Named(value="cache#namespaces") private org.apache.archiva.redback.components.cache.Cache<String,Collection<String>> namespacesCache
private ChecksumAlgorithm[] algorithms
public DefaultRepositoriesService()
public Boolean scanRepository(String repositoryId, boolean fullScan)
RepositoriesService
scanRepository
in interface RepositoriesService
public Boolean alreadyScanning(String repositoryId)
alreadyScanning
in interface RepositoriesService
public Boolean removeScanningTaskFromQueue(String repositoryId)
removeScanningTaskFromQueue
in interface RepositoriesService
public Boolean scanRepositoryNow(String repositoryId, boolean fullScan) throws ArchivaRestServiceException
scanRepositoryNow
in interface RepositoriesService
ArchivaRestServiceException
public Boolean scheduleDownloadRemoteIndex(String repositoryId, boolean now, boolean fullDownload) throws ArchivaRestServiceException
scheduleDownloadRemoteIndex
in interface RepositoriesService
ArchivaRestServiceException
public Boolean copyArtifact(ArtifactTransferRequest artifactTransferRequest) throws ArchivaRestServiceException
RepositoriesService
copyArtifact
in interface RepositoriesService
ArchivaRestServiceException
private void queueRepositoryTask(String repositoryId, File localFile)
private ArchivaRepositoryMetadata getMetadata(File metadataFile) throws RepositoryMetadataException
RepositoryMetadataException
private File getMetadata(String targetPath)
private void copyFile(File sourceFile, File targetPath, String targetFilename, boolean fixChecksums) throws IOException
IOException
private void fixChecksums(File file)
private void updateProjectMetadata(String targetPath, Date lastUpdatedTimestamp, String timestamp, int buildNumber, boolean fixChecksums, ArtifactTransferRequest artifactTransferRequest) throws RepositoryMetadataException
RepositoryMetadataException
public Boolean removeProjectVersion(String repositoryId, String namespace, String projectId, String version) throws ArchivaRestServiceException
RepositoriesService
removeProjectVersion
in interface RepositoriesService
ArchivaRestServiceException
public Boolean deleteArtifact(Artifact artifact) throws ArchivaRestServiceException
RepositoriesService
deleteArtifact
in interface RepositoriesService
ArchivaRestServiceException
public Boolean deleteGroupId(String groupId, String repositoryId) throws ArchivaRestServiceException
RepositoriesService
deleteGroupId
in interface RepositoriesService
ArchivaRestServiceException
public Boolean deleteProject(String groupId, String projectId, String repositoryId) throws ArchivaRestServiceException
RepositoriesService
deleteProject
in interface RepositoriesService
ArchivaRestServiceException
public Boolean isAuthorizedToDeleteArtifacts(String repoId) throws ArchivaRestServiceException
isAuthorizedToDeleteArtifacts
in interface RepositoriesService
ArchivaRestServiceException
public RepositoryScanStatistics scanRepositoryDirectoriesNow(String repositoryId) throws ArchivaRestServiceException
RepositoriesService
scanRepositoryDirectoriesNow
in interface RepositoriesService
ArchivaRestServiceException
private void updateMetadata(ArchivaRepositoryMetadata metadata, File metadataFile, Date lastUpdatedTimestamp, Artifact artifact) throws RepositoryMetadataException
metadata
- RepositoryMetadataException
public StringList getRunningRemoteDownloadIds()
getRunningRemoteDownloadIds
in interface RepositoriesService
public ManagedRepositoryAdmin getManagedRepositoryAdmin()
public void setManagedRepositoryAdmin(ManagedRepositoryAdmin managedRepositoryAdmin)
public RepositoryContentFactory getRepositoryFactory()
public void setRepositoryFactory(RepositoryContentFactory repositoryFactory)
public RepositorySessionFactory getRepositorySessionFactory()
public void setRepositorySessionFactory(RepositorySessionFactory repositorySessionFactory)
public List<RepositoryListener> getListeners()
public void setListeners(List<RepositoryListener> listeners)
public ArchivaAdministration getArchivaAdministration()
public void setArchivaAdministration(ArchivaAdministration archivaAdministration)
Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.