/** * Instantiates a new default storage link item. * * @param repository the repository * @param path the path * @param canRead the can read * @param canWrite the can write * @param targetUid the target uid */ public DefaultStorageLinkItem( Repository repository, ResourceStoreRequest request, boolean canRead, boolean canWrite, RepositoryItemUid targetUid ) { super( repository, request, canRead, canWrite ); setTarget( targetUid ); }
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;
static void createLink(final Repository repository, final StorageItem item, final String path) throws Exception { final ResourceStoreRequest req = new ResourceStoreRequest(path); req.getRequestContext().setParentContext(item.getItemContext()); final DefaultStorageLinkItem link = new DefaultStorageLinkItem(repository, req, true, true, item.getRepositoryItemUid()); repository.storeItem(false, link); }
@Override protected StorageLinkItem createLink( final StorageItem item ) throws UnsupportedStorageOperationException, IllegalOperationException, StorageException { String shadowPath = null; shadowPath = transformMaster2Shadow( item.getPath() ); if ( shadowPath != null ) { ResourceStoreRequest req = new ResourceStoreRequest( shadowPath ); req.getRequestContext().putAll( item.getItemContext() ); DefaultStorageLinkItem link = new DefaultStorageLinkItem( this, req, true, true, item.getRepositoryItemUid() ); storeItem( false, link ); return link; } else { return null; } }
/** * Instantiates a new default storage link item. * * @param router the router * @param path the path * @param canRead the can read * @param canWrite the can write * @param targetUid the target uid */ public DefaultStorageLinkItem( RepositoryRouter router, ResourceStoreRequest request, boolean canRead, boolean canWrite, RepositoryItemUid targetUid ) { super( router, request, canRead, canWrite ); setTarget( targetUid ); }