本文整理了Java中org.sonatype.nexus.proxy.repository.Repository.getPathPrefix
方法的一些代码示例,展示了Repository.getPathPrefix
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.getPathPrefix
方法的具体详情如下:
包路径:org.sonatype.nexus.proxy.repository.Repository
类名称:Repository
方法名:getPathPrefix
[英]Used by router only, to specify a valid path prefix to a repository (previously was used getId() for this).
[中]仅由路由器使用,用于指定存储库的有效路径前缀(之前用于此目的的是getId()。
代码示例来源:origin: org.sonatype.nexus.plugins/nexus-restlet1x-plugin
repository.getProviderHint());
url.append("content/").append(rtd.getPrefix()).append("/").append(repository.getPathPrefix());
代码示例来源:origin: org.sonatype.nexus/nexus-rest-api
repository.getProviderHint() );
url.append( "content/" ).append( rtd.getPrefix() ).append( "/" ).append( repository.getPathPrefix() );
代码示例来源:origin: org.sonatype.nexus/nexus-proxy
protected Repository getRepositoryForPathPrefixOrId( String pathPrefixOrId, Class<? extends Repository> kind )
throws NoSuchRepositoryException
{
List<? extends Repository> repositories = repositoryRegistry.getRepositoriesWithFacet( kind );
Repository idMatched = null;
Repository pathPrefixMatched = null;
for ( Repository repository : repositories )
{
if ( StringUtils.equals( repository.getId(), pathPrefixOrId ) )
{
idMatched = repository;
}
if ( StringUtils.equals( repository.getPathPrefix(), pathPrefixOrId ) )
{
pathPrefixMatched = repository;
}
}
if ( idMatched != null )
{
// id wins
return idMatched;
}
if ( pathPrefixMatched != null )
{
// if no id found, prefix wins
return pathPrefixMatched;
}
// nothing found
throw new NoSuchRepositoryException( "pathPrefixOrId: '" + pathPrefixOrId + "'" );
}
代码示例来源:origin: org.sonatype.nexus/nexus-proxy
repository.getPathPrefix() ) );
内容来源于网络,如有侵权,请联系作者删除!