org.eclipse.ecf.filetransfer.identity

## Class FileIDFactory

- java.lang.Object
- - org.eclipse.ecf.filetransfer.identity.FileIDFactory

All Implemented Interfaces:
  IFileIDFactory

    public class FileIDFactory
    extends Object
    implements IFileIDFactory

Factory class entry point for creating IFileID instances.

### Field Summary

Fields
`protected static FileIDFactory` `instance`

### Constructor Summary

Constructors
Constructor and Description
`FileIDFactory()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`IFileID` `createFileID(Namespace namespace, Object[] arguments)` Create an IFileID from a Namespace and a String.
`IFileID` `createFileID(Namespace namespace, String remoteFile)` Create an IFileID from a Namespace and a String.
`IFileID` `createFileID(Namespace namespace, URI remoteFile)` Create an IFileID from a Namespace and a String.
`IFileID` `createFileID(Namespace namespace, URL remoteFile)` Create an IFileID from a Namespace and a String.
`static FileIDFactory` `getDefault()` Get singleton instance

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### instance

    protected static FileIDFactory instance

### Constructor Detail

#### FileIDFactory

    public FileIDFactory()

### Method Detail

#### getDefault

    public static FileIDFactory getDefault()

Get singleton instance

Returns:
  FileIDFactory singleton instance. Will not be `null`.
Since:
  5.0

#### createFileID

    public IFileID createFileID(Namespace namespace,
                                URL remoteFile)
                         throws FileCreateException

Create an IFileID from a Namespace and a String.

Specified by:
  `createFileID` in interface `IFileIDFactory`
Parameters:
  `namespace` - the namespace to use to create the IFileID. Can use `IRetrieveFileTransferContainerAdapter.getRetrieveNamespace()`. Must not be `null`.
  `remoteFile` - the remote filename to use. Must not be `null`.
Returns:
  IFileID instance. Will not return `null`.
Throws:
  `FileCreateException` - thrown if some problem creating IFileID from given namespace and filename

#### createFileID

    public IFileID createFileID(Namespace namespace,
                                String remoteFile)
                         throws FileCreateException

Create an IFileID from a Namespace and a String.

Specified by:
  `createFileID` in interface `IFileIDFactory`
Parameters:
  `namespace` - the namespace to use to create the IFileID. Can use `IRetrieveFileTransferContainerAdapter.getRetrieveNamespace()`. Must not be null.
  `remoteFile` - the remote filename to use. Must not be `null`.
Returns:
  IFileID instance. Will not return `null`.
Throws:
  `FileCreateException` - thrown if some problem creating IFileID from given namespace and filename

#### createFileID

    public IFileID createFileID(Namespace namespace,
                                URI remoteFile)
                         throws FileCreateException

Create an IFileID from a Namespace and a String.

Specified by:
  `createFileID` in interface `IFileIDFactory`
Parameters:
  `namespace` - the namespace to use to create the IFileID. Can use `IRetrieveFileTransferContainerAdapter.getRetrieveNamespace()`. Must not be null.
  `remoteFile` - the remote resource identifier to use. Must not be `null`.
Returns:
  IFileID instance. Will not return `null`.
Throws:
  `FileCreateException` - thrown if some problem creating IFileID from given namespace and filename
Since:
  5.0

#### createFileID

    public IFileID createFileID(Namespace namespace,
                                Object[] arguments)
                         throws FileCreateException

Create an IFileID from a Namespace and a String.

Specified by:
  `createFileID` in interface `IFileIDFactory`
Parameters:
  `namespace` - the namespace to use to create the IFileID. Can use `IRetrieveFileTransferContainerAdapter.getRetrieveNamespace()`. Must not be `null`.
  `arguments` - Object [] of arguments to use to create file ID. These arguments will be passed to the `Namespace.createInstance(Object[])` method of the appropriate Namespace setup by the provider
Returns:
  IFileID instance. Will not return `null`.
Throws:
  `FileCreateException` - thrown if some problem creating IFileID from given namespace and filename