/** * 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 arguments * Object [] of arguments to use to create file ID. These * arguments will be passed to the * {@link Namespace#createInstance(Object[])} method of the * appropriate Namespace setup by the provider * @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, Object[] arguments) throws FileCreateException { Trace.entering(Activator.PLUGIN_ID, FileTransferDebugOptions.METHODS_ENTERING, this.getClass(), "createFileID", new Object[] {namespace, arguments}); //$NON-NLS-1$ try { IFileID result = (IFileID) IDFactory.getDefault().createID(namespace, arguments); Trace.exiting(Activator.PLUGIN_ID, FileTransferDebugOptions.METHODS_EXITING, this.getClass(), "createFileID", result); //$NON-NLS-1$ return result; } catch (Exception e) { Trace.throwing(Activator.PLUGIN_ID, FileTransferDebugOptions.EXCEPTIONS_THROWING, FileIDFactory.class, "createFileID", e); //$NON-NLS-1$ throw new FileCreateException("Exception in createFileID", e); //$NON-NLS-1$ } }
/** * 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 arguments * Object [] of arguments to use to create file ID. These * arguments will be passed to the * {@link Namespace#createInstance(Object[])} method of the * appropriate Namespace setup by the provider * @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, Object[] arguments) throws FileCreateException { Trace.entering(Activator.PLUGIN_ID, FileTransferDebugOptions.METHODS_ENTERING, this.getClass(), "createFileID", new Object[] {namespace, arguments}); //$NON-NLS-1$ try { IFileID result = (IFileID) IDFactory.getDefault().createID(namespace, arguments); Trace.exiting(Activator.PLUGIN_ID, FileTransferDebugOptions.METHODS_EXITING, this.getClass(), "createFileID", result); //$NON-NLS-1$ return result; } catch (Exception e) { Trace.throwing(Activator.PLUGIN_ID, FileTransferDebugOptions.EXCEPTIONS_THROWING, FileIDFactory.class, "createFileID", e); //$NON-NLS-1$ throw new FileCreateException("Exception in createFileID", e); //$NON-NLS-1$ } }