diff options
Diffstat (limited to 'src/connectors')
-rw-r--r-- | src/connectors/src/data/io/ldap/LDAPFlatDataWriter.java | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/connectors/src/data/io/ldap/LDAPFlatDataWriter.java b/src/connectors/src/data/io/ldap/LDAPFlatDataWriter.java index d1b8918..ba0f2be 100644 --- a/src/connectors/src/data/io/ldap/LDAPFlatDataWriter.java +++ b/src/connectors/src/data/io/ldap/LDAPFlatDataWriter.java @@ -40,19 +40,24 @@ import com.unboundid.ldap.sdk.schema.EntryValidator; import com.unboundid.ldif.LDIFException; import data.MVDataEntry; -import data.io.AbstractMVDataWriter; +import data.io.MVDataWriter; /** * Stream-oriented LDAP writer from a particular LDAP Directory connection. * * @author lpouzenc */ -public class LDAPFlatDataWriter extends AbstractMVDataWriter { +public class LDAPFlatDataWriter implements MVDataWriter { private final LDAPConnection conn; private final DN baseDN; private final String keyAttr; private final EntryValidator validator; + + /** + * Dry-run mode flag (disabled by default) + */ + protected boolean dryRun; /** * Construct a new writer that could insert/update/delete entries on a particular LDAP connection and baseDN. @@ -67,6 +72,7 @@ public class LDAPFlatDataWriter extends AbstractMVDataWriter { this.baseDN = new DN(baseDN); this.keyAttr = keyAttr; this.validator = new EntryValidator(conn.getSchema()); + this.dryRun = false; } /** @@ -195,4 +201,18 @@ public class LDAPFlatDataWriter extends AbstractMVDataWriter { } } + /* (non-Javadoc) + * @see data.io.MVDataWriter#isDryRun() + */ + public boolean isDryRun() { + return dryRun; + } + + /* (non-Javadoc) + * @see data.io.MVDataWriter#setDryRun(boolean) + */ + public void setDryRun(boolean dryRun) { + this.dryRun = dryRun; + } + } |