@Service(value="managedRepositoryAdmin#default") public class DefaultManagedRepositoryAdmin extends AbstractRepositoryAdmin implements ManagedRepositoryAdmin
Modifier and Type | Field and Description |
---|---|
(package private) List<? extends org.apache.maven.index.context.IndexCreator> |
indexCreators |
(package private) org.apache.maven.index.NexusIndexer |
indexer |
private org.slf4j.Logger |
log |
private MavenIndexerUtils |
mavenIndexerUtils |
private org.apache.archiva.redback.components.cache.Cache<String,Collection<String>> |
namespacesCache |
private PlexusSisuBridge |
plexusSisuBridge |
private RepositorySessionFactory |
repositorySessionFactory
FIXME: this could be multiple implementations and needs to be configured.
|
private RepositoryStatisticsManager |
repositoryStatisticsManager |
private RepositoryArchivaTaskScheduler |
repositoryTaskScheduler |
protected org.apache.archiva.redback.role.RoleManager |
roleManager |
static String |
STAGE_REPO_ID_END |
REPOSITORY_LOCATION_VALID_EXPRESSION
Constructor and Description |
---|
DefaultManagedRepositoryAdmin() |
Modifier and Type | Method and Description |
---|---|
Boolean |
addManagedRepository(ManagedRepository managedRepository,
boolean needStageRepo,
AuditInformation auditInformation) |
private ManagedRepositoryConfiguration |
addManagedRepository(String repoId,
String layout,
String name,
String location,
boolean blockRedeployments,
boolean releasesIncluded,
boolean snapshotsIncluded,
boolean stageRepoNeeded,
String cronExpression,
String indexDir,
int daysOlder,
int retentionCount,
boolean deteleReleasedSnapshots,
String description,
boolean skipPackedIndexCreation,
boolean scanned,
AuditInformation auditInformation,
Configuration config) |
protected void |
addRepository(ManagedRepositoryConfiguration repository,
Configuration configuration) |
private void |
addRepositoryRoles(String repoId) |
org.apache.maven.index.context.IndexingContext |
createIndexContext(ManagedRepository repository) |
private Boolean |
deleteManagedRepository(ManagedRepositoryConfiguration repository,
boolean deleteContent,
Configuration config,
boolean stagedOne) |
Boolean |
deleteManagedRepository(String repositoryId,
AuditInformation auditInformation,
boolean deleteContent) |
List<? extends org.apache.maven.index.context.IndexCreator> |
getIndexCreators() |
org.apache.maven.index.NexusIndexer |
getIndexer() |
List<ManagedRepository> |
getManagedRepositories() |
Map<String,ManagedRepository> |
getManagedRepositoriesAsMap() |
ManagedRepository |
getManagedRepository(String repositoryId) |
MavenIndexerUtils |
getMavenIndexerUtils() |
PlexusSisuBridge |
getPlexusSisuBridge() |
RepositorySessionFactory |
getRepositorySessionFactory() |
RepositoryStatisticsManager |
getRepositoryStatisticsManager() |
RepositoryArchivaTaskScheduler |
getRepositoryTaskScheduler() |
org.apache.archiva.redback.role.RoleManager |
getRoleManager() |
private ManagedRepositoryConfiguration |
getStageRepoConfig(ManagedRepositoryConfiguration repository) |
void |
initialize() |
protected void |
removeRepositoryRoles(ManagedRepositoryConfiguration existingRepository) |
Boolean |
scanRepository(String repositoryId,
boolean fullScan) |
void |
setIndexCreators(List<? extends org.apache.maven.index.context.IndexCreator> indexCreators) |
void |
setIndexer(org.apache.maven.index.NexusIndexer indexer) |
void |
setMavenIndexerUtils(MavenIndexerUtils mavenIndexerUtils) |
void |
setPlexusSisuBridge(PlexusSisuBridge plexusSisuBridge) |
void |
setRepositorySessionFactory(RepositorySessionFactory repositorySessionFactory) |
void |
setRepositoryStatisticsManager(RepositoryStatisticsManager repositoryStatisticsManager) |
void |
setRepositoryTaskScheduler(RepositoryArchivaTaskScheduler repositoryTaskScheduler) |
void |
setRoleManager(org.apache.archiva.redback.role.RoleManager roleManager) |
void |
shutdown() |
Boolean |
updateManagedRepository(ManagedRepository managedRepository,
boolean needStageRepo,
AuditInformation auditInformation,
boolean resetStats) |
getArchivaConfiguration, getAuditListeners, getModelMapper, getRegistry, getRepositoryCommonValidator, saveConfiguration, setArchivaConfiguration, setAuditListeners, setRegistry, setRepositoryCommonValidator, triggerAuditEvent
private final org.slf4j.Logger log
public static final String STAGE_REPO_ID_END
@Inject @Named(value="archivaTaskScheduler#repository") private RepositoryArchivaTaskScheduler repositoryTaskScheduler
@Inject private RepositorySessionFactory repositorySessionFactory
@Inject private RepositoryStatisticsManager repositoryStatisticsManager
@Inject private PlexusSisuBridge plexusSisuBridge
@Inject private MavenIndexerUtils mavenIndexerUtils
@Inject protected org.apache.archiva.redback.role.RoleManager roleManager
@Inject @Named(value="cache#namespaces") private org.apache.archiva.redback.components.cache.Cache<String,Collection<String>> namespacesCache
List<? extends org.apache.maven.index.context.IndexCreator> indexCreators
org.apache.maven.index.NexusIndexer indexer
public DefaultManagedRepositoryAdmin()
@PostConstruct public void initialize() throws RepositoryAdminException, org.apache.archiva.redback.role.RoleManagerException
RepositoryAdminException
org.apache.archiva.redback.role.RoleManagerException
@PreDestroy public void shutdown() throws RepositoryAdminException
RepositoryAdminException
public List<ManagedRepository> getManagedRepositories() throws RepositoryAdminException
getManagedRepositories
in interface ManagedRepositoryAdmin
RepositoryAdminException
public Map<String,ManagedRepository> getManagedRepositoriesAsMap() throws RepositoryAdminException
getManagedRepositoriesAsMap
in interface ManagedRepositoryAdmin
RepositoryAdminException
public ManagedRepository getManagedRepository(String repositoryId) throws RepositoryAdminException
getManagedRepository
in interface ManagedRepositoryAdmin
RepositoryAdminException
public Boolean addManagedRepository(ManagedRepository managedRepository, boolean needStageRepo, AuditInformation auditInformation) throws RepositoryAdminException
addManagedRepository
in interface ManagedRepositoryAdmin
RepositoryAdminException
private ManagedRepositoryConfiguration addManagedRepository(String repoId, String layout, String name, String location, boolean blockRedeployments, boolean releasesIncluded, boolean snapshotsIncluded, boolean stageRepoNeeded, String cronExpression, String indexDir, int daysOlder, int retentionCount, boolean deteleReleasedSnapshots, String description, boolean skipPackedIndexCreation, boolean scanned, AuditInformation auditInformation, Configuration config) throws RepositoryAdminException
RepositoryAdminException
public Boolean deleteManagedRepository(String repositoryId, AuditInformation auditInformation, boolean deleteContent) throws RepositoryAdminException
deleteManagedRepository
in interface ManagedRepositoryAdmin
RepositoryAdminException
private Boolean deleteManagedRepository(ManagedRepositoryConfiguration repository, boolean deleteContent, Configuration config, boolean stagedOne) throws RepositoryAdminException
RepositoryAdminException
public Boolean updateManagedRepository(ManagedRepository managedRepository, boolean needStageRepo, AuditInformation auditInformation, boolean resetStats) throws RepositoryAdminException
updateManagedRepository
in interface ManagedRepositoryAdmin
RepositoryAdminException
protected void addRepository(ManagedRepositoryConfiguration repository, Configuration configuration) throws RepositoryAdminException, IOException
RepositoryAdminException
IOException
public org.apache.maven.index.context.IndexingContext createIndexContext(ManagedRepository repository) throws RepositoryAdminException
createIndexContext
in interface ManagedRepositoryAdmin
RepositoryAdminException
private ManagedRepositoryConfiguration getStageRepoConfig(ManagedRepositoryConfiguration repository)
public Boolean scanRepository(String repositoryId, boolean fullScan)
private void addRepositoryRoles(String repoId) throws org.apache.archiva.redback.role.RoleManagerException
org.apache.archiva.redback.role.RoleManagerException
protected void removeRepositoryRoles(ManagedRepositoryConfiguration existingRepository) throws org.apache.archiva.redback.role.RoleManagerException
org.apache.archiva.redback.role.RoleManagerException
public org.apache.archiva.redback.role.RoleManager getRoleManager()
public void setRoleManager(org.apache.archiva.redback.role.RoleManager roleManager)
public RepositoryStatisticsManager getRepositoryStatisticsManager()
public void setRepositoryStatisticsManager(RepositoryStatisticsManager repositoryStatisticsManager)
public RepositorySessionFactory getRepositorySessionFactory()
public void setRepositorySessionFactory(RepositorySessionFactory repositorySessionFactory)
public RepositoryArchivaTaskScheduler getRepositoryTaskScheduler()
public void setRepositoryTaskScheduler(RepositoryArchivaTaskScheduler repositoryTaskScheduler)
public PlexusSisuBridge getPlexusSisuBridge()
public void setPlexusSisuBridge(PlexusSisuBridge plexusSisuBridge)
public MavenIndexerUtils getMavenIndexerUtils()
public void setMavenIndexerUtils(MavenIndexerUtils mavenIndexerUtils)
public org.apache.maven.index.NexusIndexer getIndexer()
public void setIndexer(org.apache.maven.index.NexusIndexer indexer)
public List<? extends org.apache.maven.index.context.IndexCreator> getIndexCreators()
public void setIndexCreators(List<? extends org.apache.maven.index.context.IndexCreator> indexCreators)
Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.