Class Office

java.lang.Object
com.storedobject.office.od.Office

public final class Office extends Object
Utility class that provides methods for interacting with a LibreOffice or OpenOffice process for document creation, manipulation, and conversion. This class uses the UNO API to interface with the office process for operations such as opening documents, converting formats, and exporting to PDF or HTML.

This class is implemented as a singleton to manage a single office service instance. It ensures proper initialization, reuse of resources, and cleanup of the office service. The singleton instance is lazily initialized through get().

Thread-safety is guaranteed by synchronized blocks to ensure proper coordination between threads when accessing or initializing shared resources.

The class provides capabilities to:
 - Open and create new ODT (text document) and ODS (spreadsheet) files.
 - Convert documents to different formats such as PDF and HTML.
 - Manage lifecycle operations, including initialization and cleanup of office resources.

 Dependencies:
 - The LibreOffice or OpenOffice process must be installed and accessible.
 - The UNO runtime and related interfaces to communicate with office components.

 Error Handling:
 - Proper error handling is implemented to ensure exceptions such as initialization
   failures or IO errors are logged or thrown as needed.
 
Author:
Syam