本文整理了Java中org.sonatype.nexus.proxy.repository.Repository.getAttributesHandler
方法的一些代码示例,展示了Repository.getAttributesHandler
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.getAttributesHandler
方法的具体详情如下:
包路径:org.sonatype.nexus.proxy.repository.Repository
类名称:Repository
方法名:getAttributesHandler
[英]Returns the attribute handler used by repository.
[中]返回存储库使用的属性处理程序。
代码示例来源:origin: org.sonatype.nexus/nexus-proxy
@Override
protected void processFileItem( WalkerContext context, StorageFileItem item )
throws Exception
{
if ( !item.isExpired() )
{
// expiring found files
item.setExpired( true );
// store it
getRepository().getAttributesHandler().storeAttributes( item );
alteredItemCount++;
}
}
代码示例来源:origin: org.sonatype.nexus/nexus-proxy
new DefaultStorageLinkItem( repository, request, target.canRead(), target.canWrite(),
getLinkPersister().readLinkContent( linkContent ) );
repository.getAttributesHandler().fetchAttributes( link );
link.setModified( target.lastModified() );
link.setCreated( target.lastModified() );
result = link;
repository.getAttributesHandler().touchItemLastRequested( System.currentTimeMillis(), link );
new FileContentLocator( target, getMimeSupport().guessMimeTypeFromPath(
repository.getMimeRulesSource(), target.getAbsolutePath() ) ) );
repository.getAttributesHandler().fetchAttributes( file );
file.setModified( target.lastModified() );
file.setCreated( target.lastModified() );
result = file;
repository.getAttributesHandler().touchItemLastRequested( System.currentTimeMillis(), file );
代码示例来源:origin: org.sonatype.nexus/nexus-proxy
protected void doProcessFileItem( final WalkerContext ctx, final StorageItem item )
throws IOException
{
if ( legacyAtributesOnly )
{
if ( !item.getRepositoryItemAttributes().containsKey( TransitioningAttributeStorage.FALLBACK_MARKER_KEY ) )
{
// if legacyAtributesOnly and current item attributes does not carry the marker, throw it away
return;
}
}
if ( getInitialData() != null )
{
item.getRepositoryItemAttributes().putAll( initialData );
}
if ( forceAttributeRecreation && item instanceof StorageFileItem )
{
getRepository().getAttributesHandler().storeAttributes( item,
( (StorageFileItem) item ).getContentLocator() );
}
else
{
getRepository().getAttributesHandler().storeAttributes( item, null );
}
}
代码示例来源: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.plugins/nexus-yum-repository-plugin
YumProxy.PROCESSED, String.valueOf(System.currentTimeMillis())
);
repository.getAttributesHandler().storeAttributes(repoMDItem);
代码示例来源:origin: org.sonatype.nexus/nexus-proxy
Attributes fromAttr = repository.getAttributesHandler().getAttributeStorage().getAttributes( fromUid );
fromAttr.setRepositoryId( toUid.getRepository().getId() );
fromAttr.setPath( toUid.getPath() );
repository.getAttributesHandler().getAttributeStorage().putAttributes( toUid, fromAttr );
repository.getAttributesHandler().getAttributeStorage().deleteAttributes( fromUid );
代码示例来源:origin: org.sonatype.nexus/nexus-proxy
repository.getAttributesHandler().storeAttributes( item, mdis );
代码示例来源:origin: org.sonatype.nexus/nexus-app
repository.getAttributesHandler().storeAttributes( file );
内容来源于网络,如有侵权,请联系作者删除!