org.eclipse.ecf.provider.filetransfer
Interface IFileTransferProtocolToFactoryMapper


public interface IFileTransferProtocolToFactoryMapper

Since:
3.0.1

Method Summary
 java.lang.String getBrowseFileTransferFactoryId(java.lang.String protocol)
          Get the factory id of the active factory for the given protocol.
 int getBrowseFileTransferPriority(java.lang.String protocol)
          Get the priority of the active factory for the given protocol.
 java.lang.String getRetrieveFileTransferFactoryId(java.lang.String protocol)
          Get the factory id of the active factory for the given protocol.
 int getRetrieveFileTransferPriority(java.lang.String protocol)
          Get the priority of the active factory for the given protocol.
 java.lang.String getSendFileTransferFactoryId(java.lang.String protocol)
          Get the factory id of the active factory for the given protocol.
 int getSendFileTransferPriority(java.lang.String protocol)
          Get the priority of the active factory for the given protocol.
 boolean reinitialize()
          Reinitialized protocol to factory mapping defined via extension registry/extension points.
 boolean removeBrowseFileTransferFactory(java.lang.String id)
          Remove the factory with the given id.
 boolean removeRetrieveFileTransferFactory(java.lang.String id)
          Remove the factory with the given id.
 boolean removeSendFileTransferFactory(java.lang.String id)
          Remove the factory with the given id.
 boolean setBrowseFileTransferFactory(java.lang.String protocol, java.lang.String id, IRemoteFileSystemBrowserFactory factory, int priority)
           For the given protocol, set the given factory to be used for retrieve file transfer.
 boolean setBrowseFileTransferFactory(java.lang.String protocol, java.lang.String id, IRemoteFileSystemBrowserFactory factory, int priority, boolean uri)
           For the given protocol, set the given factory to be used for retrieve file transfer.
 boolean setRetrieveFileTransferFactory(java.lang.String protocol, java.lang.String id, IRetrieveFileTransferFactory factory, int priority)
           For the given protocol, set the given factory to be used for retrieve file transfer.
 boolean setRetrieveFileTransferFactory(java.lang.String protocol, java.lang.String id, IRetrieveFileTransferFactory factory, int priority, boolean uri)
           For the given protocol, set the given factory to be used for retrieve file transfer.
 boolean setSendFileTransferFactory(java.lang.String protocol, java.lang.String id, ISendFileTransferFactory factory, int priority)
           For the given protocol, set the given factory to be used for retrieve file transfer.
 boolean setSendFileTransferFactory(java.lang.String protocol, java.lang.String id, ISendFileTransferFactory factory, int priority, boolean uri)
           For the given protocol, set the given factory to be used for retrieve file transfer.
 

Method Detail

setRetrieveFileTransferFactory

boolean setRetrieveFileTransferFactory(java.lang.String protocol,
                                       java.lang.String id,
                                       IRetrieveFileTransferFactory factory,
                                       int priority)

For the given protocol, set the given factory to be used for retrieve file transfer. If successful, subsequent retrieve requests for the given protocol will use the given factory.

For this method to be successful the protocol has to be non-null, the id has to be non-null and unique (should probably be set to the bundle symbolic name of the bundle calling this method), the factory must be non-null, and the priority must be higher (a *smaller number*) than any existing factory for the given protocol. The default priority is 100, and the highest priority is 0.

Parameters:
protocol - the protocol (e.g. http/https) to map the factory to.
id - a unique id for the factory (should be bundle symbolic name of bundle calling method)
factory - the factory to associate with the given protocol
priority - priority (highest = 0) to use for this factory relative to any existing factories.
Returns:
true if the given factory was set for this protocol, false if not

setRetrieveFileTransferFactory

boolean setRetrieveFileTransferFactory(java.lang.String protocol,
                                       java.lang.String id,
                                       IRetrieveFileTransferFactory factory,
                                       int priority,
                                       boolean uri)

For the given protocol, set the given factory to be used for retrieve file transfer. If successful, subsequent retrieve requests for the given protocol will use the given factory.

For this method to be successful the protocol has to be non-null, the id has to be non-null and unique (should probably be set to the bundle symbolic name of the bundle calling this method), the factory must be non-null, and the priority must be higher (a *smaller number*) than any existing factory for the given protocol. The default priority is 100, and the highest priority is 0.

