1 package org.apache.archiva.admin.repository.managed;
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
21 import org.apache.archiva.admin.model.AuditInformation;
22 import org.apache.archiva.admin.model.RepositoryAdminException;
23 import org.apache.archiva.admin.model.beans.ManagedRepository;
24 import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin;
25 import org.apache.archiva.admin.repository.AbstractRepositoryAdmin;
26 import org.apache.archiva.audit.AuditEvent;
27 import org.apache.archiva.common.plexusbridge.MavenIndexerUtils;
28 import org.apache.archiva.common.plexusbridge.PlexusSisuBridge;
29 import org.apache.archiva.common.plexusbridge.PlexusSisuBridgeException;
30 import org.apache.archiva.configuration.Configuration;
31 import org.apache.archiva.configuration.ManagedRepositoryConfiguration;
32 import org.apache.archiva.configuration.ProxyConnectorConfiguration;
33 import org.apache.archiva.configuration.RepositoryGroupConfiguration;
34 import org.apache.archiva.metadata.repository.MetadataRepository;
35 import org.apache.archiva.metadata.repository.MetadataRepositoryException;
36 import org.apache.archiva.metadata.repository.RepositorySession;
37 import org.apache.archiva.metadata.repository.RepositorySessionFactory;
38 import org.apache.archiva.metadata.repository.stats.RepositoryStatisticsManager;
39 import org.apache.archiva.redback.components.taskqueue.TaskQueueException;
40 import org.apache.archiva.redback.role.RoleManager;
41 import org.apache.archiva.redback.role.RoleManagerException;
42 import org.apache.archiva.scheduler.repository.model.RepositoryArchivaTaskScheduler;
43 import org.apache.archiva.scheduler.repository.model.RepositoryTask;
44 import org.apache.archiva.security.common.ArchivaRoleConstants;
45 import org.apache.commons.io.FileUtils;
46 import org.apache.commons.lang.StringUtils;
47 import org.apache.maven.index.NexusIndexer;
48 import org.apache.maven.index.context.IndexCreator;
49 import org.apache.maven.index.context.IndexingContext;
50 import org.apache.maven.index.context.UnsupportedExistingLuceneIndexException;
51 import org.slf4j.Logger;
52 import org.slf4j.LoggerFactory;
53 import org.springframework.stereotype.Service;
55 import javax.annotation.PostConstruct;
56 import javax.annotation.PreDestroy;
57 import javax.inject.Inject;
58 import javax.inject.Named;
60 import java.io.IOException;
61 import java.net.MalformedURLException;
62 import java.util.ArrayList;
63 import java.util.Collections;
64 import java.util.HashMap;
65 import java.util.List;
69 * FIXME review the staging mechanism to have a per user session one
71 * @author Olivier Lamy
73 @Service ( "managedRepositoryAdmin#default" )
74 public class DefaultManagedRepositoryAdmin
75 extends AbstractRepositoryAdmin
76 implements ManagedRepositoryAdmin
79 private Logger log = LoggerFactory.getLogger( getClass() );
81 public static final String STAGE_REPO_ID_END = "-stage";
84 @Named ( value = "archivaTaskScheduler#repository" )
85 private RepositoryArchivaTaskScheduler repositoryTaskScheduler;
88 private RepositorySessionFactory repositorySessionFactory;
91 private RepositoryStatisticsManager repositoryStatisticsManager;
94 private PlexusSisuBridge plexusSisuBridge;
97 private MavenIndexerUtils mavenIndexerUtils;
100 protected RoleManager roleManager;
103 List<? extends IndexCreator> indexCreators;
105 NexusIndexer indexer;
108 public void initialize()
109 throws RepositoryAdminException
113 indexCreators = mavenIndexerUtils.getAllIndexCreators();
114 indexer = plexusSisuBridge.lookup( NexusIndexer.class );
116 catch ( PlexusSisuBridgeException e )
118 throw new RepositoryAdminException( e.getMessage(), e );
120 // initialize index context on start
121 for ( ManagedRepository managedRepository : getManagedRepositories() )
123 createIndexContext( managedRepository );
128 public void shutdown()
129 throws RepositoryAdminException
133 // close index on shutdown
134 for ( ManagedRepository managedRepository : getManagedRepositories() )
136 IndexingContext context = indexer.getIndexingContexts().get( managedRepository.getId() );
137 if ( context != null )
139 indexer.removeIndexingContext( context, false );
143 catch ( IOException e )
145 throw new RepositoryAdminException( e.getMessage(), e );
149 public List<ManagedRepository> getManagedRepositories()
150 throws RepositoryAdminException
152 List<ManagedRepositoryConfiguration> managedRepoConfigs =
153 getArchivaConfiguration().getConfiguration().getManagedRepositories();
155 if ( managedRepoConfigs == null )
157 return Collections.emptyList();
160 List<ManagedRepository> managedRepos = new ArrayList<ManagedRepository>( managedRepoConfigs.size() );
162 for ( ManagedRepositoryConfiguration repoConfig : managedRepoConfigs )
164 ManagedRepository repo =
165 new ManagedRepository( repoConfig.getId(), repoConfig.getName(), repoConfig.getLocation(),
166 repoConfig.getLayout(), repoConfig.isSnapshots(), repoConfig.isReleases(),
167 repoConfig.isBlockRedeployments(), repoConfig.getRefreshCronExpression(),
168 repoConfig.getIndexDir(), repoConfig.isScanned(), repoConfig.getDaysOlder(),
169 repoConfig.getRetentionCount(), repoConfig.isDeleteReleasedSnapshots(),
170 repoConfig.isStageRepoNeeded() );
171 repo.setDescription( repoConfig.getDescription() );
172 repo.setSkipPackedIndexCreation( repoConfig.isSkipPackedIndexCreation() );
173 managedRepos.add( repo );
179 public Map<String, ManagedRepository> getManagedRepositoriesAsMap()
180 throws RepositoryAdminException
182 List<ManagedRepository> managedRepositories = getManagedRepositories();
183 Map<String, ManagedRepository> repositoriesMap =
184 new HashMap<String, ManagedRepository>( managedRepositories.size() );
185 for ( ManagedRepository managedRepository : managedRepositories )
187 repositoriesMap.put( managedRepository.getId(), managedRepository );
189 return repositoriesMap;
192 public ManagedRepository getManagedRepository( String repositoryId )
193 throws RepositoryAdminException
195 List<ManagedRepository> repos = getManagedRepositories();
196 for ( ManagedRepository repo : repos )
198 if ( StringUtils.equals( repo.getId(), repositoryId ) )
206 public Boolean addManagedRepository( ManagedRepository managedRepository, boolean needStageRepo,
207 AuditInformation auditInformation )
208 throws RepositoryAdminException
211 getRepositoryCommonValidator().basicValidation( managedRepository, false );
212 getRepositoryCommonValidator().validateManagedRepository( managedRepository );
213 triggerAuditEvent( managedRepository.getId(), null, AuditEvent.ADD_MANAGED_REPO, auditInformation );
215 addManagedRepository( managedRepository.getId(), managedRepository.getLayout(), managedRepository.getName(),
216 managedRepository.getLocation(), managedRepository.isBlockRedeployments(),
217 managedRepository.isReleases(), managedRepository.isSnapshots(), needStageRepo,
218 managedRepository.getCronExpression(), managedRepository.getIndexDirectory(),
219 managedRepository.getDaysOlder(), managedRepository.getRetentionCount(),
220 managedRepository.isDeleteReleasedSnapshots(), managedRepository.getDescription(),
221 managedRepository.isSkipPackedIndexCreation(), managedRepository.isScanned(),
222 auditInformation, getArchivaConfiguration().getConfiguration() ) != null;
224 createIndexContext( managedRepository );
229 private ManagedRepositoryConfiguration addManagedRepository( String repoId, String layout, String name,
230 String location, boolean blockRedeployments,
231 boolean releasesIncluded, boolean snapshotsIncluded,
232 boolean stageRepoNeeded, String cronExpression,
233 String indexDir, int daysOlder, int retentionCount,
234 boolean deteleReleasedSnapshots, String description,
235 boolean skipPackedIndexCreation, boolean scanned,
236 AuditInformation auditInformation,
237 Configuration config )
238 throws RepositoryAdminException
241 ManagedRepositoryConfiguration repository = new ManagedRepositoryConfiguration();
243 repository.setId( repoId );
244 repository.setBlockRedeployments( blockRedeployments );
245 repository.setReleases( releasesIncluded );
246 repository.setSnapshots( snapshotsIncluded );
247 repository.setScanned( scanned );
248 repository.setName( name );
249 repository.setLocation( getRepositoryCommonValidator().removeExpressions( location ) );
250 repository.setLayout( layout );
251 repository.setRefreshCronExpression( cronExpression );
252 repository.setIndexDir( indexDir );
253 repository.setDaysOlder( daysOlder );
254 repository.setRetentionCount( retentionCount );
255 repository.setDeleteReleasedSnapshots( deteleReleasedSnapshots );
256 repository.setIndexDir( indexDir );
257 repository.setDescription( description );
258 repository.setSkipPackedIndexCreation( skipPackedIndexCreation );
259 repository.setStageRepoNeeded( stageRepoNeeded );
263 addRepository( repository, config );
264 addRepositoryRoles( repository );
266 if ( stageRepoNeeded )
268 ManagedRepositoryConfiguration stagingRepository = getStageRepoConfig( repository );
269 addRepository( stagingRepository, config );
270 addRepositoryRoles( stagingRepository );
271 triggerAuditEvent( stagingRepository.getId(), null, AuditEvent.ADD_MANAGED_REPO, auditInformation );
274 catch ( RoleManagerException e )
276 throw new RepositoryAdminException( "failed to add repository roles " + e.getMessage(), e );
278 catch ( IOException e )
280 throw new RepositoryAdminException( "failed to add repository " + e.getMessage(), e );
283 saveConfiguration( config );
285 //MRM-1342 Repository statistics report doesn't appear to be working correctly
286 //scan repository when adding of repository is successful
291 scanRepository( repoId, true );
294 // TODO need a better to define scanning or not for staged repo
295 if ( stageRepoNeeded && scanned )
297 ManagedRepositoryConfiguration stagingRepository = getStageRepoConfig( repository );
298 scanRepository( stagingRepository.getId(), true );
301 catch ( Exception e )
303 log.warn( new StringBuilder( "Unable to scan repository [" ).append( repoId ).append( "]: " ).append(
304 e.getMessage() ).toString(), e );
310 public Boolean deleteManagedRepository( String repositoryId, AuditInformation auditInformation,
311 boolean deleteContent )
312 throws RepositoryAdminException
314 Configuration config = getArchivaConfiguration().getConfiguration();
316 ManagedRepositoryConfiguration repository = config.findManagedRepositoryById( repositoryId );
318 if ( repository == null )
320 throw new RepositoryAdminException( "A repository with that id does not exist" );
323 triggerAuditEvent( repositoryId, null, AuditEvent.DELETE_MANAGED_REPO, auditInformation );
325 deleteManagedRepository( repository, deleteContent, config, false );
327 // stage repo exists ?
328 ManagedRepositoryConfiguration stagingRepository =
329 getArchivaConfiguration().getConfiguration().findManagedRepositoryById( repositoryId + STAGE_REPO_ID_END );
330 if ( stagingRepository != null )
332 // do not trigger event when deleting the staged one
333 deleteManagedRepository( stagingRepository, deleteContent, config, true );
338 saveConfiguration( config );
340 catch ( Exception e )
342 throw new RepositoryAdminException( "Error saving configuration for delete action" + e.getMessage() );
348 private Boolean deleteManagedRepository( ManagedRepositoryConfiguration repository, boolean deleteContent,
349 Configuration config, boolean stagedOne )
350 throws RepositoryAdminException
355 NexusIndexer nexusIndexer = plexusSisuBridge.lookup( NexusIndexer.class );
357 IndexingContext context = nexusIndexer.getIndexingContexts().get( repository.getId() );
358 if ( context != null )
360 // delete content only if directory exists
361 nexusIndexer.removeIndexingContext( context,
362 deleteContent && context.getIndexDirectoryFile().exists() );
365 catch ( PlexusSisuBridgeException e )
367 throw new RepositoryAdminException( e.getMessage(), e );
369 catch ( IOException e )
371 throw new RepositoryAdminException( e.getMessage(), e );
375 RepositorySession repositorySession = getRepositorySessionFactory().createSession();
378 MetadataRepository metadataRepository = repositorySession.getRepository();
379 metadataRepository.removeRepository( repository.getId() );
380 log.debug( "call repositoryStatisticsManager.deleteStatistics" );
381 getRepositoryStatisticsManager().deleteStatistics( metadataRepository, repository.getId() );
382 repositorySession.save();
384 catch ( MetadataRepositoryException e )
386 //throw new RepositoryAdminException( e.getMessage(), e );
387 log.warn( "skip error during removing repository from MetadatRepository:" + e.getMessage(), e );
391 repositorySession.close();
394 config.removeManagedRepository( repository );
398 // TODO could be async ? as directory can be huge
399 File dir = new File( repository.getLocation() );
400 if ( !FileUtils.deleteQuietly( dir ) )
402 throw new RepositoryAdminException( "Cannot delete repository " + dir );
406 // olamy: copy list for reading as a unit test in webapp fail with ConcurrentModificationException
407 List<ProxyConnectorConfiguration> proxyConnectors =
408 new ArrayList<ProxyConnectorConfiguration>( config.getProxyConnectors() );
409 for ( ProxyConnectorConfiguration proxyConnector : proxyConnectors )
411 if ( StringUtils.equals( proxyConnector.getSourceRepoId(), repository.getId() ) )
413 config.removeProxyConnector( proxyConnector );
417 Map<String, List<String>> repoToGroupMap = config.getRepositoryToGroupMap();
418 if ( repoToGroupMap != null )
420 if ( repoToGroupMap.containsKey( repository.getId() ) )
422 List<String> repoGroups = repoToGroupMap.get( repository.getId() );
423 for ( String repoGroup : repoGroups )
425 // copy to prevent UnsupportedOperationException
426 RepositoryGroupConfiguration repositoryGroupConfiguration =
427 config.findRepositoryGroupById( repoGroup );
428 List<String> repos = new ArrayList<String>( repositoryGroupConfiguration.getRepositories() );
429 config.removeRepositoryGroup( repositoryGroupConfiguration );
430 repos.remove( repository.getId() );
431 repositoryGroupConfiguration.setRepositories( repos );
432 config.addRepositoryGroup( repositoryGroupConfiguration );
439 removeRepositoryRoles( repository );
441 catch ( RoleManagerException e )
443 throw new RepositoryAdminException(
444 "fail to remove repository roles for repository " + repository.getId() + " : " + e.getMessage(), e );
447 saveConfiguration( config );
453 public Boolean updateManagedRepository( ManagedRepository managedRepository, boolean needStageRepo,
454 AuditInformation auditInformation, boolean resetStats )
455 throws RepositoryAdminException
458 log.debug( "updateManagedConfiguration repo {} needStage {} resetStats {} ", managedRepository, needStageRepo,
461 // Ensure that the fields are valid.
463 getRepositoryCommonValidator().basicValidation( managedRepository, true );
465 getRepositoryCommonValidator().validateManagedRepository( managedRepository );
467 Configuration configuration = getArchivaConfiguration().getConfiguration();
469 ManagedRepositoryConfiguration toremove = configuration.findManagedRepositoryById( managedRepository.getId() );
471 if ( toremove != null )
473 configuration.removeManagedRepository( toremove );
476 ManagedRepositoryConfiguration stagingRepository = getStageRepoConfig( toremove );
478 // TODO remove content from old if path has changed !!!!!
480 if ( stagingRepository != null )
482 configuration.removeManagedRepository( stagingRepository );
485 ManagedRepositoryConfiguration managedRepositoryConfiguration =
486 addManagedRepository( managedRepository.getId(), managedRepository.getLayout(), managedRepository.getName(),
487 managedRepository.getLocation(), managedRepository.isBlockRedeployments(),
488 managedRepository.isReleases(), managedRepository.isSnapshots(), needStageRepo,
489 managedRepository.getCronExpression(), managedRepository.getIndexDirectory(),
490 managedRepository.getDaysOlder(), managedRepository.getRetentionCount(),
491 managedRepository.isDeleteReleasedSnapshots(), managedRepository.getDescription(),
492 managedRepository.isSkipPackedIndexCreation(), managedRepository.isScanned(),
493 auditInformation, getArchivaConfiguration().getConfiguration() );
495 // Save the repository configuration.
496 RepositorySession repositorySession = getRepositorySessionFactory().createSession();
500 triggerAuditEvent( managedRepositoryConfiguration.getId(), null, AuditEvent.MODIFY_MANAGED_REPO,
503 saveConfiguration( this.getArchivaConfiguration().getConfiguration() );
506 log.debug( "call repositoryStatisticsManager.deleteStatistics" );
507 getRepositoryStatisticsManager().deleteStatistics( repositorySession.getRepository(),
508 managedRepositoryConfiguration.getId() );
509 repositorySession.save();
513 catch ( MetadataRepositoryException e )
515 throw new RepositoryAdminException( e.getMessage(), e );
519 repositorySession.close();
521 createIndexContext( managedRepository );
525 //--------------------------
527 //--------------------------
530 protected void addRepository( ManagedRepositoryConfiguration repository, Configuration configuration )
531 throws RepositoryAdminException, IOException
533 // Normalize the path
534 File file = new File( repository.getLocation() );
535 if ( !file.isAbsolute() )
537 // add appserver.base/repositories
538 file = new File( getRegistry().getString( "appserver.base" ) + File.separatorChar + "repositories",
539 repository.getLocation() );
541 repository.setLocation( file.getCanonicalPath() );
542 if ( !file.exists() )
546 if ( !file.exists() || !file.isDirectory() )
548 throw new RepositoryAdminException(
549 "Unable to add repository - no write access, can not create the root directory: " + file );
552 configuration.addManagedRepository( repository );
556 public IndexingContext createIndexContext( ManagedRepository repository )
557 throws RepositoryAdminException
560 // take care first about repository location as can be relative
561 File repositoryDirectory = new File( repository.getLocation() );
563 if ( !repositoryDirectory.isAbsolute() )
565 repositoryDirectory =
566 new File( getRegistry().getString( "appserver.base" ) + File.separatorChar + "repositories",
567 repository.getLocation() );
570 if ( !repositoryDirectory.exists() )
572 repositoryDirectory.mkdirs();
578 IndexingContext context = indexer.getIndexingContexts().get( repository.getId() );
580 if ( context != null )
582 log.debug( "skip adding repository indexingContent with id {} as already exists", repository.getId() );
586 String indexDir = repository.getIndexDirectory();
587 File managedRepository = new File( repository.getLocation() );
589 File indexDirectory = null;
590 if ( indexDir != null && !"".equals( indexDir ) )
592 indexDirectory = new File( repository.getIndexDirectory() );
593 if ( !indexDirectory.isAbsolute() )
595 indexDirectory = new File( managedRepository, repository.getIndexDirectory() );
596 repository.setIndexDirectory( indexDirectory.getAbsolutePath() );
601 indexDirectory = new File( managedRepository, ".indexer" );
602 if ( !managedRepository.isAbsolute() )
604 indexDirectory = new File( repositoryDirectory, ".indexer" );
605 repository.setIndexDirectory( indexDirectory.getAbsolutePath() );
609 if ( !indexDirectory.exists() )
611 indexDirectory.mkdirs();
614 context = indexer.getIndexingContexts().get( repository.getId() );
616 if ( context == null )
618 context = indexer.addIndexingContext( repository.getId(), repository.getId(), managedRepository,
620 managedRepository.toURI().toURL().toExternalForm(),
621 indexDirectory.toURI().toURL().toString(), indexCreators );
623 context.setSearchable( repository.isScanned() );
627 catch ( MalformedURLException e )
629 throw new RepositoryAdminException( e.getMessage(), e );
631 catch ( IOException e )
633 throw new RepositoryAdminException( e.getMessage(), e );
635 catch ( UnsupportedExistingLuceneIndexException e )
637 throw new RepositoryAdminException( e.getMessage(), e );
641 private ManagedRepositoryConfiguration getStageRepoConfig( ManagedRepositoryConfiguration repository )
643 ManagedRepositoryConfiguration stagingRepository = new ManagedRepositoryConfiguration();
644 stagingRepository.setId( repository.getId() + STAGE_REPO_ID_END );
645 stagingRepository.setLayout( repository.getLayout() );
646 stagingRepository.setName( repository.getName() + STAGE_REPO_ID_END );
647 stagingRepository.setBlockRedeployments( repository.isBlockRedeployments() );
648 stagingRepository.setDaysOlder( repository.getDaysOlder() );
649 stagingRepository.setDeleteReleasedSnapshots( repository.isDeleteReleasedSnapshots() );
651 String path = repository.getLocation();
652 int lastIndex = path.replace( '\\', '/' ).lastIndexOf( '/' );
653 stagingRepository.setLocation( path.substring( 0, lastIndex ) + "/" + stagingRepository.getId() );
655 if ( StringUtils.isNotBlank( repository.getIndexDir() ) )
657 File indexDir = new File( repository.getIndexDir() );
658 // in case of absolute dir do not use the same
659 if ( indexDir.isAbsolute() )
661 stagingRepository.setIndexDir( stagingRepository.getLocation() + "/.index" );
665 stagingRepository.setIndexDir( repository.getIndexDir() );
668 stagingRepository.setRefreshCronExpression( repository.getRefreshCronExpression() );
669 stagingRepository.setReleases( repository.isReleases() );
670 stagingRepository.setRetentionCount( repository.getRetentionCount() );
671 stagingRepository.setScanned( repository.isScanned() );
672 stagingRepository.setSnapshots( repository.isSnapshots() );
673 stagingRepository.setSkipPackedIndexCreation( repository.isSkipPackedIndexCreation() );
674 // do not duplicate description
675 //stagingRepository.getDescription("")
676 return stagingRepository;
679 public Boolean scanRepository( String repositoryId, boolean fullScan )
681 if ( getRepositoryTaskScheduler().isProcessingRepositoryTask( repositoryId ) )
683 log.info( "scanning of repository with id {} already scheduled", repositoryId );
685 RepositoryTask task = new RepositoryTask();
686 task.setRepositoryId( repositoryId );
687 task.setScanAll( fullScan );
690 getRepositoryTaskScheduler().queueTask( task );
692 catch ( TaskQueueException e )
694 log.error( "failed to schedule scanning of repo with id {}", repositoryId, e );
700 protected void addRepositoryRoles( ManagedRepositoryConfiguration newRepository )
701 throws RoleManagerException
703 String repoId = newRepository.getId();
705 // TODO: double check these are configured on start up
706 // TODO: belongs in the business logic
708 if ( !getRoleManager().templatedRoleExists( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, repoId ) )
710 getRoleManager().createTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, repoId );
713 if ( !getRoleManager().templatedRoleExists( ArchivaRoleConstants.TEMPLATE_REPOSITORY_MANAGER, repoId ) )
715 getRoleManager().createTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_MANAGER, repoId );
719 protected void removeRepositoryRoles( ManagedRepositoryConfiguration existingRepository )
720 throws RoleManagerException
722 String repoId = existingRepository.getId();
724 if ( getRoleManager().templatedRoleExists( ArchivaRoleConstants.TEMPLATE_REPOSITORY_MANAGER, repoId ) )
726 getRoleManager().removeTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_MANAGER, repoId );
729 if ( getRoleManager().templatedRoleExists( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, repoId ) )
731 getRoleManager().removeTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, repoId );
734 log.debug( "removed user roles associated with repository {}", repoId );
737 //--------------------------
739 //--------------------------
742 public RoleManager getRoleManager()
747 public void setRoleManager( RoleManager roleManager )
749 this.roleManager = roleManager;
752 public RepositoryStatisticsManager getRepositoryStatisticsManager()
754 return repositoryStatisticsManager;
757 public void setRepositoryStatisticsManager( RepositoryStatisticsManager repositoryStatisticsManager )
759 this.repositoryStatisticsManager = repositoryStatisticsManager;
762 public RepositorySessionFactory getRepositorySessionFactory()
764 return repositorySessionFactory;
767 public void setRepositorySessionFactory( RepositorySessionFactory repositorySessionFactory )
769 this.repositorySessionFactory = repositorySessionFactory;
773 public RepositoryArchivaTaskScheduler getRepositoryTaskScheduler()
775 return repositoryTaskScheduler;
778 public void setRepositoryTaskScheduler( RepositoryArchivaTaskScheduler repositoryTaskScheduler )
780 this.repositoryTaskScheduler = repositoryTaskScheduler;
783 public PlexusSisuBridge getPlexusSisuBridge()
785 return plexusSisuBridge;
788 public void setPlexusSisuBridge( PlexusSisuBridge plexusSisuBridge )
790 this.plexusSisuBridge = plexusSisuBridge;
793 public MavenIndexerUtils getMavenIndexerUtils()
795 return mavenIndexerUtils;
798 public void setMavenIndexerUtils( MavenIndexerUtils mavenIndexerUtils )
800 this.mavenIndexerUtils = mavenIndexerUtils;