@Test public void testGetURIWithEdit() throws Exception { SimpleManagedBlob blob = createBlob(); URI uri = blobProvider.getURI(blob, UsageHint.EDIT, null); assertNotNull(uri); assertEquals( "https: uri.toString()); }
@Override public URI getURI(ManagedBlob blob, UsageHint usage, HttpServletRequest servletRequest) throws IOException { LiveConnectFileInfo fileInfo = toFileInfo(blob); String url = null; switch (usage) { case STREAM: case DOWNLOAD: url = prepareOneDriveFile(fileInfo).getMetadata().getDownloadUrl(); break; case VIEW: case EDIT: url = prepareOneDriveFile(fileInfo).createSharedLink(Type.EDIT).getLink().getWebUrl(); break; } return url == null ? null : asURI(url); }
OneDriveBlobProvider extends AbstractLiveConnectBlobProvider<OneDriveOAuth2ServiceProvider> { @Override public URI getURI(ManagedBlob blob, UsageHint usage, HttpServletRequest servletRequest) throws IOException { LiveConnectFileInfo fileInfo = toFileInfo(blob); String url = null; switch (usage) { case STREAM: case DOWNLOAD: url = prepareOneDriveFile(fileInfo).getMetadata().getDownloadUrl(); break; case VIEW: case EDIT: url = prepareOneDriveFile(fileInfo).createSharedLink(Type.EDIT).getLink().getWebUrl(); break; } return url == null ? null : asURI(url); } }
OneDriveBlobProvider extends AbstractLiveConnectBlobProvider<OneDriveOAuth2ServiceProvider> { @Override public URI getURI(ManagedBlob blob, UsageHint usage, HttpServletRequest servletRequest) throws IOException { LiveConnectFileInfo fileInfo = toFileInfo(blob); String url = null; switch (usage) { case STREAM: case DOWNLOAD: url = prepareOneDriveFile(fileInfo).getMetadata().getDownloadUrl(); break; case VIEW: case EDIT: url = prepareOneDriveFile(fileInfo).createSharedLink(Type.EDIT).getLink().getWebUrl(); break; } return url == null ? null : asURI(url); }  }
OneDriveBlobProvider extends AbstractLiveConnectBlobProvider<OneDriveOAuth2ServiceProvider> { @Override public URI getURI(ManagedBlob blob, UsageHint usage, HttpServletRequest servletRequest) throws IOException { LiveConnectFileInfo fileInfo = toFileInfo(blob); String url = null; switch (usage) { case STREAM: case DOWNLOAD: url = prepareOneDriveFile(fileInfo).getMetadata().getDownloadUrl(); break; case VIEW: case EDIT: url = prepareOneDriveFile(fileInfo).createSharedLink(Type.EDIT).getLink().getWebUrl(); break; } return url == null ? null : asURI(url); }  @Override URI getURI(ManagedBlob blob, UsageHint usage, HttpServletRequest servletRequest); @Override InputStream getStream(ManagedBlob blob); @Override InputStream getThumbnail(ManagedBlob blob); @Override List<AppLink> getAppLinks(String username, ManagedBlob blob); }
OneDriveBlobProvider extends AbstractLiveConnectBlobProvider<OneDriveOAuth2ServiceProvider> { @Override public URI getURI(ManagedBlob blob, UsageHint usage, HttpServletRequest servletRequest) throws IOException { LiveConnectFileInfo fileInfo = toFileInfo(blob); String url = null; switch (usage) { case STREAM: case DOWNLOAD: url = prepareOneDriveFile(fileInfo).getMetadata().getDownloadUrl(); break; case VIEW: case EDIT: url = prepareOneDriveFile(fileInfo).createSharedLink(Type.EDIT).getLink().getWebUrl(); break; } return url == null ? null : asURI(url); }  @Override URI getURI(ManagedBlob blob, UsageHint usage, HttpServletRequest servletRequest); @Override InputStream getStream(ManagedBlob blob); @Override InputStream getThumbnail(ManagedBlob blob); @Override List<AppLink> getAppLinks(String username, ManagedBlob blob);  }