Package chemaxon.marvin.services
Class ServiceDescriptorTools
java.lang.Object
chemaxon.marvin.services.ServiceDescriptorTools
Helper class for accessing
ServiceDescriptorReader
,
ServiceDescriptorWriter
and ServiceDialogProvider
implementations and various configuration data for services.- Since:
- 5.6
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Path to default services configuration xmlstatic final String
the Marvin Default service descriptor editor provider classstatic final String
the Marvin Default service descriptor reader classstatic final String
the Marvin Default service descriptor writer classstatic final String
the Marvin Default service dialog provider classstatic final String
name of default user service configuration filestatic final String
Java System Property key to globally override default configuration path.static final String
Java System Property key to globally override default Service Dialog Provider class with custom implementation. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the defaultServiceDescriptorEditorProvider
instancestatic ServiceDescriptorReader
Returns the defaultServiceDescriptorReader
instancestatic ServiceDescriptorWriter
Returns the defaultServiceDescriptorWriter
instancestatic ServiceDialogProvider
Returns the defaultServiceDialogProvider
instancestatic InputStream
Returns anInputStream
with service configuration.static InputStream
getServiceDescriptorConfigurationAsStream
(chemaxon.marvin.services.ServicesConfigURLProvider settings) Returns anInputStream
with service configuration.static InputStream
getServiceDescriptorConfigurationAsStream
(String configPath) Returns the service descriptor configuration stream from path, ornull
.getServiceDescriptorEditorProvider
(String serviceDescriptorEditorProviderClassName) Returns theServiceDescriptorEditorProvider
instance if available, ornull
static ServiceDescriptorReader
getServiceDescriptorReader
(String descriptorReaderClassName) Returns theServiceDescriptorReader
instance if available, ornull
static ServiceDescriptorWriter
getServiceDescriptorWriter
(String descriptorWriterClassName) Returns theServiceDescriptorWriter
instance if available, ornull
static ServiceDialogProvider
getServiceDialogProvider
(String serviceDialogProviderClassName) Returns theServiceDialogProvider
instance if available, ornull
-
Field Details
-
SERVICE_CONFIGURATION_PATH_PROPERTY_KEY
Java System Property key to globally override default configuration path. Accepts absolute file path or URL in String format.- Since:
- 5.12
- See Also:
-
SERVICE_DIALOG_PROVIDER_CLASS_NAME_PROPERTY_KEY
Java System Property key to globally override default Service Dialog Provider class with custom implementation.- Since:
- 6.0
- See Also:
-
DEFAULT_SERVICE_DESCRIPTOR_READER_CLASSNAME
the Marvin Default service descriptor reader class- See Also:
-
DEFAULT_SERVICE_DESCRIPTOR_WRITER_CLASSNAME
the Marvin Default service descriptor writer class- See Also:
-
DEFAULT_SERVICE_DIALOG_PROVIDER_CLASSNAME
the Marvin Default service dialog provider class- See Also:
-
DEFAULT_SERVICE_DESCRIPTOR_EDITOR_PROVIDER_CLASSNAME
the Marvin Default service descriptor editor provider class- See Also:
-
DEFAULT_SERVICE_CONFIGURATION_PATH
Path to default services configuration xml- See Also:
-
DEFAULT_USER_SERVICE_CONFIGURATION_FILENAME
name of default user service configuration file- See Also:
-
-
Constructor Details
-
ServiceDescriptorTools
public ServiceDescriptorTools()
-
-
Method Details
-
getDefaultServiceDescriptorReader
Returns the defaultServiceDescriptorReader
instance- Returns:
- the default
ServiceDescriptorReader
instance, ornull
if no service descriptor reader is available
-
getDefaultServiceDescriptorWriter
Returns the defaultServiceDescriptorWriter
instance- Returns:
- the default
ServiceDescriptorWriter
instance, ornull
if no service descriptor writer is available
-
getDefaultServiceDialogProvider
Returns the defaultServiceDialogProvider
instance- Returns:
- the default
ServiceDialogProvider
instance, ornull
if no service dialog provider is available
-
getDefaultServiceDescriptorEditorProvider
Returns the defaultServiceDescriptorEditorProvider
instance- Returns:
- the default
ServiceDescriptorEditorProvider
instance, ornull
if no service descriptor editor provider is available
-
getServiceDescriptorConfigurationAsStream
Returns anInputStream
with service configuration.- Returns:
- an
InputStream
with service configuration ornull
if not possible to get a configuration
-
getServiceDescriptorConfigurationAsStream
public static InputStream getServiceDescriptorConfigurationAsStream(chemaxon.marvin.services.ServicesConfigURLProvider settings) Returns anInputStream
with service configuration.- Parameters:
settings
- the user settings- Returns:
- an
InputStream
with service configuration ornull
if not possible to get a configuration
-
getServiceDescriptorConfigurationAsStream
Returns the service descriptor configuration stream from path, ornull
.- Parameters:
configPath
- the path or URL to service descriptor configuration. Empty String ornull
falls back to default configuration file.- Returns:
- the service descriptor configuration stream from path, or
null
- Since:
- 5.10
-
getServiceDescriptorReader
Returns theServiceDescriptorReader
instance if available, ornull
- Parameters:
descriptorReaderClassName
- the class name of the service descriptor writer- Returns:
- the
ServiceDescriptorReader
instance if available, ornull
-
getServiceDescriptorWriter
Returns theServiceDescriptorWriter
instance if available, ornull
- Parameters:
descriptorWriterClassName
- the class name of the service descriptor writer- Returns:
- the
ServiceDescriptorWriter
instance if available, ornull
-
getServiceDialogProvider
Returns theServiceDialogProvider
instance if available, ornull
- Parameters:
serviceDialogProviderClassName
- the class name of the service dialog provider- Returns:
- the
ServiceDialogProvider
instance if available, ornull
-
getServiceDescriptorEditorProvider
public static ServiceDescriptorEditorProvider getServiceDescriptorEditorProvider(String serviceDescriptorEditorProviderClassName) Returns theServiceDescriptorEditorProvider
instance if available, ornull
- Parameters:
serviceDescriptorEditorProviderClassName
- the class name of the service descriptor editor provider- Returns:
- the
ServiceDescriptorEditorProvider
instance if available, ornull
-