Parameters:
protocol - the protocol (e.g. http/https) to map the factory to.
id - a unique id for the factory (should be bundle symbolic name of bundle calling method)
factory - the factory to associate with the given protocol
priority - priority (highest = 0) to use for this factory relative to any existing factories.
uri - if true the factory is added as a URI rather than a URL, meaning that no URLStreamHandler is registered for the given protocol. This is in contrast to the setRetrieveFileTransferFactory(String, String, IRetrieveFileTransferFactory, int), which automatically registers an URLStreamHandler for the given protocol. If false, URLs will be used and an URLStreamHandler will be registered for the given protocol factory. NOTE: If this flag is true, providers that attempt to access IFileID.getURL() may be unable to do so, since the URI may not be successfully parsed as a URL.
Returns:
true if the given factory was set for this protocol, false if not

getRetrieveFileTransferFactoryId

java.lang.String getRetrieveFileTransferFactoryId(java.lang.String protocol)
Get the factory id of the active factory for the given protocol. If the given protocol does not have an active factory, returns null.

Parameters:
protocol - the protocol to get the id for (e.g. http/https)
Returns:
id of the factory associated with the given protocol

getRetrieveFileTransferPriority

int getRetrieveFileTransferPriority(java.lang.String protocol)
Get the priority of the active factory for the given protocol. If the given protocol does not have an active factory, returns -1.

Parameters:
protocol - the protocol to get the priority for (e.g. http/https)
Returns:
int priority for the given protocol

removeRetrieveFileTransferFactory

boolean removeRetrieveFileTransferFactory(java.lang.String id)
Remove the factory with the given id.

Parameters:
id - the id of the factory to remove.
Returns:
true if a factory was removed. false otherwise.

setBrowseFileTransferFactory

boolean setBrowseFileTransferFactory(java.lang.String protocol,
                                     java.lang.String id,
                                     IRemoteFileSystemBrowserFactory factory,
                                     int priority)

For the given protocol, set the given factory to be used for retrieve file transfer. If successful, subsequent retrieve requests for the given protocol will use the given factory.

For this method to be successful the protocol has to be non-null, the id has to be non-null and unique (should probably be set to the bundle symbolic name of the bundle calling this method), the factory must be non-null, and the priority must be higher (a *smaller number*) than any existing factory for the given protocol. The default priority is 100, and the highest priority is 0.

Parameters:
protocol - the protocol (e.g. http/https) to map the factory to.
id - a unique id for the factory (should be bundle symbolic name of bundle calling method)
factory - the factory to associate with the given protocol
priority - priority (highest = 0) to use for this factory relative to any existing factories.
Returns:
true if the given factory was set for this protocol, false if not

setBrowseFileTransferFactory

boolean setBrowseFileTransferFactory(java.lang.String protocol,
                                     java.lang.String id,
                                     IRemoteFileSystemBrowserFactory factory,
                                     int priority,
                                     boolean uri)

For the given protocol, set the given factory to be used for retrieve file transfer. If successful, subsequent retrieve requests for the given protocol will use the given factory.

For this method to be successful the protocol has to be non-null, the id has to be non-null and unique (should probably be set to the bundle symbolic name of the bundle calling this method), the factory must be non-null, and the priority must be higher (a *smaller number*) than any existing factory for the given protocol. The default priority is 100, and the highest priority is 0.

Parameters:
protocol - the protocol (e.g. http/https) to map the factory to.
id - a unique id for the factory (should be bundle symbolic name of bundle calling method)
factory - the factory to associate with the given protocol
priority - priority (highest = 0) to use for this factory relative to any existing factories.
uri - if true the factory is added as a URI rather than a URL, meaning that no URLStreamHandler is registered for the given protocol. This is in contrast to the setRetrieveFileTransferFactory(String, String, IRetrieveFileTransferFactory, int), which automatically registers an URLStreamHandler for the given protocol. If false, URLs will be used and an URLStreamHandler will be registered for the given protocol factory. NOTE: If this flag is true, providers that attempt to access IFileID.getURL() may be unable to do so, since the URI may not be successfully parsed as a URL.
Returns:
true if the given factory was set for this protocol, false if not

getBrowseFileTransferFactoryId

