public class Activator extends java.lang.Object implements IFileTransferProtocolToFactoryMapper
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PLUGIN_EXCLUDED_SYS_PROP_NAME |
static java.lang.String |
PLUGIN_ID |
| Constructor and Description |
|---|
Activator()
The constructor
|
| Modifier and Type | Method and Description |
|---|---|
IAdapterManager |
getAdapterManager() |
IRemoteFileSystemBrowser |
getBrowseFileTransfer(java.lang.String protocol) |
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.
|
Bundle |
getBundle() |
static Activator |
getDefault()
Returns the shared instance
|
IExtensionRegistry |
getExtensionRegistry() |
IRetrieveFileTransfer |
getFileTransfer(java.lang.String protocol) |
protected LogService |
getLogService() |
java.lang.String[] |
getPlatformSupportedSchemes() |
IProxyService |
getProxyService() |
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.
|
ISendFileTransfer |
getSendFileTransfer(java.lang.String 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.
|
IURLConnectionModifier |
getURLConnectionModifier() |
void |
log(IStatus status) |
static void |
logNoProxyWarning(java.lang.Throwable e) |
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.
|
void |
start(BundleContext ctxt) |
void |
stop(BundleContext ctxt) |
public static final java.lang.String PLUGIN_EXCLUDED_SYS_PROP_NAME
public static final java.lang.String PLUGIN_ID
protected LogService getLogService()
public IProxyService getProxyService()
public static void logNoProxyWarning(java.lang.Throwable e)
public void log(IStatus status)
public Bundle getBundle()
public void start(BundleContext ctxt)
throws java.lang.Exception
java.lang.Exceptionpublic boolean reinitialize()
IFileTransferProtocolToFactoryMapperreinitialize in interface IFileTransferProtocolToFactoryMapperpublic void stop(BundleContext ctxt)
throws java.lang.Exception
java.lang.Exceptionpublic static Activator getDefault()
public java.lang.String[] getPlatformSupportedSchemes()
public IExtensionRegistry getExtensionRegistry()
public IRetrieveFileTransfer getFileTransfer(java.lang.String protocol)
public ISendFileTransfer getSendFileTransfer(java.lang.String protocol)
public IRemoteFileSystemBrowser getBrowseFileTransfer(java.lang.String protocol)
public IAdapterManager getAdapterManager()
public IURLConnectionModifier getURLConnectionModifier()
public boolean setRetrieveFileTransferFactory(java.lang.String protocol,
java.lang.String id,
IRetrieveFileTransferFactory factory,
int priority)
IFileTransferProtocolToFactoryMapperFor 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.
setRetrieveFileTransferFactory in interface IFileTransferProtocolToFactoryMapperprotocol - 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 protocolpriority - priority (highest = 0) to use for this factory relative to any existing factories.true if the given factory was set for this protocol, false if notpublic boolean setRetrieveFileTransferFactory(java.lang.String protocol,
java.lang.String id,
IRetrieveFileTransferFactory factory,
int priority,
boolean uri)
IFileTransferProtocolToFactoryMapperFor 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.
setRetrieveFileTransferFactory in interface IFileTransferProtocolToFactoryMapperprotocol - 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 protocolpriority - 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 IFileTransferProtocolToFactoryMapper.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.true if the given factory was set for this protocol, false if notpublic java.lang.String getRetrieveFileTransferFactoryId(java.lang.String protocol)
IFileTransferProtocolToFactoryMappernull.getRetrieveFileTransferFactoryId in interface IFileTransferProtocolToFactoryMapperprotocol - the protocol to get the id for (e.g. http/https)public int getRetrieveFileTransferPriority(java.lang.String protocol)
IFileTransferProtocolToFactoryMappergetRetrieveFileTransferPriority in interface IFileTransferProtocolToFactoryMapperprotocol - the protocol to get the priority for (e.g. http/https)public boolean removeRetrieveFileTransferFactory(java.lang.String id)
IFileTransferProtocolToFactoryMapperremoveRetrieveFileTransferFactory in interface IFileTransferProtocolToFactoryMapperid - the id of the factory to remove.true if a factory was removed. false otherwise.public boolean setBrowseFileTransferFactory(java.lang.String protocol,
java.lang.String id,
IRemoteFileSystemBrowserFactory factory,
int priority)
IFileTransferProtocolToFactoryMapperFor 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.
setBrowseFileTransferFactory in interface IFileTransferProtocolToFactoryMapperprotocol - 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 protocolpriority - priority (highest = 0) to use for this factory relative to any existing factories.true if the given factory was set for this protocol, false if notpublic boolean setBrowseFileTransferFactory(java.lang.String protocol,
java.lang.String id,
IRemoteFileSystemBrowserFactory factory,
int priority,
boolean uri)
IFileTransferProtocolToFactoryMapperFor 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.
setBrowseFileTransferFactory in interface IFileTransferProtocolToFactoryMapperprotocol - 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 protocolpriority - 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 IFileTransferProtocolToFactoryMapper.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.true if the given factory was set for this protocol, false if notpublic java.lang.String getBrowseFileTransferFactoryId(java.lang.String protocol)
IFileTransferProtocolToFactoryMappernull.getBrowseFileTransferFactoryId in interface IFileTransferProtocolToFactoryMapperprotocol - the protocol to get the id for (e.g. http/https)public int getBrowseFileTransferPriority(java.lang.String protocol)
IFileTransferProtocolToFactoryMappergetBrowseFileTransferPriority in interface IFileTransferProtocolToFactoryMapperprotocol - the protocol to get the priority for (e.g. http/https)public boolean removeBrowseFileTransferFactory(java.lang.String id)
IFileTransferProtocolToFactoryMapperremoveBrowseFileTransferFactory in interface IFileTransferProtocolToFactoryMapperid - the id of the factory to remove.true if a factory was removed. false otherwise.public boolean setSendFileTransferFactory(java.lang.String protocol,
java.lang.String id,
ISendFileTransferFactory factory,
int priority)
IFileTransferProtocolToFactoryMapperFor 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.
setSendFileTransferFactory in interface IFileTransferProtocolToFactoryMapperprotocol - 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 protocolpriority - priority (highest = 0) to use for this factory relative to any existing factories.true if the given factory was set for this protocol, false if notpublic boolean setSendFileTransferFactory(java.lang.String protocol,
java.lang.String id,
ISendFileTransferFactory factory,
int priority,
boolean uri)
IFileTransferProtocolToFactoryMapperFor 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.
setSendFileTransferFactory in interface IFileTransferProtocolToFactoryMapperprotocol - 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 protocolpriority - 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 IFileTransferProtocolToFactoryMapper.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.true if the given factory was set for this protocol, false if notpublic java.lang.String getSendFileTransferFactoryId(java.lang.String protocol)
IFileTransferProtocolToFactoryMappernull.getSendFileTransferFactoryId in interface IFileTransferProtocolToFactoryMapperprotocol - the protocol to get the id for (e.g. http/https)public int getSendFileTransferPriority(java.lang.String protocol)
IFileTransferProtocolToFactoryMappergetSendFileTransferPriority in interface IFileTransferProtocolToFactoryMapperprotocol - the protocol to get the priority for (e.g. http/https)public boolean removeSendFileTransferFactory(java.lang.String id)
IFileTransferProtocolToFactoryMapperremoveSendFileTransferFactory in interface IFileTransferProtocolToFactoryMapperid - the id of the factory to remove.true if a factory was removed. false otherwise.