Commit fb235e41 authored by Romain Bioteau's avatar Romain Bioteau Committed by Adrien

fix(bdm) add confirmation dialog with detailed info (#297)

closes BS-16161
parent f00b6d79
......@@ -8,6 +8,7 @@ Bundle-Vendor: BonitaSoft S.A.
Bundle-Localization: plugin
Export-Package: org.bonitasoft.studio.businessobject.core.operation,
org.bonitasoft.studio.businessobject.core.repository,
org.bonitasoft.studio.businessobject.i18n;x-friends:="org.bonitasoft.studio.tests",
org.bonitasoft.studio.businessobject.ui,
org.bonitasoft.studio.businessobject.ui.wizard
Require-Bundle: org.bonitasoft.studio.engine;bundle-version="1.0.0",
......
......@@ -150,4 +150,8 @@ cleaningBusinessObjects=Cleaning Business data model...
countQueryInfo=To get paged results from a REST API query on this business object you must create a related count query. For a query named "queryName", create a query named "countForQueryName" that counts the total number of results.
missingCountQuery=You can define a count query {0} to enable paged results from this REST API query.
queryReturnTypeWarning=Only below return types are supported.\nIt is currently not possible to use multiple SELECT expressions like 'SELECT e.name,e.id FROM...'.
modelValidationFailedMsg=Business data model validation has failed with following issues. Fix those issues to be able to save your model.
\ No newline at end of file
modelValidationFailedMsg=Business Data Model validation has failed with following issues. Fix those issues to be able to save your model.
bdmDeployedTitle=Business Data Model deployed
bdmDeployedMessage=The Business Data Model has been deployed successfully.\n\u26A0\uFE0F\uFE0F Open sessions have been closed (portal,applications...). You need to log back in.
doNotShowMeAgain=Don't show me this message again.
bdmDeployDetails=Business Data Model deployment steps:\n\t\u23F8 Pause BPM services (\u2192 closes all open sessions)\n\t\uD83D\uDDF2 Generate Java entities and DAO from model\n\t\uD83D\uDDF2 Create/Update database schema\n\t\u25BA Resume BPM services
\ No newline at end of file
......@@ -5,18 +5,17 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2.0 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.bonitasoft.studio.businessobject.ui.handler;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
......@@ -24,7 +23,6 @@ import org.bonitasoft.studio.businessobject.core.repository.BusinessObjectModelR
import org.bonitasoft.studio.businessobject.ui.wizard.ManageBusinessDataModelWizard;
import org.bonitasoft.studio.common.jface.CustomWizardDialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
......@@ -35,7 +33,6 @@ import org.mockito.runners.MockitoJUnitRunner;
/**
* @author Romain Bioteau
*
*/
@RunWith(MockitoJUnitRunner.class)
public class ManageBusinessObjectHandlerTest {
......@@ -61,19 +58,14 @@ public class ManageBusinessObjectHandlerTest {
Mockito.doReturn(wizard).when(handlerUnderTest).createWizard();
when(wizardDialog.open()).thenReturn(IDialogConstants.OK_ID);
Mockito.doReturn(wizardDialog).when(handlerUnderTest).createWizardDialog(wizard, IDialogConstants.FINISH_LABEL);
}
/**
* @throws java.lang.Exception
*/
@After
public void tearDown() throws Exception {
doNothing().when(handlerUnderTest).openSuccessDialog();
}
@Test
public void shouldExecute_SaveArtifactWithEditorContent() throws Exception {
assertThat(handlerUnderTest.execute(null)).isEqualTo(true);
assertThat(handlerUnderTest.execute(null)).isEqualTo(IDialogConstants.OK_ID);
verify(wizardDialog).open();
verify(handlerUnderTest).openSuccessDialog();
}
}
......@@ -320,9 +320,13 @@ public class Messages extends NLS {
public static String missingCountQuery;
public static String queryReturnTypeWarning;
public static String queryReturnTypeWarning;
public static String modelValidationFailedMsg;
public static String modelValidationFailedMsg;
public static String bdmDeployedTitle;
public static String bdmDeployedMessage;
public static String doNotShowMeAgain;
public static String bdmDeployDetails;
private Messages() {
}
......
......@@ -14,14 +14,19 @@
*/
package org.bonitasoft.studio.businessobject.ui.handler;
import org.bonitasoft.studio.businessobject.BusinessObjectPlugin;
import org.bonitasoft.studio.businessobject.core.repository.BusinessObjectModelFileStore;
import org.bonitasoft.studio.businessobject.i18n.Messages;
import org.bonitasoft.studio.businessobject.ui.wizard.ManageBusinessDataModelWizard;
import org.bonitasoft.studio.common.jface.CustomWizardDialog;
import org.bonitasoft.studio.common.jface.MessageDialogWithPrompt;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.ToolBar;
......@@ -29,10 +34,11 @@ import org.eclipse.swt.widgets.ToolItem;
/**
* @author Romain Bioteau
*
*/
public class ManageBusinessObjectHandler extends AbstractBusinessObjectHandler {
private static final String DO_NOT_SHOW_INSTALL_MESSAGE_DIALOG = "DO_NOT_SHOW_INSTALL_MESSAGE_DIALOG";
/*
* (non-Javadoc)
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
......@@ -41,8 +47,27 @@ public class ManageBusinessObjectHandler extends AbstractBusinessObjectHandler {
public Object execute(final ExecutionEvent event) throws ExecutionException {
final ManageBusinessDataModelWizard newBusinessDataModelWizard = createWizard();
final CustomWizardDialog dialog = createWizardDialog(newBusinessDataModelWizard, IDialogConstants.FINISH_LABEL);
if (dialog.open() == IDialogConstants.OK_ID) {
openSuccessDialog();
return IDialogConstants.OK_ID;
}
return IDialogConstants.CANCEL_ID;
}
return dialog.open() == IDialogConstants.OK_ID;
protected void openSuccessDialog() {
final IPreferenceStore preferenceStore = BusinessObjectPlugin.getDefault().getPreferenceStore();
if (!preferenceStore.getBoolean(DO_NOT_SHOW_INSTALL_MESSAGE_DIALOG)) {
MessageDialogWithPrompt.openWithDetails(MessageDialog.INFORMATION,
getShell(),
Messages.bdmDeployedTitle,
Messages.bdmDeployedMessage,
Messages.doNotShowMeAgain,
Messages.bdmDeployDetails,
false,
preferenceStore,
DO_NOT_SHOW_INSTALL_MESSAGE_DIALOG,
SWT.NONE);
}
}
@Override
......
......@@ -30,7 +30,6 @@ import org.bonitasoft.engine.bdm.validator.ValidationStatus;
import org.bonitasoft.studio.businessobject.core.operation.DeployBDMOperation;
import org.bonitasoft.studio.businessobject.core.repository.BusinessObjectModelFileStore;
import org.bonitasoft.studio.businessobject.i18n.Messages;
import org.bonitasoft.studio.common.NamingUtils;
import org.bonitasoft.studio.common.jface.BonitaErrorDialog;
import org.bonitasoft.studio.common.jface.MessageDialogWithPrompt;
import org.bonitasoft.studio.common.jface.dialog.ProblemsDialog;
......@@ -38,7 +37,6 @@ import org.bonitasoft.studio.common.jface.dialog.TypedLabelProvider;
import org.bonitasoft.studio.common.log.BonitaStudioLog;
import org.bonitasoft.studio.engine.EnginePlugin;
import org.bonitasoft.studio.engine.preferences.EnginePreferenceConstants;
import org.bonitasoft.studio.engine.ui.dialog.ProcessEnablementProblemsDialog;
import org.bonitasoft.studio.pics.Pics;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.dialogs.Dialog;
......@@ -99,9 +97,11 @@ public class ManageBusinessDataModelWizard extends Wizard {
boolean confirm = true;
if (!newBdm) {
final IPreferenceStore preferenceStore = getPreferenceStore();
final MessageDialogWithToggle confirmDialog = MessageDialogWithPrompt.openOkCancelConfirm(getShell(), Messages.bdmCompatibilityTitle,
final MessageDialogWithToggle confirmDialog = MessageDialogWithPrompt.openOkCancelConfirm(getShell(),
Messages.bdmCompatibilityTitle,
Messages.bdmCompatibilityMsg,
Messages.clearExistingBusinessData, preferenceStore.getBoolean(EnginePreferenceConstants.DROP_BUSINESS_DATA_DB_ON_INSTALL),
Messages.clearExistingBusinessData,
preferenceStore.getBoolean(EnginePreferenceConstants.DROP_BUSINESS_DATA_DB_ON_INSTALL),
preferenceStore,
EnginePreferenceConstants.DROP_BUSINESS_DATA_DB_ON_INSTALL);
confirm = confirmDialog.getReturnCode() == Dialog.OK;
......@@ -116,7 +116,6 @@ public class ManageBusinessDataModelWizard extends Wizard {
return false;
}
private boolean validateAndSaveBDM() {
try {
getContainer().run(true, false, new IRunnableWithProgress() {
......@@ -127,14 +126,15 @@ public class ManageBusinessDataModelWizard extends Wizard {
fStore.delete();
} else {
monitor.beginTask(Messages.validatingBDM, IProgressMonitor.UNKNOWN);
final ValidationStatus validate = new BusinessObjectModelValidator().validate(businessObjectModel);
if(!validate.getErrors().isEmpty()){
final ValidationStatus validate = new BusinessObjectModelValidator().validate(businessObjectModel);
if (!validate.getErrors().isEmpty()) {
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
new ProblemsDialog<String>(getShell(), Messages.modelValidationFailedTitle,Messages.modelValidationFailedMsg, MessageDialog.ERROR, new String[]{IDialogConstants.OK_LABEL}) {
new ProblemsDialog<String>(getShell(), Messages.modelValidationFailedTitle,
Messages.modelValidationFailedMsg, MessageDialog.ERROR,
new String[] { IDialogConstants.OK_LABEL }) {
@Override
protected TypedLabelProvider<String> getTypedLabelProvider() {
......@@ -160,7 +160,7 @@ public class ManageBusinessDataModelWizard extends Wizard {
}
});
throw new InterruptedException();
}else{
} else {
monitor.setTaskName(Messages.saving);
fStore.save(businessObjectModel);
monitor.done();
......@@ -169,7 +169,8 @@ public class ManageBusinessDataModelWizard extends Wizard {
}
});
} catch (final InvocationTargetException e) {
MessageDialog.openError(Display.getDefault().getActiveShell(), Messages.modelValidationFailedTitle, e.getCause().getMessage());
MessageDialog.openError(Display.getDefault().getActiveShell(), Messages.modelValidationFailedTitle,
e.getCause().getMessage());
BonitaStudioLog.error(e);
return false;
} catch (final InterruptedException e) {
......@@ -188,9 +189,10 @@ public class ManageBusinessDataModelWizard extends Wizard {
}
});
} catch (final InvocationTargetException e) {
new BonitaErrorDialog(Display.getDefault().getActiveShell(), Messages.installFailedTitle, Messages.installFailedMessage,
new BonitaErrorDialog(Display.getDefault().getActiveShell(), Messages.installFailedTitle,
Messages.installFailedMessage,
handleTargetExceptionStacktrace(e))
.open();
.open();
return false;
} catch (final InterruptedException e) {
return false;
......@@ -210,7 +212,8 @@ public class ManageBusinessDataModelWizard extends Wizard {
}
}
if (index > -1) {
targetException.setStackTrace(Arrays.copyOfRange(targetException.getStackTrace(), index, targetException.getStackTrace().length));
targetException.setStackTrace(
Arrays.copyOfRange(targetException.getStackTrace(), index, targetException.getStackTrace().length));
}
return targetException;
}
......@@ -219,9 +222,11 @@ public class ManageBusinessDataModelWizard extends Wizard {
return EnginePlugin.getDefault().getPreferenceStore();
}
protected void validateUniqueConstraint(final UniqueConstraint uc, final BusinessObject bo) throws InvocationTargetException {
protected void validateUniqueConstraint(final UniqueConstraint uc, final BusinessObject bo)
throws InvocationTargetException {
if (uc.getFieldNames() == null || uc.getFieldNames().isEmpty()) {
throw new InvocationTargetException(new Exception(Messages.bind(Messages.atLeastOneAttributeShouldBelongToConstraint, uc.getName())));
throw new InvocationTargetException(
new Exception(Messages.bind(Messages.atLeastOneAttributeShouldBelongToConstraint, uc.getName())));
}
for (final String fName : uc.getFieldNames()) {
boolean exists = false;
......@@ -232,14 +237,16 @@ public class ManageBusinessDataModelWizard extends Wizard {
}
}
if (!exists) {
throw new InvocationTargetException(new Exception(Messages.bind(Messages.attributeInConstraintNotExists, fName, uc.getName())));
throw new InvocationTargetException(
new Exception(Messages.bind(Messages.attributeInConstraintNotExists, fName, uc.getName())));
}
}
}
protected void validateIndex(final Index index, final BusinessObject bo) throws InvocationTargetException {
if (index.getFieldNames() == null || index.getFieldNames().isEmpty()) {
throw new InvocationTargetException(new Exception(Messages.bind(Messages.atLeastOneAttributeShouldBelongToIndex, index.getName())));
throw new InvocationTargetException(
new Exception(Messages.bind(Messages.atLeastOneAttributeShouldBelongToIndex, index.getName())));
}
for (final String fName : index.getFieldNames()) {
boolean exists = false;
......@@ -250,7 +257,8 @@ public class ManageBusinessDataModelWizard extends Wizard {
}
}
if (!exists) {
throw new InvocationTargetException(new Exception(Messages.bind(Messages.attributeInIndexNotExists, fName, index.getName())));
throw new InvocationTargetException(
new Exception(Messages.bind(Messages.attributeInIndexNotExists, fName, index.getName())));
}
}
}
......
......@@ -5,30 +5,38 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2.0 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.bonitasoft.studio.common.jface;
import org.bonitasoft.studio.common.Messages;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.forms.events.ExpansionAdapter;
import org.eclipse.ui.forms.events.ExpansionEvent;
import org.eclipse.ui.forms.widgets.Section;
/**
* @author Romain Bioteau
*
*/
public class MessageDialogWithPrompt extends MessageDialogWithToggle {
private String detailsMessage;
public MessageDialogWithPrompt(Shell parentShell, String dialogTitle,
Image image, String message, int dialogImageType,
String[] dialogButtonLabels, int defaultIndex,
......@@ -46,7 +54,7 @@ public class MessageDialogWithPrompt extends MessageDialogWithToggle {
public static MessageDialogWithPrompt open(int kind, Shell parent, String title,
String message, String toggleMessage, boolean toggleState,
IPreferenceStore store, String key, int style) {
MessageDialogWithPrompt dialog = new MessageDialogWithPrompt(parent,
final MessageDialogWithPrompt dialog = new MessageDialogWithPrompt(parent,
title, null, // accept the default window icon
message, kind, getButtonLabelsFor(kind), 0,
toggleMessage, toggleState);
......@@ -58,6 +66,33 @@ public class MessageDialogWithPrompt extends MessageDialogWithToggle {
return dialog;
}
public static MessageDialogWithPrompt openWithDetails(int kind,
Shell parent,
String title,
String message,
String toggleMessage,
String detailMessage,
boolean toggleState,
IPreferenceStore store,
String key,
int style) {
final MessageDialogWithPrompt dialog = new MessageDialogWithPrompt(parent,
title, null, // accept the default window icon
message, kind, getButtonLabelsFor(kind), 0,
toggleMessage, toggleState);
style &= SWT.SHEET;
dialog.setShellStyle(dialog.getShellStyle() | style);
dialog.setPrefStore(store);
dialog.setPrefKey(key);
dialog.setDetails(detailMessage);
dialog.open();
return dialog;
}
public void setDetails(String detailsMessage) {
this.detailsMessage = detailsMessage;
}
private static String[] getButtonLabelsFor(int kind) {
String[] dialogButtonLabels;
switch (kind) {
......@@ -90,12 +125,13 @@ public class MessageDialogWithPrompt extends MessageDialogWithToggle {
return dialogButtonLabels;
}
@Override
protected void buttonPressed(int buttonId) {
super.buttonPressed(buttonId);
boolean toggleState = getToggleState();
IPreferenceStore prefStore = getPrefStore();
String prefKey = getPrefKey();
final boolean toggleState = getToggleState();
final IPreferenceStore prefStore = getPrefStore();
final String prefKey = getPrefKey();
if (buttonId != IDialogConstants.CANCEL_ID
&& prefStore != null && prefKey != null) {
switch (buttonId) {
......@@ -112,4 +148,50 @@ public class MessageDialogWithPrompt extends MessageDialogWithToggle {
}
}
/*
* (non-Javadoc)
* @see org.eclipse.jface.dialogs.MessageDialog#createCustomArea(org.eclipse.swt.widgets.Composite)
*/
@Override
protected Control createCustomArea(final Composite parent) {
if (detailsMessage != null) {
parent.setLayout(GridLayoutFactory.swtDefaults().numColumns(2).create());
//Above Image filler
final Image image = getImage();
if (image != null) {
final Label filler = new Label(parent, SWT.NULL);
filler.setImage(image);
GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.BEGINNING)
.applyTo(filler);
filler.setVisible(false);
}
final Section section = new Section(parent,
Section.TWISTIE | Section.NO_TITLE_FOCUS_BOX | Section.CLIENT_INDENT);
section.setText(Messages.moreDetails);
section.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
final Composite client = new Composite(section, SWT.NONE);
client.setLayoutData(GridDataFactory.fillDefaults().create());
client.setLayout(GridLayoutFactory.fillDefaults().create());
final Label detailsLabel = new Label(client, SWT.NONE);
detailsLabel.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
detailsLabel.setText(detailsMessage);
section.setClient(client);
section.addExpansionListener(new ExpansionAdapter() {
/*
* (non-Javadoc)
* @see org.eclipse.ui.forms.events.ExpansionAdapter#expansionStateChanged(org.eclipse.ui.forms.events.ExpansionEvent)
*/
@Override
public void expansionStateChanged(ExpansionEvent e) {
parent.getShell().pack();
}
});
return section;
}
return super.createCustomArea(parent);
}
}
......@@ -228,7 +228,8 @@ public class BOSEngineManager {
}
protected void executePostStartupContributions() throws Exception {
final IConfigurationElement[] elements = BonitaStudioExtensionRegistryManager.getInstance().getConfigurationElements(POSTSTARTUP_CONTIBUTION_ID);
final IConfigurationElement[] elements = BonitaStudioExtensionRegistryManager.getInstance()
.getConfigurationElements(POSTSTARTUP_CONTIBUTION_ID);
IEngineAction contrib = null;
for (final IConfigurationElement elem : elements) {
try {
......@@ -269,22 +270,25 @@ public class BOSEngineManager {
return TenantAPIAccessor.getLoginAPI();
}
public APISession loginDefaultTenant(final IProgressMonitor monitor) throws LoginException, BonitaHomeNotSetException, ServerAPIException,
public APISession loginDefaultTenant(final IProgressMonitor monitor)
throws LoginException, BonitaHomeNotSetException, ServerAPIException,
UnknownAPITypeException {
return loginTenant(BONITA_TECHNICAL_USER, BONITA_TECHNICAL_USER_PASSWORD, false, monitor);
}
public APISession loginTenant(final String login, final String password, final IProgressMonitor monitor) throws LoginException, BonitaHomeNotSetException,
public APISession loginTenant(final String login, final String password, final IProgressMonitor monitor)
throws LoginException, BonitaHomeNotSetException,
ServerAPIException, UnknownAPITypeException {
return loginTenant(login, password, true, monitor);
}
protected APISession loginTenant(final String login, final String password, final boolean waitForOrganization, final IProgressMonitor monitor)
protected APISession loginTenant(final String login, final String password, final boolean waitForOrganization,
final IProgressMonitor monitor)
throws LoginException,
BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException {
if (!isRunning()) {
if (monitor != null) {
monitor.subTask(Messages.waitingForEngineToStart);
monitor.setTaskName(Messages.waitingForEngineToStart);
}
start();
}
......@@ -298,6 +302,9 @@ public class BOSEngineManager {
}
}
if (monitor != null) {
monitor.done();
}
return session;
}
......@@ -332,22 +339,26 @@ public class BOSEngineManager {
return new NonLockingJarFileClassLoader("Bonita Engine CLassloader", urls.toArray(new URL[] {}));
}
public IdentityAPI getIdentityAPI(final APISession session) throws InvalidSessionException, BonitaHomeNotSetException, ServerAPIException,
public IdentityAPI getIdentityAPI(final APISession session)
throws InvalidSessionException, BonitaHomeNotSetException, ServerAPIException,
UnknownAPITypeException {
return TenantAPIAccessor.getIdentityAPI(session);
}
public CommandAPI getCommandAPI(final APISession session) throws InvalidSessionException, BonitaHomeNotSetException, ServerAPIException,
public CommandAPI getCommandAPI(final APISession session)
throws InvalidSessionException, BonitaHomeNotSetException, ServerAPIException,
UnknownAPITypeException {
return TenantAPIAccessor.getCommandAPI(session);
}
public ProfileAPI getProfileAPI(final APISession session) throws InvalidSessionException, BonitaHomeNotSetException, ServerAPIException,
public ProfileAPI getProfileAPI(final APISession session)
throws InvalidSessionException, BonitaHomeNotSetException, ServerAPIException,
UnknownAPITypeException {
return TenantAPIAccessor.getProfileAPI(session);
}
public PageAPI getPageAPI(final APISession session) throws BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException {
public PageAPI getPageAPI(final APISession session)
throws BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException {
return TenantAPIAccessor.getCustomPageAPI(session);
}
......@@ -358,35 +369,44 @@ public class BOSEngineManager {
}
public PlatformSession loginPlatform()
throws InvalidPlatformCredentialsException, PlatformLoginException, BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException {
throws InvalidPlatformCredentialsException, PlatformLoginException, BonitaHomeNotSetException,
ServerAPIException, UnknownAPITypeException {
return PlatformAPIAccessor.getPlatformLoginAPI().login(PLATFORM_USER, PLATFORM_PASSWORD);
}
public void logoutPlatform(PlatformSession session)
throws PlatformLogoutException, SessionNotFoundException, BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException {
throws PlatformLogoutException, SessionNotFoundException, BonitaHomeNotSetException, ServerAPIException,
UnknownAPITypeException {
PlatformAPIAccessor.getPlatformLoginAPI().logout(session);
}
public PlatformAPI getPlatformAPI(PlatformSession session) throws BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException {
public PlatformAPI getPlatformAPI(PlatformSession session)
throws BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException {
return PlatformAPIAccessor.getPlatformAPI(session);
}
public APISession createSession(final AbstractProcess process, final String configurationId, final IProgressMonitor monitor) throws Exception {