本文整理了Java中org.sonatype.nexus.proxy.repository.Repository.createUid
方法的一些代码示例,展示了Repository.createUid
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.createUid
方法的具体详情如下:
包路径:org.sonatype.nexus.proxy.repository.Repository
类名称:Repository
方法名:createUid
[英]Creates an UID within this Repository.
[中]在此存储库中创建UID。
代码示例来源:origin: org.sonatype.nexus/nexus-it-helper-plugin
private LockThread(final String repositoryId, final String path, final String lockType)
throws NoSuchRepositoryException
{
this.lockType = lockType;
final Repository repository = repositoryRegistry.getRepository(repositoryId);
uid = repository.createUid(path);
latch = new CountDownLatch(1);
}
代码示例来源: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.plugins/nexus-p2-repository-plugin
final Repository repository = repositories.getRepository(repositoryId);
final File scanPath = localStorageOfRepositoryAsFile(repository);
final RepositoryItemUid p2RepoUid = repository.createUid(P2_REPOSITORY_ROOT_PATH);
final File destinationP2Repository = createTemporaryP2Repository();
try {
代码示例来源:origin: org.sonatype.nexus.plugins/nexus-p2-repository-plugin
try {
final Repository repository = repositories.getRepository(configuration.repositoryId());
final RepositoryItemUid p2RepoUid = repository.createUid(P2_REPOSITORY_ROOT_PATH);
File sourceP2Repository = null;
File destinationP2Repository = null;
代码示例来源:origin: org.sonatype.nexus.plugins/nexus-p2-repository-plugin
try {
final Repository repository = repositories.getRepository(configuration.repositoryId());
final RepositoryItemUid p2RepoUid = repository.createUid(P2_REPOSITORY_ROOT_PATH);
File sourceP2Repository = null;
File destinationP2Repository = null;
代码示例来源:origin: org.sonatype.nexus.plugins/nexus-p2-repository-plugin
@Override
public void removeConfiguration(final P2RepositoryAggregatorConfiguration configuration) {
try {
final Repository repository = repositories.getRepository(configuration.repositoryId());
final RepositoryItemUid p2RepoUid = repository.createUid(P2_REPOSITORY_ROOT_PATH);
try {
p2RepoUid.getLock().lock(Action.create);
final ResourceStoreRequest request = new ResourceStoreRequest(P2_REPOSITORY_ROOT_PATH);
repository.deleteItem(request);
}
finally {
p2RepoUid.getLock().unlock();
}
}
catch (final Exception e) {
logger.warn(String.format("Could not delete P2 repository [%s:%s] due to [%s]",
configuration.repositoryId(), P2_REPOSITORY_ROOT_PATH, e.getMessage()), e);
}
}
代码示例来源:origin: org.sonatype.nexus.plugins/nexus-p2-repository-plugin
try {
final Repository repository = repositories.getRepository(configuration.repositoryId());
final RepositoryItemUid p2RepoUid = repository.createUid(P2_REPOSITORY_ROOT_PATH);
File destinationP2Repository = null;
try {
代码示例来源:origin: org.sonatype.nexus.plugins/nexus-p2-repository-plugin
try {
final Repository repository = repositories.getRepository(configuration.repositoryId());
final RepositoryItemUid p2RepoUid = repository.createUid(P2_REPOSITORY_ROOT_PATH);
File destinationP2Repository = null;
try {
代码示例来源:origin: org.sonatype.nexus.plugins/nexus-p2-repository-plugin
@Override
public void addConfiguration(final P2RepositoryAggregatorConfiguration configuration) {
try {
final Repository repository = repositories.getRepository(configuration.repositoryId());
final StorageItem p2Dir = safeRetrieveItem(repository, P2_REPOSITORY_ROOT_PATH);
// create if it does not exist
if (p2Dir == null) {
final RepositoryItemUid p2RepoUid = repository.createUid(P2_REPOSITORY_ROOT_PATH);
try {
p2RepoUid.getLock().lock(Action.create);
createP2Repository(repository);
}
finally {
p2RepoUid.getLock().unlock();
}
}
}
catch (final NoSuchRepositoryException e) {
logger.warn("Could not delete P2 repository [{}] as repository could not be found");
}
catch (final Exception e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: org.sonatype.nexus/nexus-proxy
@Override
@Deprecated
public void touchItemLastRequested( long timestamp, Repository repository, ResourceStoreRequest request )
throws ItemNotFoundException, LocalStorageException, IOException
{
RepositoryItemUid uid = repository.createUid( request.getRequestPath() );
Attributes item = getAttributeStorage().getAttributes( uid );
if ( item != null )
{
item.setRepositoryId( uid.getRepository().getId() );
item.setPath( uid.getPath() );
touchItemLastRequested( timestamp, request, uid, item );
}
}
代码示例来源:origin: org.sonatype.nexus/nexus-proxy
RepositoryItemUid uid = repository.createUid( path );
代码示例来源:origin: org.sonatype.nexus/nexus-proxy
public void shredItem( Repository repository, ResourceStoreRequest request )
throws ItemNotFoundException, UnsupportedStorageOperationException, LocalStorageException
{
RepositoryItemUid uid = repository.createUid( request.getRequestPath() );
try
{
repository.getAttributesHandler().deleteAttributes( uid );
}
catch ( IOException e )
{
throw new LocalStorageException( "Cannot delete attributes!", e );
}
File target = getFileFromBase( repository, request );
getFSPeer().shredItem( repository, getBaseDir( repository, request ), request, target );
}
代码示例来源:origin: org.sonatype.nexus/nexus-proxy
@Override
@Deprecated
public void touchItemRemoteChecked( long timestamp, Repository repository, ResourceStoreRequest request )
throws ItemNotFoundException, LocalStorageException, IOException
{
RepositoryItemUid uid = repository.createUid( request.getRequestPath() );
Attributes item = getAttributeStorage().getAttributes( uid );
if ( item != null )
{
item.setRepositoryId( uid.getRepository().getId() );
item.setPath( uid.getPath() );
item.setCheckedRemotely( timestamp );
item.setExpired( false );
getAttributeStorage().putAttributes( uid, item );
}
}
代码示例来源:origin: org.sonatype.nexus.plugins/nexus-yum-repository-plugin
final RepositoryItemUid mdUid = repository.createUid("/" + PATH_OF_REPOMD_XML);
try {
mdUid.getLock().lock(Action.update);
代码示例来源:origin: org.sonatype.nexus.plugins/nexus-restlet1x-plugin
itemUid = itemRepository.createUid(route.getRepositoryPath());
itemUid = ((Repository) store).createUid(request.getRequestPath());
代码示例来源:origin: org.sonatype.nexus/nexus-rest-api
itemUid = itemRepository.createUid( route.getRepositoryPath() );
itemUid = ( (Repository) store ).createUid( request.getRequestPath() );
代码示例来源:origin: org.sonatype.nexus/nexus-proxy
public void moveItem( Repository repository, ResourceStoreRequest from, ResourceStoreRequest to )
throws ItemNotFoundException, UnsupportedStorageOperationException, LocalStorageException
RepositoryItemUid fromUid = repository.createUid( from.getRequestPath() );
RepositoryItemUid toUid = repository.createUid( to.getRequestPath() );
fromAttr.setRepositoryId( toUid.getRepository().getId() );
fromAttr.setPath( toUid.getPath() );
内容来源于网络,如有侵权,请联系作者删除!