|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.pivot.AggregateTablePanePersistenceUtils
public class AggregateTablePanePersistenceUtils
A helper class that can support persist AggregateTablePane's layout to/from xml file.
Constructor Summary | |
---|---|
AggregateTablePanePersistenceUtils()
|
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 |
isLayoutValid(AggregateTablePane pane,
Document document)
Checks if the layout is valid. |
static void |
isLayoutValid(AggregateTablePane pane,
InputStream in)
Checks if the layout is valid. |
static void |
isLayoutValid(AggregateTablePane pane,
String fileName)
Checks if the layout is valid. |
static void |
load(AggregateTablePane pane,
Document document)
Loads the layout from xml document. |
static void |
load(AggregateTablePane pane,
Document document,
PersistenceUtilsCallback.Load callback)
Loads the layout from xml document. |
static void |
load(AggregateTablePane pane,
InputStream in)
Loads the AggregateTablePane's layout from an input stream. |
static void |
load(AggregateTablePane pane,
InputStream in,
PersistenceUtilsCallback.Load callback)
Loads the layout from input stream. |
static void |
load(AggregateTablePane pane,
String fileName)
Loads the layout from xml file. |
static void |
load(AggregateTablePane pane,
String fileName,
PersistenceUtilsCallback.Load callback)
Loads the layout from xml file. |
static Document |
save(AggregateTablePane pane)
Saves the AggregateTablePane's layout to an XML Document |
static void |
save(AggregateTablePane pane,
OutputStream out)
Saves the AggregateTablePane's layout to an output stream. |
static void |
save(AggregateTablePane pane,
OutputStream out,
PersistenceUtilsCallback.Save callback)
Saves the AggregateTablePane's layout to an output stream. |
static void |
save(AggregateTablePane pane,
OutputStream out,
PersistenceUtilsCallback.Save callback,
String encoding)
Saves the AggregateTablePane's layout to an output stream. |
static Document |
save(AggregateTablePane pane,
PersistenceUtilsCallback.Save callback)
Saves the AggregateTablePane's layout to an XML Document |
static void |
save(AggregateTablePane pane,
String fileName)
Saves the AggregateTablePane's layout to a file. |
static void |
save(AggregateTablePane pane,
String fileName,
PersistenceUtilsCallback.Save callback)
Saves the AggregateTablePane's layout to a file. |
static void |
save(AggregateTablePane pane,
String fileName,
PersistenceUtilsCallback.Save callback,
String encoding)
Saves the AggregateTablePane'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 |
---|
public AggregateTablePanePersistenceUtils()
Method Detail |
---|
public static void save(AggregateTablePane pane, String fileName) throws ParserConfigurationException, IOException
pane
- the AggregateTablePanefileName
- the file name
ParserConfigurationException
- if a DocumentBuilder cannot be created which satisfies the configuration
IOException
- If the pathname argument is null or any IO errors happenpublic static void save(AggregateTablePane pane, OutputStream out) throws ParserConfigurationException, IOException
pane
- the AggregateTablePaneout
- the output stream
ParserConfigurationException
- if a DocumentBuilder cannot be created which satisfies the configuration
IOException
- If the pathname argument is null or any IO errors happenpublic static Document save(AggregateTablePane pane) throws ParserConfigurationException
pane
- the AggregateTablePane
ParserConfigurationException
- if a DocumentBuilder cannot be created which satisfies the configurationpublic static void save(AggregateTablePane pane, String fileName, PersistenceUtilsCallback.Save callback) throws ParserConfigurationException, IOException
pane
- the AggregateTablePanefileName
- the file namecallback
- The callback which will be called when saving each element to the XML document.
ParserConfigurationException
- if a DocumentBuilder cannot be created which satisfies the configuration
IOException
- If the pathname argument is null or any IO errors happenpublic static void save(AggregateTablePane pane, String fileName, PersistenceUtilsCallback.Save callback, String encoding) throws ParserConfigurationException, IOException
pane
- the AggregateTablePanefileName
- the file namecallback
- the callback which will be called when saving each element to the XML documentencoding
- the encoding choice. It would be UTF-8 in default if you call the method without this parameter.
ParserConfigurationException
- if a DocumentBuilder cannot be created which satisfies the configuration
IOException
- If the pathname argument is null or any IO errors happenpublic static void save(AggregateTablePane pane, OutputStream out, PersistenceUtilsCallback.Save callback) throws ParserConfigurationException, IOException
pane
- the AggregateTablePaneout
- the output streamcallback
- The callback which will be called when saving each element to the XML document.
ParserConfigurationException
- if a DocumentBuilder cannot be created which satisfies the configuration
IOException
- If the pathname argument is null or any IO errors happenpublic static void save(AggregateTablePane pane, OutputStream out, PersistenceUtilsCallback.Save callback, String encoding) throws ParserConfigurationException, IOException
pane
- the AggregateTablePaneout
- the output streamcallback
- 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.
ParserConfigurationException
- if a DocumentBuilder cannot be created which satisfies the configuration
IOException
- If the pathname argument is null or any IO errors happenpublic static Document save(AggregateTablePane pane, PersistenceUtilsCallback.Save callback) throws ParserConfigurationException
pane
- the AggregateTablePanecallback
- The callback which will be called when saving each element to the XML document.
ParserConfigurationException
- if a DocumentBuilder cannot be created which satisfies the configurationpublic static void load(AggregateTablePane pane, InputStream in) throws ParserConfigurationException, SAXException, IOException
pane
- the AggregateTablePanein
- the input stream
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 happenpublic static void load(AggregateTablePane pane, String fileName) throws ParserConfigurationException, SAXException, IOException
pane
- the AggregateTablePanefileName
- the layout file name.
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 happenpublic static void load(AggregateTablePane pane, Document document)
pane
- the AggregateTablePanedocument
- the XML documentpublic static void load(AggregateTablePane pane, InputStream in, PersistenceUtilsCallback.Load callback) throws ParserConfigurationException, SAXException, IOException
pane
- the AggregateTablePanein
- the input streamcallback
- The callback which will be called when loading each element in the XML document.
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 happenpublic static void load(AggregateTablePane pane, String fileName, PersistenceUtilsCallback.Load callback) throws ParserConfigurationException, SAXException, IOException
pane
- the AggregateTablePanefileName
- the layout file name.callback
- The callback which will be called when loading each element in the XML document.
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 happenpublic static void load(AggregateTablePane pane, Document document, PersistenceUtilsCallback.Load callback)
pane
- the AggregateTablePanedocument
- the XML documentcallback
- The callback which will be called when loading each element in the XML document.public static String getVersion(InputStream in) throws ParserConfigurationException, SAXException, IOException
in
- the InputStream
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 happenpublic static String getVersion(String fileName) throws ParserConfigurationException, SAXException, IOException
fileName
- the Document for the layout
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 happenpublic static String getVersion(Document document)
document
- the Document for the layout
public static void isLayoutValid(AggregateTablePane pane, InputStream in) throws ParserConfigurationException, SAXException, IOException, IllegalArgumentException
pane
- the aggregate table pane.in
- the input steam which is an XML layout file.
ParserConfigurationException
- if a DocumentBuilder cannot be created which satisfies the configuration
requested.
SAXException
- if any parse error occurs.
IOException
- if any IO error occurs.
IllegalArgumentException
- if the layout content is invalid such as version number is missing or the field
in the layout is no longer in the pivot table pane.public static void isLayoutValid(AggregateTablePane pane, String fileName) throws ParserConfigurationException, SAXException, IOException, IllegalArgumentException
pane
- the aggregate table pane.fileName
- the file name of an XML layout file.
ParserConfigurationException
- if a DocumentBuilder cannot be created which satisfies the configuration
requested.
SAXException
- if any parse error occurs.
IOException
- if any IO error occurs.
IllegalArgumentException
- if the layout content is invalid such as version number is missing or the field
in the layout is no longer in the pivot table pane.public static void isLayoutValid(AggregateTablePane pane, Document document) throws IllegalArgumentException
pane
- the aggregate table pane.document
- the XML Document
IllegalArgumentException
- if the layout content is invalid such as version number is missing or the field
in the layout is no longer in the pivot table pane.
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |