ooodev.adapter.embed.storage_factory_comp module
- class ooodev.adapter.embed.storage_factory_comp.StorageFactoryComp(component)[source]
Bases:
ComponentProp
,SingleServiceFactoryPartial
Class for managing StorageFactory Component.
The StorageFactory is a service that allows to create a storage based on either stream or URL.
In case
create_instance()
call is used the result storage will be open in read-write mode based on an arbitrary medium.In case
create_instance_with_arguments()
call is used a sequence of the following parameters can be used: The parameters are optional, that means that sequence can be empty or contain only first parameter, or first and second one. In case no parameters are provided the call works the same way ascreate_instance_with_arguments()
. In case only first parameter is provided, the storage is opened in readonly mode.The opened root storage can support read access in addition to specified one.
See also
- Parameters:
component (XSingleServiceFactory) –
- __init__(component)[source]
Constructor
- Parameters:
component (XSingleServiceFactory) – UNO Component that supports
com.sun.star.embed.StorageFactory
service.- Return type:
None
- create_instance()[source]
Creates an instance of a service implementation.
- Raises:
com.sun.star.uno.Exception –
Exception
- Return type:
XStorage
- create_instance_with_arguments(*args)[source]
Creates an instance of a service implementation initialized with some arguments.
- Parameters:
args (Any) – One or more arguments to initialize the service.
- Raises:
com.sun.star.uno.Exception –
Exception
- Return type:
XStorage
- create_instance_with_prop_args(**kwargs)[source]
Creates an instance of a service implementation initialized with some arguments.
Each Key, Value pair is converted to a
PropertyValue
before adding to the service arguments.- Parameters:
kwargs (Any) – One or more arguments to initialize the service.
- Raises:
com.sun.star.uno.Exception –
Exception
- Return type:
XStorage
- classmethod from_lo(lo_inst=None)[source]
Creates an instance from the Lo.
- Parameters:
lo_inst (LoInst, optional) – LoInst, Defaults to
Lo.current_lo
.- Returns:
The instance.
- Return type:
- property component: com.sun.star.embed.StorageFactory
StorageFactory Component
- Return type:
StorageFactory