DashboardPersistenceUtils.load(_documentPane, the layout file saved by DashboardPersistenceUtils);
try {
_documentPane.getGadgetManager().setDisposeGadgetsWhenHidingDashboard(false);
_documentPane.getLayoutPersistence().loadLayoutData();
}
finally {
_documentPane.getGadgetManager().setDisposeGadgetsWhenHidingDashboard(true);
}
|
Method Summary |
static String |
getVersion(Document document)
|
static String |
getVersion(InputStream in)
|
static String |
getVersion(String fileName)
|
static void |
internalLoad(DashboardHolder holder,
Document document,
boolean removeAll)
|
static void |
load(DashboardHolder holder,
Document document)
|
static void |
load(DashboardHolder holder,
Document document,
boolean removeAll)
Loads the dashboard from the document. |
static void |
load(DashboardHolder holder,
InputStream in)
|
static void |
load(DashboardHolder holder,
InputStream in,
boolean removeAll)
|
static void |
load(DashboardHolder holder,
String fileName)
|
static void |
load(DashboardHolder holder,
String fileName,
boolean removeAll)
|
static Document |
save(DashboardHolder holder)
|
static void |
save(DashboardHolder holder,
OutputStream out)
Saves the Dashboard's layout to an output stream. |
static void |
save(DashboardHolder holder,
OutputStream out,
String encoding)
Saves the Dashboard's layout to an output stream. |
static void |
save(DashboardHolder holder,
String fileName)
Saves the Dashboard's layout to a file. |
static void |
save(DashboardHolder holder,
String fileName,
String encoding)
Saves the Dashboard's layout to a file. |
static Document |
saveActiveDashboard(DashboardHolder holder)
|
static Document |
saveDashboard(DashboardHolder holder,
Dashboard dashboard)
|
static void |
saveDashboard(DashboardHolder holder,
Dashboard dashboard,
OutputStream out)
|
static void |
saveDashboard(DashboardHolder holder,
Dashboard dashboard,
OutputStream out,
String encoding)
|
static void |
saveDashboard(DashboardHolder holder,
Dashboard dashboard,
String fileName)
|
static void |
saveDashboard(DashboardHolder holder,
Dashboard dashboard,
String fileName,
String encoding)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DashboardPersistenceUtils
public DashboardPersistenceUtils()
save
public static void save(DashboardHolder holder,
String fileName)
throws ParserConfigurationException,
IOException
- Saves the Dashboard's layout to a file.
- Parameters:
holder - the dashboard holderfileName - 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(DashboardHolder holder,
String fileName,
String encoding)
throws ParserConfigurationException,
IOException
- Saves the Dashboard's layout to a file.
- Parameters:
holder - the dashboard holderfileName - the file nameencoding - 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(DashboardHolder holder,
OutputStream out)
throws ParserConfigurationException,
IOException
- Saves the Dashboard's layout to an output stream.
- Parameters:
holder - the dashboard holderout - 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(DashboardHolder holder,
OutputStream out,
String encoding)
throws ParserConfigurationException,
IOException
- Saves the Dashboard's layout to an output stream.
- Parameters:
holder - the dashboard holderout - the output streamencoding - 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(DashboardHolder holder)
throws ParserConfigurationException
- Throws:
ParserConfigurationException
saveDashboard
public static void saveDashboard(DashboardHolder holder,
Dashboard dashboard,
String fileName)
throws ParserConfigurationException,
IOException
- Throws:
ParserConfigurationException
IOException
saveDashboard
public static void saveDashboard(DashboardHolder holder,
Dashboard dashboard,
OutputStream out)
throws ParserConfigurationException,
IOException
- Throws:
ParserConfigurationException
IOException
saveDashboard
public static void saveDashboard(DashboardHolder holder,
Dashboard dashboard,
String fileName,
String encoding)
throws ParserConfigurationException,
IOException
- Throws:
ParserConfigurationException
IOException
saveDashboard
public static void saveDashboard(DashboardHolder holder,
Dashboard dashboard,
OutputStream out,
String encoding)
throws ParserConfigurationException,
IOException
- Throws:
ParserConfigurationException
IOException
saveActiveDashboard
public static Document saveActiveDashboard(DashboardHolder holder)
throws ParserConfigurationException
- Throws:
ParserConfigurationException
saveDashboard
public static Document saveDashboard(DashboardHolder holder,
Dashboard dashboard)
throws ParserConfigurationException
- Throws:
ParserConfigurationException
load
public static void load(DashboardHolder holder,
InputStream in)
throws ParserConfigurationException,
SAXException,
IOException
- Throws:
ParserConfigurationException
SAXException
IOException
load
public static void load(DashboardHolder holder,
InputStream in,
boolean removeAll)
throws ParserConfigurationException,
SAXException,
IOException
- Throws:
ParserConfigurationException
SAXException
IOException
load
public static void load(DashboardHolder holder,
String fileName)
throws ParserConfigurationException,
SAXException,
IOException
- Throws:
ParserConfigurationException
SAXException
IOException
load
public static void load(DashboardHolder holder,
String fileName,
boolean removeAll)
throws ParserConfigurationException,
SAXException,
IOException
- Throws:
ParserConfigurationException
SAXException
IOException
load
public static void load(DashboardHolder holder,
Document document)
load
public static void load(DashboardHolder holder,
Document document,
boolean removeAll)
- Loads the dashboard from the document.
- Parameters:
holder - the DashboardHolderdocument - the document to be loadedremoveAll - true to remove all dashboards before loading. False to keep the existing dashboard.
internalLoad
public static void internalLoad(DashboardHolder holder,
Document document,
boolean removeAll)
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)