public String getProviderRole() { return getCurrentConfiguration( false ).getProviderRole(); }
public String getRepositoryProviderRole() { return getCoreConfiguration().getConfiguration( false ).getProviderRole(); }
protected void createRepositories() throws ConfigurationException { List<CRepository> reposes = getConfigurationModel().getRepositories(); for ( CRepository repo : reposes ) { if ( !repo.getProviderRole().equals( GroupRepository.class.getName() ) ) { instantiateRepository( getConfigurationModel(), repo ); } } for ( CRepository repo : reposes ) { if ( repo.getProviderRole().equals( GroupRepository.class.getName() ) ) { instantiateRepository( getConfigurationModel(), repo ); } } }
@Override public Repository createRepositoryFromModel( final Configuration configuration, final CRepository repoConf ) throws ConfigurationException { Repository repository = createRepository( repoConf.getProviderRole(), repoConf.getProviderHint() ); repository.configure( repoConf ); return repository; }
public ManuallyConfiguredRepositoryTemplate createManuallyTemplate( CRepositoryCoreConfiguration configuration ) throws ConfigurationException { final CRepository repoConfig = configuration.getConfiguration( false ); RepositoryTypeDescriptor rtd = repositoryTypeRegistry.getRepositoryTypeDescriptor( repoConfig.getProviderRole(), repoConfig.getProviderHint() ); if ( rtd == null ) { final String msg = String.format( "Repository being created \"%s\" (repoId=%s) has corresponding type that is not registered in Core: Repository type %s:%s is unknown to Nexus Core. It is probably contributed by an old Nexus plugin. Please contact plugin developers to upgrade the plugin, and register the new repository type(s) properly!", repoConfig.getName(), repoConfig.getId(), repoConfig.getProviderRole(), repoConfig.getProviderHint() ); throw new ConfigurationException( msg ); } ContentClass contentClass = repositoryTypeRegistry.getRepositoryContentClass( rtd.getRole(), rtd.getHint() ); return new ManuallyConfiguredRepositoryTemplate( this, "manual", "Manually created template", contentClass, null, configuration ); } }
repositoryTypeRegistry.getRepositoryTypeDescriptor( repositoryModel.getProviderRole(), repositoryModel.getProviderHint() ); String.format( "Repository \"%s\" (repoId=%s) corresponding type is not registered in Core, hence it's maxInstace check cannot be performed: Repository type %s:%s is unknown to Nexus Core. It is probably contributed by an old Nexus plugin. Please contact plugin developers to upgrade the plugin, and register the new repository type(s) properly!", repositoryModel.getName(), repositoryModel.getId(), repositoryModel.getProviderRole(), repositoryModel.getProviderHint() );
if ( cRepository.getProviderRole() != null ) serializer.startTag( NAMESPACE, "providerRole" ).text( cRepository.getProviderRole() ).endTag( NAMESPACE, "providerRole" );