|
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.PivotTablePersistenceUtils
public class PivotTablePersistenceUtils
A helper class that can support persist PivotTablePane's layout to/from xml file.
Constructor Summary | |
---|---|
PivotTablePersistenceUtils()
|
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(PivotTablePane pivot,
Document document)
Checks if the layout is valid. |
static void |
isLayoutValid(PivotTablePane pivot,
InputStream in)
Checks if the layout is valid. |
static void |
isLayoutValid(PivotTablePane pivot,
String fileName)
Checks if the layout is valid. |
static void |
load(PivotTablePane pivot,
Document document)
Loads the layout from xml document. |
static void |
load(PivotTablePane pivot,
Document document,
PersistenceUtilsCallback.Load callback)
Loads the layout from xml document. |
static void |
load(PivotTablePane pivot,
InputStream in)
|
static void |
load(PivotTablePane pivot,
InputStream in,
PersistenceUtilsCallback.Load callback)
Loads the layout from input stream. |
static void |
load(PivotTablePane pivot,
String fileName)
Loads the layout from xml file. |
static void |
load(PivotTablePane pivot,
String fileName,
PersistenceUtilsCallback.Load callback)
Loads the layout from xml file. |
static void |
readPivotTableElement(PivotTablePane pivot,
Document document,
Element element,
PersistenceUtilsCallback.Load callback)
|
static Document |
save(PivotTablePane pivot)
Saves the PivotTablePane's layout to an XML Document |
static void |
save(PivotTablePane pivot,
OutputStream out)
Saves the PivotTablePane's layout to an output stream. |
static void |
save(PivotTablePane pivot,
OutputStream out,
PersistenceUtilsCallback.Save callback)
Saves the PivotTablePane's layout to an output stream. |
static void |
save(PivotTablePane pivot,
OutputStream out,
PersistenceUtilsCallback.Save callback,
String encoding)
Saves the PivotTablePane's layout to an output stream. |
static Document |
save(PivotTablePane pivot,
PersistenceUtilsCallback.Save callback)
Saves the PivotTablePane's layout to an XML Document |
static void |
save(PivotTablePane pivot,
String fileName)
Saves the PivotTablePane's layout to a file. |
static void |
save(PivotTablePane pivot,
String fileName,
PersistenceUtilsCallback.Save callback)
Saves the PivotTablePane's layout to a file. |
static void |
save(PivotTablePane pivot,
String fileName,
PersistenceUtilsCallback.Save callback,
String encoding)
Saves the PivotTablePane's layout to a file. |
static void |
writePivotTableElement(PivotTablePane pivot,
Document document,
Element element,
PersistenceUtilsCallback.Save callback)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PivotTablePersistenceUtils()
Method Detail |
---|
public static void save(PivotTablePane pivot, String fileName) throws ParserConfigurationException, IOException
pivot
- the PivotTablePanefileName
- 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(PivotTablePane pivot, OutputStream out) throws ParserConfigurationException, IOException
pivot
- the PivotTablePaneout
- 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(PivotTablePane pivot) throws ParserConfigurationException
pivot
- the PivotTablePane
ParserConfigurationException
- if a DocumentBuilder cannot be created which satisfies the configurationpublic static void save(PivotTablePane pivot, String fileName, PersistenceUtilsCallback.Save callback) throws ParserConfigurationException, IOException
pivot
- the PivotTablePanefileName
- 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(PivotTablePane pivot, String fileName, PersistenceUtilsCallback.Save callback, String encoding) throws ParserConfigurationException, IOException
pivot
- the PivotTablePanefileName
- 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(PivotTablePane pivot, OutputStream out, PersistenceUtilsCallback.Save callback) throws ParserConfigurationException, IOException
pivot
- the PivotTablePaneout
- 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(PivotTablePane pivot, OutputStream out, PersistenceUtilsCallback.Save callback, String encoding) throws ParserConfigurationException, IOException
pivot
- the PivotTablePaneout
- 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(PivotTablePane pivot, PersistenceUtilsCallback.Save callback) throws ParserConfigurationException
pivot
- the PivotTablePanecallback
- 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 writePivotTableElement(PivotTablePane pivot, Document document, Element element, PersistenceUtilsCallback.Save callback)
public static void load(PivotTablePane pivot, InputStream in) throws ParserConfigurationException, SAXException, IOException
ParserConfigurationException
SAXException
IOException
public static void load(PivotTablePane pivot, String fileName) throws ParserConfigurationException, SAXException, IOException
pivot
- the PivotTablePanefileName
- 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(PivotTablePane pivot, Document document)
pivot
- the PivotTablePanedocument
- the XML documentpublic static void load(PivotTablePane pivot, InputStream in, PersistenceUtilsCallback.Load callback) throws ParserConfigurationException, SAXException, IOException
pivot
- the PivotTablePanein
- 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(PivotTablePane pivot, String fileName, PersistenceUtilsCallback.Load callback) throws ParserConfigurationException, SAXException, IOException
pivot
- the PivotTablePanefileName
- 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(PivotTablePane pivot, Document document, PersistenceUtilsCallback.Load callback)
pivot
- the PivotTablePanedocument
- the XML documentcallback
- The callback which will be called when loading each element in the XML document.public static void readPivotTableElement(PivotTablePane pivot, Document document, Element element, PersistenceUtilsCallback.Load callback)
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(PivotTablePane pivot, InputStream in) throws ParserConfigurationException, SAXException, IOException, IllegalArgumentException
pivot
- the pivot 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(PivotTablePane pivot, String fileName) throws ParserConfigurationException, SAXException, IOException, IllegalArgumentException
pivot
- the pivot 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(PivotTablePane pivot, Document document) throws IllegalArgumentException
pivot
- the pivot table panedocument
- 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 |