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

ag.ion.noa4e.ui.operations
Class LoadDocumentOperation

java.lang.Object
  extended by ag.ion.noa4e.ui.operations.LoadDocumentOperation
All Implemented Interfaces:
org.eclipse.jface.operation.IRunnableWithProgress

public class LoadDocumentOperation
extends java.lang.Object
implements org.eclipse.jface.operation.IRunnableWithProgress

Operation in order to load a OpenOffice.org document.


Constructor Summary
LoadDocumentOperation(IOfficeApplication officeApplication, IFrame frame, java.net.URL url, IDocumentDescriptor documentDescriptor)
          Constructs new LoadDocumentOperation.
LoadDocumentOperation(IOfficeApplication officeApplication, java.io.InputStream inputStream, IDocumentDescriptor documentDescriptor)
          Constructs new LoadDocumentOperation.
LoadDocumentOperation(java.lang.String documentType, IOfficeApplication officeApplication, IFrame frame, java.io.InputStream inputStream, IDocumentDescriptor documentDescriptor)
          Constructs new LoadDocumentOperation.
LoadDocumentOperation(java.lang.String documentType, IOfficeApplication officeApplication, IFrame frame, java.net.URL url, IDocumentDescriptor documentDescriptor)
          Constructs new LoadDocumentOperation.
LoadDocumentOperation(java.lang.String documentType, IOfficeApplication officeApplication, java.net.URL url, IDocumentDescriptor documentDescriptor)
          Constructs new LoadDocumentOperation.
 
Method Summary
 IDocument getDocument()
          Returns loaded document.
 java.lang.Exception getException()
          Returns exception.
 void run(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
          Runs this operation.
 void setIsSubTask(boolean isSubTask)
          Sets information whether this operation is a sub task.
 void setUpdateProgressMonitor(boolean updateProgressMonitor)
          Sets information whether the progress monitor should be updated.
 void setUseStream(boolean useStream)
          Sets information whether the document should be loaded by an input stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadDocumentOperation

public LoadDocumentOperation(IOfficeApplication officeApplication,
                             IFrame frame,
                             java.net.URL url,
                             IDocumentDescriptor documentDescriptor)
                      throws java.lang.IllegalArgumentException
Constructs new LoadDocumentOperation.

Parameters:
officeApplication - office application to be use
frame - frame to be used
url - URL of the document
documentDescriptor - document descriptor to be used (can be null)
Throws:
java.lang.IllegalArgumentException - if the submitted office application, frame or URL is not valid

LoadDocumentOperation

public LoadDocumentOperation(java.lang.String documentType,
                             IOfficeApplication officeApplication,
                             IFrame frame,
                             java.net.URL url,
                             IDocumentDescriptor documentDescriptor)
Constructs new LoadDocumentOperation.

Parameters:
documentType - document type to be loaded (can be null)
officeApplication - office application to be use
frame - frame to be used
url - URL of the document
documentDescriptor - document descriptor to be used (can be null)

LoadDocumentOperation

public LoadDocumentOperation(java.lang.String documentType,
                             IOfficeApplication officeApplication,
                             java.net.URL url,
                             IDocumentDescriptor documentDescriptor)
Constructs new LoadDocumentOperation.

Parameters:
documentType - document type to be loaded (can be null)
officeApplication - office application to be use
url - URL of the document
documentDescriptor - document descriptor to be used (can be null)

LoadDocumentOperation

public LoadDocumentOperation(java.lang.String documentType,
                             IOfficeApplication officeApplication,
                             IFrame frame,
                             java.io.InputStream inputStream,
                             IDocumentDescriptor documentDescriptor)
Constructs new LoadDocumentOperation.

Parameters:
documentType - document type to be loaded (can be null)
officeApplication - office application to be use
frame - frame to be used
inputStream - input stream to be used
documentDescriptor - document descriptor to be used (can be null)

LoadDocumentOperation

public LoadDocumentOperation(IOfficeApplication officeApplication,
                             java.io.InputStream inputStream,
                             IDocumentDescriptor documentDescriptor)
Constructs new LoadDocumentOperation.

Parameters:
officeApplication - office application to be use
inputStream - input stream to be used
documentDescriptor - document descriptor to be used (can be null)
Method Detail

setIsSubTask

public void setIsSubTask(boolean isSubTask)
Sets information whether this operation is a sub task.

Parameters:
isSubTask - information whether this operation is a sub task

setUpdateProgressMonitor

public void setUpdateProgressMonitor(boolean updateProgressMonitor)
Sets information whether the progress monitor should be updated.

Parameters:
updateProgressMonitor - information whether the progress monitor should be updated

setUseStream

public void setUseStream(boolean useStream)
Sets information whether the document should be loaded by an input stream.

Parameters:
useStream - information whether the document should be loaded by an input stream

getException

public java.lang.Exception getException()
Returns exception. Returns null if no exception was thrown.

Returns:
exception - returns null if no exception was thrown

getDocument

public IDocument getDocument()
Returns loaded document. Returns null if no document is available. If a document type was submitted - only a document will be returned if the type of the loaded document matches the submitted type.

Returns:
loaded document or null if no document is available

run

public void run(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
         throws java.lang.reflect.InvocationTargetException,
                java.lang.InterruptedException
Runs this operation. Progress should be reported to the given progress monitor. This method is usually invoked by an IRunnableContext's run method, which supplies the progress monitor. A request to cancel the operation should be honored and acknowledged by throwing InterruptedException.

Specified by:
run in interface org.eclipse.jface.operation.IRunnableWithProgress
Parameters:
progressMonitor - the progress monitor to use to display progress and receive requests for cancelation
Throws:
java.lang.reflect.InvocationTargetException - if the run method must propagate a checked exception, it should wrap it inside an InvocationTargetException; runtime exceptions are automatically wrapped in an InvocationTargetException by the calling context
java.lang.InterruptedException - if the operation detects a request to cancel, using IProgressMonitor.isCanceled(), it should exit by throwing InterruptedException

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