@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++; } }
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 );
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 ); } }
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 ); }
YumProxy.PROCESSED, String.valueOf(System.currentTimeMillis()) ); repository.getAttributesHandler().storeAttributes(repoMDItem);
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 );
repository.getAttributesHandler().storeAttributes( item, mdis );
repository.getAttributesHandler().storeAttributes( file );