Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
410 changes: 205 additions & 205 deletions README.md

Large diffs are not rendered by default.

47 changes: 36 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>org.lsc.plugins.connectors</groupId>
<artifactId>executable</artifactId>
<name>LDAP Synchronization Connector Executable connector</name>
<version>1.4-SNAPSHOT</version>
<version>1.4</version>
<description>
This project provides a Executable source / destination plugin for LSC
</description>
Expand Down Expand Up @@ -92,9 +92,9 @@
</executions>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.15.3</version>
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-maven-plugin</artifactId>
<version>4.0.16</version>
<executions>
<execution>
<goals>
Expand All @@ -103,25 +103,45 @@
</execution>
</executions>
<configuration>
<episode>false</episode>
<episode>true</episode>
<generateDirectory>src/main/java</generateDirectory>
<generatePackage>org.lsc.plugins.connectors.executable.generated</generatePackage>
<bindingDirectory>src/main/resources/schemas</bindingDirectory>
<bindingIncludes>
<bindingInclude>*.episode</bindingInclude>
</bindingIncludes>
<schemaDirectory>src/main/resources/schemas</schemaDirectory>
<schemaIncludes>
<include>lsc-executable-1.0.xsd</include>
</schemaIncludes>
<extension>true</extension>
<args>
<arg>-Xdefault-value</arg>
<arg>-Xannotate</arg>
</args>
<cleanPackageDirectories>false</cleanPackageDirectories>
<cleanPackageDirectories>true</cleanPackageDirectories>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-plugin-annotate</artifactId>
<version>4.0.16</version>
</plugin>
</plugins>
</configuration>
<dependencies>
<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-default-value</artifactId>
<version>1.1</version>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>4.0.9</version>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.5</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>4.0.9</version>
</dependency>
</dependencies>
</plugin>
Expand Down Expand Up @@ -392,9 +412,14 @@
<dependency>
<groupId>org.lsc</groupId>
<artifactId>lsc-core</artifactId>
<version>2.2</version>
<version>2.3</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.sleepycat</groupId>
<artifactId>je</artifactId>
<version>18.3.12</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.directory.api.ldap.model.ldif.LdifEntry;
import org.apache.directory.api.ldap.model.ldif.LdifReader;
import org.lsc.LscDatasets;
import org.lsc.Task;
import org.lsc.beans.IBean;
import org.lsc.configuration.ConnectionType;
import org.lsc.exception.LscServiceException;
Expand Down Expand Up @@ -62,7 +63,7 @@ public abstract class AbstractExecutableLdifService implements IService {
* @return The bean, or null if not found
* @throws LscServiceException May throw a {@link LscServiceException} if there is any error with LDIF conversion
*/
public IBean getBean(String pivotName, LscDatasets pivotAttributes, boolean fromSameService) throws LscServiceException {
public IBean getBean(Task task, String pivotName, LscDatasets pivotAttributes, boolean fromSameService) throws LscServiceException {
String output = executeWithReturn(getParameters(getScript, pivotName), getEnv(), toLdif(pivotAttributes));
Collection<IBean> entries = fromLdif(output);
if (entries.size() != 1) {
Expand All @@ -79,7 +80,7 @@ public IBean getBean(String pivotName, LscDatasets pivotAttributes, boolean from
* attribute names and values (never null)
* @throws LscServiceException
*/
public Map<String, LscDatasets> getListPivots() throws LscServiceException {
public Map<String, LscDatasets> getListPivots(Task task) throws LscServiceException {
Map<String, LscDatasets> map = null;
String output = executeWithReturn(getParameters(listScript), getEnv(), "");
Collection<IBean> beans = fromLdif(output);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@

import org.lsc.LscDatasets;
import org.lsc.LscModifications;
import org.lsc.Task;
import org.lsc.beans.IBean;
import org.lsc.configuration.ConnectionType;
import org.lsc.configuration.KeysValuesMap.Entry;
Expand Down Expand Up @@ -154,8 +155,8 @@ public ExecutableLdapDestinationService(TaskType task) throws LscServiceConfigur
* directory, or if more than one object would be returned.
*/
@Override
public IBean getBean(String pivotName, LscDatasets pivotAttributes, boolean fromSameService) throws LscServiceException {
return sjds.getBean(pivotName, pivotAttributes, fromSameService);
public IBean getBean(Task task, String pivotName, LscDatasets pivotAttributes, boolean fromSameService) throws LscServiceException {
return sjds.getBean(task, pivotName, pivotAttributes, fromSameService);
}

/**
Expand All @@ -166,8 +167,8 @@ public IBean getBean(String pivotName, LscDatasets pivotAttributes, boolean from
* @throws LscServiceException
*/
@Override
public Map<String, LscDatasets> getListPivots() throws LscServiceException {
return sjds.getListPivots();
public Map<String, LscDatasets> getListPivots(Task task) throws LscServiceException {
return sjds.getListPivots(task);
}

@Override
Expand Down Expand Up @@ -209,4 +210,4 @@ public Collection<Class<? extends ConnectionType>> getSupportedConnectionType()
public void close() throws IOException {
sjds.close();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@
No new version is released because it has never been implemented before and won't break any existing and functional configuration
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://lsc-project.org/XSD/lsc-core-2.2.xsd"
targetNamespace="http://lsc-project.org/XSD/lsc-core-2.2.xsd"
xmlns="http://lsc-project.org/XSD/lsc-core-2.3.xsd"
targetNamespace="http://lsc-project.org/XSD/lsc-core-2.3.xsd"
elementFormDefault="qualified"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
jaxb:version="2.0">
xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
jaxb:version="3.0"
xmlns:annox="urn:jaxb.jvnet.org:annox"
jaxb:extensionBindingPrefixes="annox">

<!-- <xsd:annotation> <xsd:documentation> This schema specifies the configuration
options for LSC synchronizations tasks. </xsd:documentation> </xsd:annotation> -->
Expand Down Expand Up @@ -322,12 +324,56 @@
<xsd:element name="fetchedAttributes" type="valuesType"
minOccurs="0" />
<xsd:choice>
<xsd:element name="getAllFilter" type="xsd:string" />
<xsd:element name="allFilter" type="xsd:string" />
<xsd:element name="allEntriesFilter" type="xsd:string" />

<!-- @Deprecated in 2.3: getAllFilter -->
<xsd:element name="getAllFilter" type="xsd:string">
<xsd:annotation>
<xsd:appinfo>
<annox:annotate target="setter">@java.lang.Deprecated</annox:annotate>
<annox:annotate target="setter-parameter">@java.lang.Deprecated</annox:annotate>
<annox:annotate target="getter">@java.lang.Deprecated</annox:annotate>
<annox:annotate target="field">@java.lang.Deprecated</annox:annotate>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<!-- @Deprecated in 2.3: allFilter -->
<xsd:element name="allFilter" type="xsd:string">
<xsd:annotation>
<xsd:appinfo>
<annox:annotate target="setter">@java.lang.Deprecated</annox:annotate>
<annox:annotate target="setter-parameter">@java.lang.Deprecated</annox:annotate>
<annox:annotate target="getter">@java.lang.Deprecated</annox:annotate>
<annox:annotate target="field">@java.lang.Deprecated</annox:annotate>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:choice>
<xsd:choice>
<xsd:element name="getOneFilter" type="xsd:string" />
<xsd:element name="oneFilter" type="xsd:string" />
<xsd:element name="oneEntryFilter" type="xsd:string" />

<!-- @Deprecated in 2.3: getOneFilter -->
<xsd:element name="getOneFilter" type="xsd:string">
<xsd:annotation>
<xsd:appinfo>
<annox:annotate target="setter">@java.lang.Deprecated</annox:annotate>
<annox:annotate target="setter-parameter">@java.lang.Deprecated</annox:annotate>
<annox:annotate target="getter">@java.lang.Deprecated</annox:annotate>
<annox:annotate target="field">@java.lang.Deprecated</annox:annotate>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<!-- @Deprecated in 2.3: oneFilter -->
<xsd:element name="oneFilter" type="xsd:string">
<xsd:annotation>
<xsd:appinfo>
<annox:annotate target="setter">@java.lang.Deprecated</annox:annotate>
<annox:annotate target="setter-parameter">@java.lang.Deprecated</annox:annotate>
<annox:annotate target="getter">@java.lang.Deprecated</annox:annotate>
<annox:annotate target="field">@java.lang.Deprecated</annox:annotate>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:choice>
</xsd:sequence>
</xsd:extension>
Expand All @@ -338,14 +384,29 @@
<xsd:complexContent>
<xsd:extension base="ldapServiceType">
<xsd:sequence>
<xsd:element name="cleanFilter" type="xsd:string"
minOccurs="0" />
<xsd:choice minOccurs="0">
<xsd:element name="cleanEntryFilter" type="xsd:string" />

<!-- @Deprecated in 2.3: cleanFilter -->
<xsd:element name="cleanFilter" type="xsd:string">
<xsd:annotation>
<xsd:appinfo>
<annox:annotate target="setter">@java.lang.Deprecated</annox:annotate>
<annox:annotate target="setter-parameter">@java.lang.Deprecated</annox:annotate>
<annox:annotate target="getter">@java.lang.Deprecated</annox:annotate>
<annox:annotate target="field">@java.lang.Deprecated</annox:annotate>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:choice>
<xsd:element name="filterAsync" type="xsd:string"
minOccurs="0" />
<xsd:element name="dateFormat" type="xsd:string"
minOccurs="0" />
<xsd:element name="interval" type="xsd:int"
default="5" minOccurs="0" />
<xsd:element name="bypassOneEntry" type="xsd:boolean"
default="false" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
Expand Down Expand Up @@ -487,6 +548,8 @@
<xsd:element name="xaFileDestinationService" type="xaFileDestinationServiceType" />
<xsd:element name="pluginDestinationService" type="pluginDestinationServiceType" />
</xsd:choice>
<xsd:element name="errorIfEmptySource" type="xsd:boolean" default="true" minOccurs="0" maxOccurs="1" />
<xsd:element name="errorIfEmptyDestination" type="xsd:boolean" default="true" minOccurs="0" maxOccurs="1" />
<xsd:choice>
<xsd:element name="propertiesBasedSyncOptions" type="propertiesBasedSyncOptionsType" />
<xsd:element name="forceSyncOptions" type="forceSyncOptionsType" />
Expand Down
12 changes: 9 additions & 3 deletions src/main/resources/schemas/lsc-executable-1.0.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,16 @@
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://lsc-project.org/XSD/lsc-executable-plugin-1.0.xsd"
targetNamespace="http://lsc-project.org/XSD/lsc-executable-plugin-1.0.xsd"
elementFormDefault="qualified" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:lsc="http://lsc-project.org/XSD/lsc-core-2.2.xsd" jaxb:version="2.1">
elementFormDefault="qualified"
xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
jaxb:version="3.0"
xmlns:annox="urn:jaxb.jvnet.org:annox"
xmlns:lsc="http://lsc-project.org/XSD/lsc-core-2.3.xsd"
jaxb:extensionBindingPrefixes="annox">

<xsd:import namespace="http://lsc-project.org/XSD/lsc-core-2.3.xsd" schemaLocation="lsc-core-2.3.xsd" />


<xsd:import namespace="http://lsc-project.org/XSD/lsc-core-2.2.xsd" schemaLocation="lsc-core-2.2.xsd" />

<xsd:simpleType name="interpretorType">
<xsd:restriction base="xsd:string">
Expand Down
Loading
Loading