Package chemaxon.marvin.services
Class ServiceDescriptorTools
- java.lang.Object
-
- chemaxon.marvin.services.ServiceDescriptorTools
-
@PublicAPI public class ServiceDescriptorTools extends Object
Helper class for accessingServiceDescriptorReader
,ServiceDescriptorWriter
andServiceDialogProvider
implementations and various configuration data for services.- Since:
- 5.6
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_SERVICE_CONFIGURATION_PATH
Path to default services configuration xmlstatic String
DEFAULT_SERVICE_DESCRIPTOR_EDITOR_PROVIDER_CLASSNAME
the Marvin Default service descriptor editor provider classstatic String
DEFAULT_SERVICE_DESCRIPTOR_READER_CLASSNAME
the Marvin Default service descriptor reader classstatic String
DEFAULT_SERVICE_DESCRIPTOR_WRITER_CLASSNAME
the Marvin Default service descriptor writer classstatic String
DEFAULT_SERVICE_DIALOG_PROVIDER_CLASSNAME
the Marvin Default service dialog provider classstatic String
DEFAULT_USER_SERVICE_CONFIGURATION_FILENAME
name of default user service configuration filestatic String
SERVICE_CONFIGURATION_PATH_PROPERTY_KEY
Java System Property key to globally override default configuration path.static String
SERVICE_DIALOG_PROVIDER_CLASS_NAME_PROPERTY_KEY
Java System Property key to globally override default Service Dialog Provider class with custom implementation.
-
Constructor Summary
Constructors Constructor Description ServiceDescriptorTools()
-
Method Summary
-
-
-
Field Detail
-
SERVICE_CONFIGURATION_PATH_PROPERTY_KEY
public static final String 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:
- Constant Field Values
-
SERVICE_DIALOG_PROVIDER_CLASS_NAME_PROPERTY_KEY
public static final String 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:
- Constant Field Values
-
DEFAULT_SERVICE_DESCRIPTOR_READER_CLASSNAME
public static final String DEFAULT_SERVICE_DESCRIPTOR_READER_CLASSNAME
the Marvin Default service descriptor reader class- See Also:
- Constant Field Values
-
DEFAULT_SERVICE_DESCRIPTOR_WRITER_CLASSNAME
public static final String DEFAULT_SERVICE_DESCRIPTOR_WRITER_CLASSNAME
the Marvin Default service descriptor writer class- See Also:
- Constant Field Values
-
DEFAULT_SERVICE_DIALOG_PROVIDER_CLASSNAME
public static final String DEFAULT_SERVICE_DIALOG_PROVIDER_CLASSNAME
the Marvin Default service dialog provider class- See Also:
- Constant Field Values
-
DEFAULT_SERVICE_DESCRIPTOR_EDITOR_PROVIDER_CLASSNAME
public static final String DEFAULT_SERVICE_DESCRIPTOR_EDITOR_PROVIDER_CLASSNAME
the Marvin Default service descriptor editor provider class- See Also:
- Constant Field Values
-
DEFAULT_SERVICE_CONFIGURATION_PATH
public static final String DEFAULT_SERVICE_CONFIGURATION_PATH
Path to default services configuration xml- See Also:
- Constant Field Values
-
DEFAULT_USER_SERVICE_CONFIGURATION_FILENAME
public static final String DEFAULT_USER_SERVICE_CONFIGURATION_FILENAME
name of default user service configuration file- See Also:
- Constant Field Values
-
-
Method Detail
-
getDefaultServiceDescriptorReader
public static ServiceDescriptorReader getDefaultServiceDescriptorReader()
Returns the defaultServiceDescriptorReader
instance- Returns:
- the default
ServiceDescriptorReader
instance, ornull
if no service descriptor reader is available
-
getDefaultServiceDescriptorWriter
public static ServiceDescriptorWriter getDefaultServiceDescriptorWriter()
Returns the defaultServiceDescriptorWriter
instance- Returns:
- the default
ServiceDescriptorWriter
instance, ornull
if no service descriptor writer is available
-
getDefaultServiceDialogProvider
public static ServiceDialogProvider getDefaultServiceDialogProvider()
Returns the defaultServiceDialogProvider
instance- Returns:
- the default
ServiceDialogProvider
instance, ornull
if no service dialog provider is available
-
getDefaultServiceDescriptorEditorProvider
public static ServiceDescriptorEditorProvider getDefaultServiceDescriptorEditorProvider()
Returns the defaultServiceDescriptorEditorProvider
instance- Returns:
- the default
ServiceDescriptorEditorProvider
instance, ornull
if no service descriptor editor provider is available
-
getServiceDescriptorConfigurationAsStream
public static InputStream 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(UserSettings 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
public static InputStream getServiceDescriptorConfigurationAsStream(String configPath)
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
public static ServiceDescriptorReader getServiceDescriptorReader(String descriptorReaderClassName)
Returns theServiceDescriptorReader
instance if available, ornull
- Parameters:
descriptorReaderClassName
- the class name of the service descriptor writer- Returns:
- the
ServiceDescriptorReader
instance if available, ornull
-
getServiceDescriptorWriter
public static ServiceDescriptorWriter getServiceDescriptorWriter(String descriptorWriterClassName)
Returns theServiceDescriptorWriter
instance if available, ornull
- Parameters:
descriptorWriterClassName
- the class name of the service descriptor writer- Returns:
- the
ServiceDescriptorWriter
instance if available, ornull
-
getServiceDialogProvider
public static ServiceDialogProvider getServiceDialogProvider(String serviceDialogProviderClassName)
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
-
-