JIDE 3.5.15

com.jidesoft.pane
Class OutlookTabbedPanePersistenceUtils

java.lang.Object
  extended by com.jidesoft.pane.OutlookTabbedPanePersistenceUtils

public class OutlookTabbedPanePersistenceUtils
extends Object

A helper class that can support persist AggregateTablePane's layout to/from xml file.


Constructor Summary
OutlookTabbedPanePersistenceUtils()
           
 
Method Summary
static String getVersion(Document document)
          Gets the version of the layout file.
static String getVersion(InputStream in)
          Gets the version of the layout file.
static String getVersion(String fileName)
          Gets the version of the layout file.
static void load(OutlookTabbedPane pane, Document document)
          Loads the layout from xml document.
static void load(OutlookTabbedPane pane, Document document, PersistenceUtilsCallback.Load callback)
          Loads the layout from xml document.
static void load(OutlookTabbedPane pane, InputStream in)
          Loads the OutlookTabbedPane's layout from an input stream.
static void load(OutlookTabbedPane pane, InputStream in, PersistenceUtilsCallback.Load callback)
          Loads the layout from input stream.
static void load(OutlookTabbedPane pane, String fileName)
          Loads the layout from xml file.
static void load(OutlookTabbedPane pane, String fileName, PersistenceUtilsCallback.Load callback)
          Loads the layout from xml file.
static Document save(OutlookTabbedPane pane)
          Saves the OutlookTabbedPane's layout to an XML Document
static void save(OutlookTabbedPane pane, OutputStream out)
          Saves the OutlookTabbedPane's layout to an output stream.
static void save(OutlookTabbedPane pane, OutputStream out, PersistenceUtilsCallback.Save callback)
          Saves the OutlookTabbedPane's layout to an output stream.
static void save(OutlookTabbedPane pane, OutputStream out, PersistenceUtilsCallback.Save callback, String encoding)
          Saves the OutlookTabbedPane's layout to an output stream.
static Document save(OutlookTabbedPane pane, PersistenceUtilsCallback.Save callback)
          Saves the OutlookTabbedPane's layout to an XML Document
static void save(OutlookTabbedPane pane, String fileName)
          Saves the OutlookTabbedPane's layout to a file.
static void save(OutlookTabbedPane pane, String fileName, PersistenceUtilsCallback.Save callback)
          Saves the OutlookTabbedPane's layout to a file.
static void save(OutlookTabbedPane pane, String fileName, PersistenceUtilsCallback.Save callback, String encoding)
          Saves the OutlookTabbedPane's layout to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutlookTabbedPanePersistenceUtils

public OutlookTabbedPanePersistenceUtils()
Method Detail

save

public static void save(OutlookTabbedPane pane,
                        String fileName)
                 throws ParserConfigurationException,
                        IOException
Saves the OutlookTabbedPane's layout to a file.

Parameters:
pane - the OutlookTabbedPane
fileName - the file name
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration
IOException - If the pathname argument is null or any IO errors happen

save

public static void save(OutlookTabbedPane pane,
                        OutputStream out)
                 throws ParserConfigurationException,
                        IOException
Saves the OutlookTabbedPane's layout to an output stream.

Parameters:
pane - the OutlookTabbedPane
out - the output stream
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration
IOException - If the pathname argument is null or any IO errors happen

save

public static Document save(OutlookTabbedPane pane)
                     throws ParserConfigurationException
Saves the OutlookTabbedPane's layout to an XML Document

Parameters:
pane - the OutlookTabbedPane
Returns:
XML Document which has the OutlookTabbedPane's layout.
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration

save

public static void save(OutlookTabbedPane pane,
                        String fileName,
                        PersistenceUtilsCallback.Save callback)
                 throws ParserConfigurationException,
                        IOException
Saves the OutlookTabbedPane's layout to a file.

Parameters:
pane - the OutlookTabbedPane
fileName - the file name
callback - The callback which will be called when saving each element to the XML document.
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration
IOException - If the pathname argument is null or any IO errors happen

save

public static void save(OutlookTabbedPane pane,
                        String fileName,
                        PersistenceUtilsCallback.Save callback,
                        String encoding)
                 throws ParserConfigurationException,
                        IOException
Saves the OutlookTabbedPane's layout to a file.

Parameters:
pane - the OutlookTabbedPane
fileName - the file name
callback - the callback which will be called when saving each element to the XML document
encoding - the encoding choice. It would be UTF-8 in default if you call the method without this parameter.
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration
IOException - If the pathname argument is null or any IO errors happen

