LibreOffice: XHierarchicalStorageAccess Interface Reference

LibreOffice LibreOffice 6.1 SDK API Reference

Public Member Functions | List of all members
XHierarchicalStorageAccess Interface Referencepublished

This interface allows hierarchical access to storage tree. More...

`import"XHierarchicalStorageAccess.idl";`

Inheritance diagram for XHierarchicalStorageAccess:

## Public Member Functions
XExtendedStorageStream | openStreamElementByHierarchicalName ([in] string sStreamPath, [in] long nOpenMode) raises ( ::com::sun::star::embed::InvalidStorageException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::packages::WrongPasswordException, ::com::sun::star::io::IOException, ::com::sun::star::embed::StorageWrappedTargetException )
| allows to get access to a child stream of the storage, using hierarchical path. More...
XExtendedStorageStream | openEncryptedStreamElementByHierarchicalName ([in] string sStreamName, [in] long nOpenMode, [in] string sPassword) raises ( ::com::sun::star::embed::InvalidStorageException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::packages::NoEncryptionException, ::com::sun::star::packages::WrongPasswordException, ::com::sun::star::io::IOException, ::com::sun::star::embed::StorageWrappedTargetException )
| allows to get access to a child encrypted stream with password using hierarchical path. More...
void | removeStreamElementByHierarchicalName ([in] string sElementPath) raises ( ::com::sun::star::embed::InvalidStorageException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::io::IOException, ::com::sun::star::embed::StorageWrappedTargetException )
| removes a stream specified by hierarchical name from a storage. More...

## Detailed Description

This interface allows hierarchical access to storage tree.

Currently only streams can be opened using this interface.

The hierarchical access can not be mixed with a normal access. Thus when in a storage a stream with a path "a/b/c" is accessed using hierarchical access, another stream "a/b/d" can also be opened with hierarchical access ( if it is still not opened ), but the substorage "a" can not be opened ( it is locked by hierarchical access ).

## Member Function Documentation

## ◆ openEncryptedStreamElementByHierarchicalName()

XExtendedStorageStream openEncryptedStreamElementByHierarchicalName | ( | [in] string | sStreamName,
|  | [in] long | nOpenMode,
|  | [in] string | sPassword
| ) |  |
raises | ( | ::com::sun::star::embed::InvalidStorageException,
|  | ::com::sun::star::lang::IllegalArgumentException,
|  | ::com::sun::star::packages::NoEncryptionException,
|  | ::com::sun::star::packages::WrongPasswordException,
|  | ::com::sun::star::io::IOException,
|  | ::com::sun::star::embed::StorageWrappedTargetException
| ) |  |

allows to get access to a child encrypted stream with password using hierarchical path.

If storage does not allow any encryption this method will always throw com::sun::star::packages::NoEncryptionException.

In case the stream is open in readonly mode the com::sun::star::io::XStream::getOutputStream() method will return an empty reference.

Parameters

  sStreamName | the path to the substream that should be open
  nOpenMode | a mode the stream should be open in, can be a combination of ElementModes values
  sPassword | this parameter allows to specify a reading password for the stream, the password must be a correct one, otherwise an exception will be thrown

Exceptions

  com::sun::star::embed::InvalidStorageException | this storage is in invalid state for any reason
  com::sun::star::lang::IllegalArgumentException | one of provided arguments is illegal
  com::sun::star::packages::NoEncryptionException | the stream is not encrypted
  com::sun::star::packages::WrongPasswordException | the provided password is wrong
  com::sun::star::io::IOException | in case of io errors during stream opening
  com::sun::star::embed::StorageWrappedTargetException | wraps other exceptions

## ◆ openStreamElementByHierarchicalName()

XExtendedStorageStream openStreamElementByHierarchicalName | ( | [in] string | sStreamPath,
|  | [in] long | nOpenMode
| ) |  |
raises | ( | ::com::sun::star::embed::InvalidStorageException,
|  | ::com::sun::star::lang::IllegalArgumentException,
|  | ::com::sun::star::packages::WrongPasswordException,
|  | ::com::sun::star::io::IOException,
|  | ::com::sun::star::embed::StorageWrappedTargetException
| ) |  |

allows to get access to a child stream of the storage, using hierarchical path.

In case the stream is open in readonly mode the com::sun::star::io::XStream::getOutputStream() method will return an empty reference.

Parameters

  sStreamPath | the path to the substream that should be open
  nOpenMode | a mode the stream should be open in, can be a combination of ElementModes values

Exceptions

  com::sun::star::embed::InvalidStorageException | this storage is in invalid state for any reason
  com::sun::star::lang::IllegalArgumentException | one of provided arguments is illegal
  com::sun::star::packages::WrongPasswordException | the provided password is wrong
  com::sun::star::io::IOException | in case of io errors during stream opening
  com::sun::star::embed::StorageWrappedTargetException | wraps other exceptions

## ◆ removeStreamElementByHierarchicalName()

void removeStreamElementByHierarchicalName | ( | [in] string | sElementPath | ) |
raises | ( | ::com::sun::star::embed::InvalidStorageException,
|  | ::com::sun::star::lang::IllegalArgumentException,
|  | ::com::sun::star::container::NoSuchElementException,
|  | ::com::sun::star::io::IOException,
|  | ::com::sun::star::embed::StorageWrappedTargetException
| ) |  |

removes a stream specified by hierarchical name from a storage.

Parameters

  sElementPath | the path to the element to remove

Exceptions

  com::sun::star::embed::InvalidStorageException | this storage is in invalid state for any reason
  com::sun::star::lang::IllegalArgumentException | an illegal argument is provided
  com::sun::star::container::NoSuchElementException | there is no element with such name
  com::sun::star::io::IOException | in case of io errors during removing
  com::sun::star::embed::StorageWrappedTargetException | wraps other exceptions

The documentation for this interface was generated from the following file:

- com/sun/star/embed/XHierarchicalStorageAccess.idl