protected synchronized void setEmptyNamespace() { if (namespace == null) { namespace = IDFactory.getDefault().getNamespaceByName( StringID.class.getName()); } }
/** * 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$ } }
protected BaseContainer(long idl) throws ContainerCreateException { try { this.id = IDFactory.getDefault().createLongID(idl); } catch (IDCreateException e) { throw new ContainerCreateException("Could not create ID for basecontainer", e); //$NON-NLS-1$ } }
public IContainer createInstance(ContainerTypeDescription description, Object[] parameters) throws ContainerCreateException { try { if (parameters != null && parameters.length > 0) { if (parameters[0] instanceof ID) return new BaseContainer((ID) parameters[0]); if (parameters[0] instanceof String) return new BaseContainer(IDFactory.getDefault().createStringID((String) parameters[0])); } } catch (IDCreateException e) { throw new ContainerCreateException("Could not create ID for basecontainer"); //$NON-NLS-1$ } return new BaseContainer(nextBaseContainerID++); }
/** * 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$ } }
protected synchronized void setEmptyNamespace() { if (namespace == null) { namespace = IDFactory.getDefault().getNamespaceByName( StringID.class.getName()); } }
public Namespace getRetrieveNamespace() { return IDFactory.getDefault().getNamespaceByName(FileTransferNamespace.PROTOCOL); }
public Namespace getRetrieveNamespace() { return IDFactory.getDefault().getNamespaceByName(FileTransferNamespace.PROTOCOL); }
public Namespace getBrowseNamespace() { return IDFactory.getDefault().getNamespaceByName(FileTransferNamespace.PROTOCOL); }
public Namespace getBrowseNamespace() { return IDFactory.getDefault().getNamespaceByName(FileTransferNamespace.PROTOCOL); }
public Namespace getOutgoingNamespace() { return IDFactory.getDefault().getNamespaceByName(FileTransferNamespace.PROTOCOL); }
public Namespace getOutgoingNamespace() { return IDFactory.getDefault().getNamespaceByName(FileTransferNamespace.PROTOCOL); }
public Namespace getBrowseNamespace() { return IDFactory.getDefault().getNamespaceByName(FileTransferNamespace.PROTOCOL); }
public IFileID getID() { try { return FileIDFactory.getDefault().createFileID(IDFactory.getDefault().getNamespaceByName(FileTransferNamespace.PROTOCOL), file.toURL()); } catch (Exception e) { // Should never happen return null; } }