save

public static void save(OutlookTabbedPane pane,
                        OutputStream out,
                        PersistenceUtilsCallback.Save callback)
                 throws ParserConfigurationException,
                        IOException
Saves the OutlookTabbedPane's layout to an output stream.

Parameters:
pane - the OutlookTabbedPane
out - the output stream
callback - The callback which will be called when saving each element to the XML document.
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration
IOException - If the pathname argument is null or any IO errors happen

save

public static void save(OutlookTabbedPane pane,
                        OutputStream out,
                        PersistenceUtilsCallback.Save callback,
                        String encoding)
                 throws ParserConfigurationException,
                        IOException
Saves the OutlookTabbedPane's layout to an output stream.

Parameters:
pane - the OutlookTabbedPane
out - the output stream
callback - The callback which will be called when saving each element to the XML document.
encoding - the encoding choice. It would be UTF-8 in default if you call the method without this parameter.
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration
IOException - If the pathname argument is null or any IO errors happen

save

public static Document save(OutlookTabbedPane pane,
                            PersistenceUtilsCallback.Save callback)
                     throws ParserConfigurationException
Saves the OutlookTabbedPane's layout to an XML Document

Parameters:
pane - the OutlookTabbedPane
callback - The callback which will be called when saving each element to the XML document.
Returns:
XML Document which has the OutlookTabbedPane's layout.
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration

load

public static void load(OutlookTabbedPane pane,
                        InputStream in)
                 throws ParserConfigurationException,
                        SAXException,
                        IOException
Loads the OutlookTabbedPane's layout from an input stream.

Parameters:
pane - the OutlookTabbedPane
in - the input stream
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration
SAXException - if either the XML parser or the application has errors
IOException - if the pathname argument is null or any IO errors happen

load

public static void load(OutlookTabbedPane pane,
                        String fileName)
                 throws ParserConfigurationException,
                        SAXException,
                        IOException
Loads the layout from xml file.

Parameters:
pane - the OutlookTabbedPane
fileName - the layout file name.
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration requested.
SAXException - If any parse errors occur.
IOException - If the pathname argument is null or any IO errors happen

load

public static void load(OutlookTabbedPane pane,
                        Document document)
Loads the layout from xml document.

Parameters:
pane - the OutlookTabbedPane
document - the XML document

load

public static void load(OutlookTabbedPane pane,
                        InputStream in,
                        PersistenceUtilsCallback.Load callback)
                 throws ParserConfigurationException,
                        SAXException,
                        IOException
Loads the layout from input stream.

Parameters:
pane - the OutlookTabbedPane
in - the input stream
callback - The callback which will be called when loading each element in the XML document.
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration requested.
SAXException - If any parse errors occur.
IOException - If the pathname argument is null or any IO errors happen

load

public static void load(OutlookTabbedPane pane,
                        String fileName,
                        PersistenceUtilsCallback.Load callback)
                 throws ParserConfigurationException,
                        SAXException,
                        IOException
Loads the layout from xml file.

Parameters:
pane - the OutlookTabbedPane
fileName - the layout file name.
callback - The callback which will be called when loading each element in the XML document.
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration requested.
SAXException - If any parse errors occur.
IOException - If the pathname argument is null or any IO errors happen

load

public static void load(OutlookTabbedPane pane,
                        Document document,
                        PersistenceUtilsCallback.Load callback)
Loads the layout from xml document.

Parameters:
pane - the OutlookTabbedPane
document - the XML document
callback - The callback which will be called when loading each element in the XML document.

getVersion

public static String getVersion(InputStream in)
                         throws ParserConfigurationException,
                                SAXException,
                                IOException
Gets the version of the layout file. Null is the layout file is invalid.

Parameters:
in - the InputStream
Returns:
the version.
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration requested.
SAXException - If any parse errors occur.
IOException - If the pathname argument is null or any IO errors happen

getVersion

public static String getVersion(String fileName)
                         throws ParserConfigurationException,
                                SAXException,
                                IOException
Gets the version of the layout file. Null is the layout file is invalid.

Parameters:
fileName - the Document for the layout
Returns:
the version.
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration requested.
SAXException - If any parse errors occur.
IOException - If the pathname argument is null or any IO errors happen

getVersion

public static String getVersion(Document document)
Gets the version of the layout file. Null is the layout file is invalid.

Parameters:
document - the Document for the layout
Returns:
the version.

JIDE 3.5.15