本文整理了Java中org.sonatype.nexus.proxy.repository.Repository.getId
方法的一些代码示例,展示了Repository.getId
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.getId
方法的具体详情如下:
包路径:org.sonatype.nexus.proxy.repository.Repository
类名称:Repository
方法名:getId
[英]Returns the ID of the resourceStore.
[中]返回resourceStore的ID。
代码示例来源:origin: org.sonatype.nexus/nexus-api
/**
* Adds the repository to the list of processed repositories.
*
* @param repository
*/
public void addProcessedRepository( Repository repository )
{
processedRepositories.add( repository.getId() );
}
代码示例来源:origin: org.sonatype.nexus/nexus-api
/**
* Adds a list of applied mappings that happened in given repository.
*
* @param repository
*/
public void addAppliedMappingsList( Repository repository, List<String> mappingList )
{
appliedMappings.put( repository.getId(), mappingList );
}
代码示例来源:origin: org.sonatype.nexus/nexus-api
@Override
public String toString() {
return getClass().getSimpleName() + "{" +
"repositoryId=" + repository.getId() +
'}';
}
}
代码示例来源:origin: org.sonatype.nexus/nexus-proxy
protected synchronized void repositoriesMapPut( final Repository repository )
{
_repositories.put( repository.getId(), repository );
_repositoriesView = Collections.unmodifiableMap( new HashMap<String, Repository>( _repositories ) );
}
代码示例来源:origin: org.sonatype.nexus/nexus-proxy
@Override
public List<String> getTransitiveMemberRepositoryIds()
{
List<String> ids = new ArrayList<String>();
for ( Repository repo : getTransitiveMemberRepositories() )
{
ids.add( repo.getId() );
}
return ids;
}
代码示例来源:origin: org.sonatype.nexus/nexus-api
@Override
public String toString() {
return getClass().getSimpleName() + "{" +
"repositoryId=" + getRepository().getId() +
'}';
}
}
代码示例来源:origin: org.sonatype.nexus.plugins/nexus-indexer-lucene-plugin
@Override
public void run(IndexingContext context)
throws IOException
{
TaskUtil.checkInterruption();
log.debug("Optimizing index for repository {} ", repository.getId());
context.optimize();
log.debug("Optimized index for repository {} ", repository.getId());
}
});
代码示例来源:origin: org.sonatype.nexus/nexus-rest-api
public Repository getRepository( String repoId )
throws NoSuchRepositoryException
{
Repository repository = this.defaultRepositoryRegistry.getRepository( repoId );
this.checkAccessToRepository( repository.getId() );
return repository;
}
代码示例来源:origin: org.sonatype.nexus.plugins/nexus-p2-repository-plugin
@Override
public void scanAndRebuild() {
for (final Repository repository : repositories.getRepositories()) {
scanAndRebuild(repository.getId());
}
}
代码示例来源:origin: org.sonatype.nexus/nexus-api
protected DefaultRepositoryItemUid( final RepositoryItemUidFactory factory, final Repository repository,
final String path )
{
super();
this.factory = factory;
this.repository = repository;
this.path = path;
this.stringRepresentation = getRepository().getId() + ":" + getPath();
this.lock = null;
}
代码示例来源:origin: org.sonatype.nexus/nexus-proxy
protected List<String> getTargetPerms( final TargetSet matched, final Action action )
{
final List<String> perms = new ArrayList<String>( matched.getMatches().size() );
// nexus : 'target' + targetId : repoId : read
for ( TargetMatch match : matched.getMatches() )
{
perms.add( "nexus:target:" + match.getTarget().getId() + ":" + match.getRepository().getId() + ":" + action );
}
return perms;
}
代码示例来源:origin: org.sonatype.nexus/nexus-api
@Override
public String toString()
{
return getClass().getSimpleName() + "{" +
"repositoryId=" + getRepository().getId() +
", addedMembers=" + getAddedRepositoryIds() +
", removedMembers=" + getRemovedRepositoryIds() +
", reorderedMembers=" + getReorderedRepositoryIds() +
'}';
}
}
代码示例来源:origin: org.sonatype.nexus/nexus-proxy
public boolean hasAnyApplicableTarget( Repository repository )
{
logger.debug( "Looking for any targets for repository='{}'", repository.getId() );
for ( Target t : getRepositoryTargets() )
{
if ( t.getContentClass().isCompatible( repository.getRepositoryContentClass() ) )
{
return true;
}
}
return false;
}
代码示例来源:origin: org.sonatype.nexus.plugins/nexus-indexer-lucene-plugin
@Override
protected TreeNode createNode(IndexTreeView tview, TreeViewRequest req, String path, boolean leaf,
String nodeName, Type type)
{
final TreeNode result = super.createNode(tview, req, path, leaf, nodeName, type);
result.setRepositoryId(getRepository().getId());
return result;
}
代码示例来源:origin: org.sonatype.nexus/nexus-api
/**
* Instantiates a new abstract storage item.
*/
public AbstractStorageItem( Repository repository, ResourceStoreRequest request, boolean readable,
boolean writable )
{
this( request, readable, writable );
this.store = repository;
this.repositoryItemUid = repository.createUid( getPath() );
setRepositoryId( repository.getId() );
}
代码示例来源:origin: org.sonatype.nexus/nexus-indexer-lucene-app
protected TreeNode createNode( IndexTreeView tview, String path, boolean leaf, String nodeName, Type type )
{
TreeNode result = super.createNode( tview, path, leaf, nodeName, type );
result.setRepositoryId( getRepository().getId() );
return result;
}
代码示例来源:origin: org.sonatype.nexus.plugins/nexus-yum-repository-plugin
private boolean isRpmItemEvent(RepositoryItemEvent itemEvent) {
return yumRegistryProvider.get().isRegistered(itemEvent.getRepository().getId())
&& !itemEvent.getItem().getRepositoryItemUid().getBooleanAttributeValue(IsHiddenAttribute.class)
&& itemEvent.getItem().getPath().toLowerCase().endsWith(".rpm");
}
代码示例来源:origin: org.sonatype.nexus/nexus-web-utils
/**
* Creates absolute URL (as String) of the passed link's target. To be used in "Location" header of the redirect
* message, for example.
*/
protected String getLinkTargetUrl(final StorageLinkItem link) {
final RepositoryItemUid targetUid = link.getTarget();
// TODO: fix this chum
return link.getResourceStoreRequest().getRequestAppRootUrl() + "content/repositories/"
+ targetUid.getRepository().getId() + targetUid.getPath();
}
代码示例来源:origin: org.sonatype.nexus.plugins/nexus-yum-repository-plugin
@AllowConcurrentEvents
@Subscribe
public void on(final RepositoryItemEventStore eventStore) {
if (isRpmItemEvent(eventStore)) {
final Yum yum = yumRegistryProvider.get().get(eventStore.getRepository().getId());
if (yum != null && yum instanceof YumHosted) {
((YumHosted) yum).markDirty(getItemVersion(eventStore.getItem()));
((YumHosted) yum).addRpmAndRegenerate(eventStore.getItem().getPath());
}
}
}
代码示例来源:origin: org.sonatype.nexus/nexus-api
/**
* Sets the UID.
*
* @param repositoryItemUid
*/
public void setRepositoryItemUid( RepositoryItemUid repositoryItemUid )
{
this.repositoryItemUid = repositoryItemUid;
this.store = repositoryItemUid.getRepository();
getRepositoryItemAttributes().setRepositoryId( repositoryItemUid.getRepository().getId() );
getRepositoryItemAttributes().setPath( repositoryItemUid.getPath() );
}
内容来源于网络,如有侵权,请联系作者删除!