org.colos.ejs.library
Interface EmersionLink

All Known Implementing Classes:
EmersionConnection, MoodleConnection

public interface EmersionLink

The interface that a real Emersion connection will need. But does not require the emersion library


Method Summary
 boolean isConnected()
          Whether there is a valid connection to a server.
 byte[] readBinary(java.lang.String _ext)
           
 java.awt.Image readImage(java.lang.String _ext)
           
 java.lang.String readText(java.lang.String _filename)
           
 java.lang.String readXML(java.lang.String _filename)
           
 java.lang.String saveBinary(java.lang.String _filename, java.lang.String _annotation, byte[] _data)
          Saves a binary data to file.
 java.lang.String saveImage(java.lang.String _filename, java.lang.String _annotation, java.awt.Image _image)
          Saves an image to file.
 java.lang.String saveText(java.lang.String _filename, java.lang.String _annotation, java.lang.String _text)
          Saves a text to file.
 java.lang.String saveXML(java.lang.String _filename, java.lang.String _annotation, java.lang.String _xml)
          Saves a XML text to file.
 void setAnnotationLabel(java.lang.String _label)
          Sets the annotation label for any message window
 void setNameLabel(java.lang.String _label)
          Sets the name label for any message window
 void setParentComponent(java.awt.Component _component)
          Sets the parent component of any subsequent message window such as a JOptionPane.
 

Method Detail

isConnected

boolean isConnected()
Whether there is a valid connection to a server.

Returns:
boolean

setParentComponent

void setParentComponent(java.awt.Component _component)
Sets the parent component of any subsequent message window such as a JOptionPane.

Parameters:
_component - java.awt.Component

setNameLabel

void setNameLabel(java.lang.String _label)
Sets the name label for any message window

Parameters:
_label - String

setAnnotationLabel

void setAnnotationLabel(java.lang.String _label)
Sets the annotation label for any message window

Parameters:
_label - String

saveBinary

java.lang.String saveBinary(java.lang.String _filename,
                            java.lang.String _annotation,
                            byte[] _data)
Saves a binary data to file. It offers the user to change the provided name.

Parameters:
_filename - String
_annotation - String
_data - byte[]
Returns:
String The name of the file finally saved (null if aborted or errors).

saveImage

java.lang.String saveImage(java.lang.String _filename,
                           java.lang.String _annotation,
                           java.awt.Image _image)
Saves an image to file. It offers the user to change the provided name.

Parameters:
_filename - String
_annotation - String
_image - Image
Returns:
String The name of the file finally saved (null if aborted or errors).

saveText

java.lang.String saveText(java.lang.String _filename,
                          java.lang.String _annotation,
                          java.lang.String _text)
Saves a text to file. It offers the user to change the provided name.

Parameters:
_filename - String
_annotation - String
_text - String
Returns:
String The name of the file finally saved (null if aborted or errors).

saveXML

java.lang.String saveXML(java.lang.String _filename,
                         java.lang.String _annotation,
                         java.lang.String _xml)
Saves a XML text to file. It offers the user to change the provided name.

Parameters:
_filename - String
_annotation - String
_text - String
_xml - String
Returns:
String The name of the file finally saved (null if aborted or errors).

readBinary

byte[] readBinary(java.lang.String _ext)

readText

java.lang.String readText(java.lang.String _filename)

readXML

java.lang.String readXML(java.lang.String _filename)

readImage

java.awt.Image readImage(java.lang.String _ext)