Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc for Elexis version 2.1.7.dev vom 17.03.2013

ag.ion.bion.officelayer.internal.document
Class PersistenceService

java.lang.Object
  extended by ag.ion.bion.officelayer.internal.document.PersistenceService
All Implemented Interfaces:
IPersistenceService

public class PersistenceService
extends java.lang.Object
implements IPersistenceService

Persistence service for office documents.


Constructor Summary
PersistenceService(IDocument document, com.sun.star.frame.XStorable xStorable)
          Constructs new PersistenceService.
 
Method Summary
 void export(java.io.OutputStream outputStream, IFilter filter)
          Exports document into the output stream on the basis of the submitted filter.
 void export(java.lang.String url, IFilter filter)
          Exports document to the URL on the basis of the submitted filter.
 java.net.URL getLocation()
          Returns location URL of the document.
 boolean hasLocation()
          Returns information whether the document has a location URL.
 boolean isReadOnly()
          Returns informations whether the doccument is in read only state or not.
 void store()
          Stores document on to the location URL.
 void store(java.io.OutputStream outputStream)
          Stored document in the submitted output stream.
 void store(java.lang.String url)
          Stores document to the submitted URL.
 void storeAs(java.io.OutputStream outputStream)
          Stores document in the submitted output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceService

public PersistenceService(IDocument document,
                          com.sun.star.frame.XStorable xStorable)
                   throws java.lang.IllegalArgumentException
Constructs new PersistenceService.

Parameters:
document - document to be used
xStorable - OpenOffice.org XStorable interface to be used
Throws:
java.lang.IllegalArgumentException - if the submitted document or the OpenOffice.org XStorable interface is not valid
Method Detail

hasLocation

public boolean hasLocation()
Returns information whether the document has a location URL.

Specified by:
hasLocation in interface IPersistenceService
Returns:
information whether the document has a location URL

getLocation

public java.net.URL getLocation()
Returns location URL of the document. Returns null if no location URL is available.

Specified by:
getLocation in interface IPersistenceService
Returns:
location URL of the document

isReadOnly

public boolean isReadOnly()
Returns informations whether the doccument is in read only state or not.

Specified by:
isReadOnly in interface IPersistenceService
Returns:
informations whether the doccument is in read only state or not

store

public void store()
           throws DocumentException
Stores document on to the location URL.

Specified by:
store in interface IPersistenceService
Throws:
DocumentException - if the document can not be stored or no location URL is available

store

public void store(java.lang.String url)
           throws DocumentException
Stores document to the submitted URL.

Specified by:
store in interface IPersistenceService
Parameters:
url - URL to be used as location
Throws:
DocumentException - if the document can not be stored

store

public void store(java.io.OutputStream outputStream)
           throws DocumentException
Stored document in the submitted output stream.

Specified by:
store in interface IPersistenceService
Parameters:
outputStream - output stream to be used
Throws:
DocumentException - if the document can not be stored

storeAs

public void storeAs(java.io.OutputStream outputStream)
             throws NOAException
Stores document in the submitted output stream. And fires save-as events on office document.

Specified by:
storeAs in interface IPersistenceService
Parameters:
outputStream - output stream to be used
Throws:
NOAException - if the document can not be stored

export

public void export(java.lang.String url,
                   IFilter filter)
            throws DocumentException
Exports document to the URL on the basis of the submitted filter.

Specified by:
export in interface IPersistenceService
Parameters:
url - URL to be used as location
filter - filter to be used
Throws:
DocumentException - if the document can not be exported

export

public void export(java.io.OutputStream outputStream,
                   IFilter filter)
            throws NOAException
Exports document into the output stream on the basis of the submitted filter.

Specified by:
export in interface IPersistenceService
Parameters:
outputStream - output stream to be used
filter - filter to be used
Throws:
NOAException - if the document can not be exported

Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc for Elexis version 2.1.7.dev vom 17.03.2013