|
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.AggregateTablePersistenceUtils
public class AggregateTablePersistenceUtils
A helper class that can support persist AggregateTable's layout to/from xml file.
Constructor Summary | |
---|---|
AggregateTablePersistenceUtils()
|
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(AggregateTable table,
Document document)
Checks if the layout is valid. |
static void |
isLayoutValid(AggregateTable table,
InputStream in)
Checks if the layout is valid. |
static void |
isLayoutValid(AggregateTable table,
String fileName)
Checks if the layout is valid. |
static void |
load(AggregateTable table,
Document document)
Loads the layout from xml document. |
static void |
load(AggregateTable table,
Document document,
PersistenceUtilsCallback.Load callback)
Loads the layout from xml document. |
static void |
load(AggregateTable table,
InputStream in)
Loads the AggregateTable's layout from an input stream. |
static void |
load(AggregateTable table,
InputStream in,
PersistenceUtilsCallback.Load callback)
Loads the layout from input stream. |
static void |
load(AggregateTable table,
String fileName)
Loads the layout from xml file. |
static void |
load(AggregateTable table,
String fileName,
PersistenceUtilsCallback.Load callback)
Loads the layout from xml file. |
static Document |
save(AggregateTable table)
Saves the AggregateTable's layout to an XML Document |
static void |
save(AggregateTable table,
OutputStream out)
Saves the AggregateTable's layout to an output stream. |
static void |
save(AggregateTable table,
OutputStream out,
PersistenceUtilsCallback.Save callback)
Saves the AggregateTable's layout to an output stream. |
static void |
save(AggregateTable table,
OutputStream out,
PersistenceUtilsCallback.Save callback,
String encoding)
Saves the AggregateTable's layout to an output stream. |
static Document |
save(AggregateTable table,
PersistenceUtilsCallback.Save callback)
Saves the AggregateTable's layout to an XML Document |
static void |
save(AggregateTable table,
String fileName)
Saves the AggregateTable's layout to a file. |
static void |
save(AggregateTable table,
String fileName,
PersistenceUtilsCallback.Save callback)
Saves the AggregateTable's layout to a file. |
static void |
save(AggregateTable table,
String fileName,
PersistenceUtilsCallback.Save callback,
String encoding)
Saves the AggregateTable'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 AggregateTablePersistenceUtils()
Method Detail |
---|
public static void save(AggregateTable table, String fileName) throws ParserConfigurationException, IOException
table
- the AggregateTablefileName
- 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(AggregateTable table, OutputStream out) throws ParserConfigurationException, IOException
table
- the AggregateTableout
- 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(AggregateTable table) throws ParserConfigurationException
table
- the AggregateTable
ParserConfigurationException
- if a DocumentBuilder cannot be created which satisfies the configurationpublic static void save(AggregateTable table, String fileName, PersistenceUtilsCallback.Save callback) throws ParserConfigurationException, IOException
table
- the AggregateTablefileName
- 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(AggregateTable table, String fileName, PersistenceUtilsCallback.Save callback, String encoding) throws ParserConfigurationException, IOException
table
- the AggregateTablefileName
- 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(AggregateTable table, OutputStream out, PersistenceUtilsCallback.Save callback) throws ParserConfigurationException, IOException
table
- the AggregateTableout
- 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(AggregateTable table, OutputStream out, PersistenceUtilsCallback.Save callback, String encoding) throws ParserConfigurationException, IOException
table
- the AggregateTableout
- 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(AggregateTable table, PersistenceUtilsCallback.Save callback) throws ParserConfigurationException
table
- the AggregateTablecallback
- 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(AggregateTable table, InputStream in) throws ParserConfigurationException, SAXException, IOException
table
- the AggregateTablein
- 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(AggregateTable table, String fileName) throws ParserConfigurationException, SAXException, IOException
table
- the AggregateTablefileName
- 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(AggregateTable table, Document document)
table
- the AggregateTabledocument
- the XML documentpublic static void load(AggregateTable table, InputStream in, PersistenceUtilsCallback.Load callback) throws ParserConfigurationException, SAXException, IOException
table
- the AggregateTablein
- 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(AggregateTable table, String fileName, PersistenceUtilsCallback.Load callback) throws ParserConfigurationException, SAXException, IOException
table
- the AggregateTablefileName
- 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(AggregateTable table, Document document, PersistenceUtilsCallback.Load callback)
table
- the AggregateTabledocument
- 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(AggregateTable table, InputStream in) throws ParserConfigurationException, SAXException, IOException, IllegalArgumentException
table
- the aggregate table.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(AggregateTable table, String fileName) throws ParserConfigurationException, SAXException, IOException, IllegalArgumentException
table
- the aggregate table.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(AggregateTable table, Document document) throws IllegalArgumentException
table
- the aggregate table.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 |