{
try {
ConfigForm configForm = new ConfigForm(configFile);
configForm.setVisible(true);
} catch (OKMException ex) {
new ErrorForm(ex);
}
return;
}
if ( aURL.Path.compareTo("edit") == 0 )
{
try {
ConfigBean configBean = configFile.read();
ExplorerForm explorerForm = new ExplorerForm(documentFile,imageUtil);
explorerForm.initServices(configFile.read().getHost());
explorerForm.startUp(m_xFrame, configBean.getUser(), configBean.getPassword());
explorerForm.setVisible(true);
} catch (OKMException ex) {
new ErrorForm(ex);
}
return;
}
if ( aURL.Path.compareTo("add") == 0 )
{
String documentPath = getCurrentDocumentPath();
if (documentPath!=null && !documentPath.equals("")) {
try {
ConfigBean configBean = configFile.read();
TreeForm treeForm = new TreeForm(imageUtil);
treeForm.initServices(configFile.read().getHost());
treeForm.startUp(configBean.getUser(), configBean.getPassword(),documentPath);
treeForm.setVisible(true);
} catch (OKMException ex) {
new ErrorForm(ex);
}
} else {
new ErrorForm(new OKMException(lang.getString("main.error.save.file")));
}
return;
}
if ( aURL.Path.compareTo("checkin") == 0 )
{
try {
String documentPath = getCurrentDocumentPath();
if (documentPath != null && !documentPath.equals("")) {
if (documentFile.isOpenKMDocument(documentPath)) {
new ConfirmationForm("main.question.update",ConfirmationForm.OPERATION_CHECKIN, documentPath);
}
}
} catch (OKMException ex) {
waitWindow.setVisible(false);
new ErrorForm(ex);
}
return;
}
if ( aURL.Path.compareTo("cancelcheckin") == 0 )
{
try {
String documentPath = getCurrentDocumentPath();
if (documentPath != null && !documentPath.equals("")) {
if (documentFile.isOpenKMDocument(documentPath)) {
new ConfirmationForm("main.question.cancel.edit",ConfirmationForm.OPERATION_CANCELCHECKIN, documentPath);
}
}
} catch (OKMException ex) {
waitWindow.setVisible(false);
new ErrorForm(ex);
}
return;
}
if ( aURL.Path.compareTo("help") == 0 )
{
try {
XMultiComponentFactory xFact = m_xContext.getServiceManager();
Object xObject = xFact.createInstanceWithContext("com.sun.star.system.SystemShellExecute", m_xContext);
XSystemShellExecute shell = (XSystemShellExecute) UnoRuntime.queryInterface( XSystemShellExecute.class, xObject );
shell.execute("http://www.openkm.com", "", 0);
} catch (Exception ex) {
new ErrorForm(ex);
}
return;
}
}
} catch (OKMException ex) {
new ErrorForm(ex);
}
}