java.lang.String getBrowseFileTransferFactoryId(java.lang.String protocol)
Get the factory id of the active factory for the given protocol. If the given protocol does not have an active factory, returns null.

Parameters:
protocol - the protocol to get the id for (e.g. http/https)
Returns:
id of the factory associated with the given protocol

getBrowseFileTransferPriority

int getBrowseFileTransferPriority(java.lang.String protocol)
Get the priority of the active factory for the given protocol. If the given protocol does not have an active factory, returns -1.

Parameters:
protocol - the protocol to get the priority for (e.g. http/https)
Returns:
int priority for the given protocol

removeBrowseFileTransferFactory

boolean removeBrowseFileTransferFactory(java.lang.String id)
Remove the factory with the given id.

Parameters:
id - the id of the factory to remove.
Returns:
true if a factory was removed. false otherwise.

setSendFileTransferFactory

boolean setSendFileTransferFactory(java.lang.String protocol,
                                   java.lang.String id,
                                   ISendFileTransferFactory factory,
                                   int priority)

For the given protocol, set the given factory to be used for retrieve file transfer. If successful, subsequent retrieve requests for the given protocol will use the given factory.

For this method to be successful the protocol has to be non-null, the id has to be non-null and unique (should probably be set to the bundle symbolic name of the bundle calling this method), the factory must be non-null, and the priority must be higher (a *smaller number*) than any existing factory for the given protocol. The default priority is 100, and the highest priority is 0.

Parameters:
protocol - the protocol (e.g. http/https) to map the factory to.
id - a unique id for the factory (should be bundle symbolic name of bundle calling method)
factory - the factory to associate with the given protocol
priority - priority (highest = 0) to use for this factory relative to any existing factories.
Returns:
true if the given factory was set for this protocol, false if not

setSendFileTransferFactory

boolean setSendFileTransferFactory(java.lang.String protocol,
                                   java.lang.String id,
                                   ISendFileTransferFactory factory,
                                   int priority,
                                   boolean uri)

For the given protocol, set the given factory to be used for retrieve file transfer. If successful, subsequent retrieve requests for the given protocol will use the given factory.

For this method to be successful the protocol has to be non-null, the id has to be non-null and unique (should probably be set to the bundle symbolic name of the bundle calling this method), the factory must be non-null, and the priority must be higher (a *smaller number*) than any existing factory for the given protocol. The default priority is 100, and the highest priority is 0.

Parameters:
protocol - the protocol (e.g. http/https) to map the factory to.
id - a unique id for the factory (should be bundle symbolic name of bundle calling method)
factory - the factory to associate with the given protocol
priority - priority (highest = 0) to use for this factory relative to any existing factories.
uri - if true the factory is added as a URI rather than a URL, meaning that no URLStreamHandler is registered for the given protocol. This is in contrast to the setRetrieveFileTransferFactory(String, String, IRetrieveFileTransferFactory, int), which automatically registers an URLStreamHandler for the given protocol. If false, URLs will be used and an URLStreamHandler will be registered for the given protocol factory. NOTE: If this flag is true, providers that attempt to access IFileID.getURL() may be unable to do so, since the URI may not be successfully parsed as a URL.
Returns:
true if the given factory was set for this protocol, false if not

getSendFileTransferFactoryId

java.lang.String getSendFileTransferFactoryId(java.lang.String protocol)
Get the factory id of the active factory for the given protocol. If the given protocol does not have an active factory, returns null.

Parameters:
protocol - the protocol to get the id for (e.g. http/https)
Returns:
id of the factory associated with the given protocol

getSendFileTransferPriority

int getSendFileTransferPriority(java.lang.String protocol)
Get the priority of the active factory for the given protocol. If the given protocol does not have an active factory, returns -1.

Parameters:
protocol - the protocol to get the priority for (e.g. http/https)
Returns:
int priority for the given protocol

removeSendFileTransferFactory

boolean removeSendFileTransferFactory(java.lang.String id)
Remove the factory with the given id.

Parameters:
id - the id of the factory to remove.
Returns:
true if a factory was removed. false otherwise.

reinitialize

boolean reinitialize()
Reinitialized protocol to factory mapping defined via extension registry/extension points.

Returns:
true if reinitialization succeeds, false if not