Commit 6845939f authored by Romain Bioteau's avatar Romain Bioteau Committed by GitHub
Browse files

feat(connector) update to 1.2.0 ldap connector (#2324)

parent d6aafb78
......@@ -15126,5 +15126,8 @@
</operation>
</changes>
</releases>
<releases xmi:id="_ULmOgLX-Eeq4FY7VcpLJTw" date="2020-06-23T11:25:27.494+0200" label="7.11.1-001">
<changes xsi:type="history:MigrationChange" xmi:id="_bGouALX-Eeq4FY7VcpLJTw" migration="org.bonitasoft.studio.migration.custom.migration.connector.UpdateLDAPConnectorVersionTo110"/>
</releases>
<releases xmi:id="_tt2RcE8LEeq0LYHRol2p7w"/>
</history:History>
......@@ -21,7 +21,7 @@
<connector.version.database>2.0.1</connector.version.database>
<connector.version.email>1.2.2</connector.version.email>
<connector.version.google-calendar-v3>1.0.0</connector.version.google-calendar-v3>
<connector.version.ldap>1.1.0</connector.version.ldap>
<connector.version.ldap>1.2.0</connector.version.ldap>
<connector.version.salesforce>1.1.2</connector.version.salesforce>
<connector.version.scripting>1.1.0</connector.version.scripting>
<connector.version.twitter>1.2.0</connector.version.twitter>
......
/**
* Copyright (C) 2020 Bonitasoft S.A.
* BonitaSoft, 32 rue Gustave Eiffel - 38000 Grenoble
* This program is free software: you can redistribute it and/or modify
* 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.migration.custom.migration.connector;
import java.util.List;
import org.bonitasoft.studio.common.ExpressionConstants;
import org.bonitasoft.studio.migration.utils.StringToExpressionConverter;
import org.eclipse.emf.edapt.spi.migration.Instance;
import org.eclipse.emf.edapt.spi.migration.Model;
public class UpdateLDAPConnectorVersionTo110 extends UpdateConnectorDefinitionMigration {
private static final String DEFAULT_PAGE_SIZE = "500";
private static final String LDAP_CONNECTOR_DEFINITION = "ldap";
@Override
protected String getNewDefinitionVersion() {
return "1.1.0";
}
@Override
protected String getOldDefinitionVersion() {
return "1.0.0";
}
@Override
protected boolean shouldUpdateVersion(final String defId) {
return LDAP_CONNECTOR_DEFINITION.equals(defId);
}
@Override
protected void updateConfiguration(Instance connectorConfigInstance, Model model) {
super.updateConfiguration(connectorConfigInstance, model);
List<Instance> parameters = connectorConfigInstance.get("parameters");
Instance pageSizeParameter = model.newInstance("connectorconfiguration.ConnectorParameter");
pageSizeParameter.set("key", "pageSize");
pageSizeParameter.set("expression", StringToExpressionConverter.createExpressionInstance(model,
DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE, Long.class.getName(), ExpressionConstants.CONSTANT_TYPE, true));
parameters.add(pageSizeParameter);
}
}
......@@ -25,9 +25,6 @@ import org.bonitasoft.studio.common.ExpressionConstants;
import org.bonitasoft.studio.connector.model.definition.ConnectorDefinitionPackage;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.edapt.spi.migration.Instance;
import org.eclipse.emf.edapt.spi.migration.Model;
import org.w3c.dom.Document;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment