/** * Create an IFileID from a Namespace and a String. * * @param namespace * the namespace to use to create the IFileID. Can use * {@link IRetrieveFileTransferContainerAdapter#getRetrieveNamespace()}. * Must not be null. * @param remoteFile * the remote filename to use. Must not be <code>null</code>. * @return IFileID instance. Will not return <code>null</code>. * @throws FileCreateException * thrown if some problem creating IFileID from given namespace * and filename */ public IFileID createFileID(Namespace namespace, String remoteFile) throws FileCreateException { return createFileID(namespace, new Object[] {remoteFile}); }
/** * Create an IFileID from a Namespace and a String. * * @param namespace * the namespace to use to create the IFileID. Can use * {@link IRetrieveFileTransferContainerAdapter#getRetrieveNamespace()}. * Must not be <code>null</code>. * @param remoteFile * the remote filename to use. Must not be <code>null</code>. * @return IFileID instance. Will not return <code>null</code>. * @throws FileCreateException * thrown if some problem creating IFileID from given namespace * and filename */ public IFileID createFileID(Namespace namespace, URL remoteFile) throws FileCreateException { return createFileID(namespace, new Object[] {remoteFile}); }
/** * Create an IFileID from a Namespace and a String. * * @param namespace * the namespace to use to create the IFileID. Can use * {@link IRetrieveFileTransferContainerAdapter#getRetrieveNamespace()}. * Must not be null. * @param remoteFile * the remote filename to use. Must not be <code>null</code>. * @return IFileID instance. Will not return <code>null</code>. * @throws FileCreateException * thrown if some problem creating IFileID from given namespace * and filename */ public IFileID createFileID(Namespace namespace, String remoteFile) throws FileCreateException { return createFileID(namespace, new Object[] {remoteFile}); }
/** * Create an IFileID from a Namespace and a String. * * @param namespace * the namespace to use to create the IFileID. Can use * {@link IRetrieveFileTransferContainerAdapter#getRetrieveNamespace()}. * Must not be <code>null</code>. * @param remoteFile * the remote filename to use. Must not be <code>null</code>. * @return IFileID instance. Will not return <code>null</code>. * @throws FileCreateException * thrown if some problem creating IFileID from given namespace * and filename */ public IFileID createFileID(Namespace namespace, URL remoteFile) throws FileCreateException { return createFileID(namespace, new Object[] {remoteFile}); }
/** * Create an IFileID from a Namespace and a String. * * @param namespace * the namespace to use to create the IFileID. Can use * {@link IRetrieveFileTransferContainerAdapter#getRetrieveNamespace()}. * Must not be null. * @param remoteFile * the remote resource identifier to use. Must not be <code>null</code>. * @return IFileID instance. Will not return <code>null</code>. * @throws FileCreateException * thrown if some problem creating IFileID from given namespace * and filename * @since 5.0 */ public IFileID createFileID(Namespace namespace, URI remoteFile) throws FileCreateException { return createFileID(namespace, new Object[] {remoteFile}); }
/** * Create an IFileID from a Namespace and a String. * * @param namespace * the namespace to use to create the IFileID. Can use * {@link IRetrieveFileTransferContainerAdapter#getRetrieveNamespace()}. * Must not be null. * @param remoteFile * the remote resource identifier to use. Must not be <code>null</code>. * @return IFileID instance. Will not return <code>null</code>. * @throws FileCreateException * thrown if some problem creating IFileID from given namespace * and filename * @since 5.0 */ public IFileID createFileID(Namespace namespace, URI remoteFile) throws FileCreateException { return createFileID(namespace, new Object[] {remoteFile}); }
public IFileID getID() { try { return FileIDFactory.getDefault().createFileID(IDFactory.getDefault().getNamespaceByName(FileTransferNamespace.PROTOCOL), file.toURL()); } catch (Exception e) { // Should never happen return null; } }
IFileID fileID = FileIDFactory.getDefault().createFileID(adapter.getRetrieveNamespace(), uri.toString()); adapter.sendRetrieveRequest(fileID, range, this, options); } catch (IncomingFileTransferException e) {
IFileID fileID = FileIDFactory.getDefault().createFileID(adapter.getRetrieveNamespace(), uri.toString());
IFileID fileID = FileIDFactory.getDefault().createFileID(adapter.getRetrieveNamespace(), uri.toString());
protected void sendBrowseRequest(URI uri, IProgressMonitor monitor) throws CoreException, FileNotFoundException, AuthenticationFailedException, JREHttpClientRequiredException { IContainer container; try { container = ContainerFactory.getDefault().createContainer(); } catch (ContainerCreateException e) { throw RepositoryStatusHelper.fromMessage(Messages.ecf_configuration_error); } IRemoteFileSystemBrowserContainerAdapter adapter = container.getAdapter(IRemoteFileSystemBrowserContainerAdapter.class); if (adapter == null) { throw RepositoryStatusHelper.fromMessage(Messages.ecf_configuration_error); } adapter.setConnectContextForAuthentication(connectContext); this.exception = null; this.theMonitor = monitor; for (int retryCount = 0;; retryCount++) { if (monitor != null && monitor.isCanceled()) throw new OperationCanceledException(); try { IFileID fileID = FileIDFactory.getDefault().createFileID(adapter.getBrowseNamespace(), uri.toString()); browseRequest = adapter.sendBrowseRequest(fileID, this); } catch (RemoteFileSystemException e) { exception = e; } catch (FileCreateException e) { exception = e; } if (checkException(uri, retryCount)) break; } }
protected void sendBrowseRequest(URI uri, IProgressMonitor monitor) throws CoreException, FileNotFoundException, AuthenticationFailedException, JREHttpClientRequiredException { IContainer container; try { container = ContainerFactory.getDefault().createContainer(); } catch (ContainerCreateException e) { throw RepositoryStatusHelper.fromMessage(Messages.ecf_configuration_error); } IRemoteFileSystemBrowserContainerAdapter adapter = container.getAdapter(IRemoteFileSystemBrowserContainerAdapter.class); if (adapter == null) { throw RepositoryStatusHelper.fromMessage(Messages.ecf_configuration_error); } adapter.setConnectContextForAuthentication(connectContext); this.exception = null; this.theMonitor = monitor; for (int retryCount = 0;; retryCount++) { if (monitor != null && monitor.isCanceled()) throw new OperationCanceledException(); try { IFileID fileID = FileIDFactory.getDefault().createFileID(adapter.getBrowseNamespace(), uri.toString()); browseRequest = adapter.sendBrowseRequest(fileID, this); } catch (RemoteFileSystemException e) { exception = e; } catch (FileCreateException e) { exception = e; } if (checkException(uri, retryCount)) break; } }
protected void sendBrowseRequest(URI uri, IProgressMonitor monitor) throws CoreException, FileNotFoundException, AuthenticationFailedException, JREHttpClientRequiredException { IContainer container; try { container = ContainerFactory.getDefault().createContainer(); } catch (ContainerCreateException e) { throw RepositoryStatusHelper.fromMessage(Messages.ecf_configuration_error); } IRemoteFileSystemBrowserContainerAdapter adapter = container.getAdapter(IRemoteFileSystemBrowserContainerAdapter.class); if (adapter == null) { throw RepositoryStatusHelper.fromMessage(Messages.ecf_configuration_error); } adapter.setConnectContextForAuthentication(connectContext); this.exception = null; this.theMonitor = monitor; for (int retryCount = 0;; retryCount++) { if (monitor != null && monitor.isCanceled()) throw new OperationCanceledException(); try { IFileID fileID = FileIDFactory.getDefault().createFileID(adapter.getBrowseNamespace(), uri.toString()); browseRequest = adapter.sendBrowseRequest(fileID, this); } catch (RemoteFileSystemException e) { exception = e; } catch (FileCreateException e) { exception = e; } if (checkException(uri, retryCount)) break; } }