/** * {@inheritDoc} */ public ScmRepository makeProviderScmRepository( String providerType, File path ) throws ScmRepositoryException, UnknownRepositoryStructure, NoSuchScmProviderException { if ( providerType == null ) { throw new NullPointerException( "The provider type cannot be null." ); } ScmProvider provider = getProviderByType( providerType ); ScmProviderRepository providerRepository = provider.makeProviderScmRepository( path ); return new ScmRepository( providerType, providerRepository ); }
/** * {@inheritDoc} */ public ScmRepository makeProviderScmRepository( String providerType, File path ) throws ScmRepositoryException, UnknownRepositoryStructure, NoSuchScmProviderException { if ( providerType == null ) { throw new NullPointerException( "The provider type cannot be null." ); } ScmProvider provider = getProviderByType( providerType ); ScmProviderRepository providerRepository = provider.makeProviderScmRepository( path ); return new ScmRepository( providerType, providerRepository ); }
/** * {@inheritDoc} */ public ScmRepository makeScmRepository( String scmUrl ) throws ScmRepositoryException, NoSuchScmProviderException { if ( scmUrl == null ) { throw new NullPointerException( "The scm url cannot be null." ); } char delimiter = ScmUrlUtils.getDelimiter( scmUrl ).charAt( 0 ); String providerType = ScmUrlUtils.getProvider( scmUrl ); ScmProvider provider = getProviderByType( providerType ); String scmSpecificUrl = cleanScmUrl( scmUrl.substring( providerType.length() + 5 ) ); ScmProviderRepository providerRepository = provider.makeProviderScmRepository( scmSpecificUrl, delimiter ); return new ScmRepository( providerType, providerRepository ); }
/** * {@inheritDoc} */ public ScmRepository makeScmRepository( String scmUrl ) throws ScmRepositoryException, NoSuchScmProviderException { if ( scmUrl == null ) { throw new NullPointerException( "The scm url cannot be null." ); } char delimiter = ScmUrlUtils.getDelimiter( scmUrl ).charAt( 0 ); String providerType = ScmUrlUtils.getProvider( scmUrl ); ScmProvider provider = getProviderByType( providerType ); String scmSpecificUrl = cleanScmUrl( scmUrl.substring( providerType.length() + 5 ) ); ScmProviderRepository providerRepository = provider.makeProviderScmRepository( scmSpecificUrl, delimiter ); return new ScmRepository( providerType, providerRepository ); }