JIDE 3.5.15

com.jidesoft.shortcut
Class ShortcutPersistenceUtils

java.lang.Object
  extended by com.jidesoft.shortcut.ShortcutPersistenceUtils

public class ShortcutPersistenceUtils
extends Object

A helper class that can support persist ShortcutSchema to/from xml file.


Constructor Summary
ShortcutPersistenceUtils()
           
 
Method Summary
static String getVersion(Document document)
           
static String getVersion(InputStream in)
           
static String getVersion(String fileName)
           
static void load(ShortcutSchemaManager manager, Document document)
           
static void load(ShortcutSchemaManager manager, Document document, boolean append)
           
static void load(ShortcutSchemaManager manager, InputStream in)
           
static void load(ShortcutSchemaManager manager, InputStream in, boolean append)
           
static void load(ShortcutSchemaManager manager, String fileName)
           
static void load(ShortcutSchemaManager manager, String fileName, boolean append)
           
static Document save(ShortcutSchemaManager manager)
           
static void save(ShortcutSchemaManager manager, OutputStream out)
          Saves the shortcut schema to a file.
static void save(ShortcutSchemaManager manager, OutputStream out, String encoding)
          Saves the shortcut schema to a file.
static void save(ShortcutSchemaManager manager, String fileName)
          Saves the shortcut schema to a file.
static void save(ShortcutSchemaManager manager, String fileName, String encoding)
          Saves the shortcut schema to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShortcutPersistenceUtils

public ShortcutPersistenceUtils()
Method Detail

save

public static void save(ShortcutSchemaManager manager,
                        String fileName)
                 throws ParserConfigurationException,
                        IOException
Saves the shortcut schema to a file.

Parameters:
manager - the shortcut schema manager
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(ShortcutSchemaManager manager,
                        String fileName,
                        String encoding)
                 throws ParserConfigurationException,
                        IOException
Saves the shortcut schema to a file.

Parameters:
manager - the shortcut schema manager
fileName - the file name
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(ShortcutSchemaManager manager,
                        OutputStream out)
                 throws ParserConfigurationException,
                        IOException
Saves the shortcut schema to a file.

Parameters:
manager - the shortcut schema manager
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 void save(ShortcutSchemaManager manager,
                        OutputStream out,
                        String encoding)
                 throws ParserConfigurationException,
                        IOException
Saves the shortcut schema to a file.

Parameters:
manager - the shortcut schema manager
out - the output stream
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(ShortcutSchemaManager manager)
                     throws ParserConfigurationException
Throws:
ParserConfigurationException

load

public static void load(ShortcutSchemaManager manager,
                        InputStream in)
                 throws ParserConfigurationException,
                        SAXException,
                        IOException
Throws:
ParserConfigurationException
SAXException
IOException

load

public static void load(ShortcutSchemaManager manager,
                        String fileName)
                 throws ParserConfigurationException,
                        SAXException,
                        IOException
Throws:
ParserConfigurationException
SAXException
IOException

load

public static void load(ShortcutSchemaManager manager,
                        InputStream in,
                        boolean append)
                 throws ParserConfigurationException,
                        SAXException,
                        IOException
Throws:
ParserConfigurationException
SAXException
IOException

load

public static void load(ShortcutSchemaManager manager,
                        String fileName,
                        boolean append)
                 throws ParserConfigurationException,
                        SAXException,
                        IOException
Throws:
ParserConfigurationException
SAXException
IOException

load

public static void load(ShortcutSchemaManager manager,
                        Document document)

load

public static void load(ShortcutSchemaManager manager,
                        Document document,
                        boolean append)

getVersion

public static String getVersion(InputStream in)
                         throws ParserConfigurationException,
                                SAXException,
                                IOException
Throws:
ParserConfigurationException
SAXException
IOException

getVersion

public static String getVersion(String fileName)
                         throws ParserConfigurationException,
                                SAXException,
                                IOException
Throws:
ParserConfigurationException
SAXException
IOException

getVersion

public static String getVersion(Document document)

JIDE 3.5.15