-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
928 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
136 changes: 136 additions & 0 deletions
136
src/main/java/net/sourceforge/myvd/inserts/mapping/ClearMultiValueRDNEscapesFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
package net.sourceforge.myvd.inserts.mapping; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Properties; | ||
|
||
import com.novell.ldap.LDAPConstraints; | ||
import com.novell.ldap.LDAPException; | ||
import com.novell.ldap.LDAPModification; | ||
import com.novell.ldap.LDAPSearchConstraints; | ||
|
||
import net.sourceforge.myvd.chain.AddInterceptorChain; | ||
import net.sourceforge.myvd.chain.BindInterceptorChain; | ||
import net.sourceforge.myvd.chain.CompareInterceptorChain; | ||
import net.sourceforge.myvd.chain.DeleteInterceptorChain; | ||
import net.sourceforge.myvd.chain.ExetendedOperationInterceptorChain; | ||
import net.sourceforge.myvd.chain.ModifyInterceptorChain; | ||
import net.sourceforge.myvd.chain.PostSearchCompleteInterceptorChain; | ||
import net.sourceforge.myvd.chain.PostSearchEntryInterceptorChain; | ||
import net.sourceforge.myvd.chain.RenameInterceptorChain; | ||
import net.sourceforge.myvd.chain.SearchInterceptorChain; | ||
import net.sourceforge.myvd.core.NameSpace; | ||
import net.sourceforge.myvd.inserts.Insert; | ||
import net.sourceforge.myvd.types.Attribute; | ||
import net.sourceforge.myvd.types.Bool; | ||
import net.sourceforge.myvd.types.DistinguishedName; | ||
import net.sourceforge.myvd.types.Entry; | ||
import net.sourceforge.myvd.types.ExtendedOperation; | ||
import net.sourceforge.myvd.types.Filter; | ||
import net.sourceforge.myvd.types.Int; | ||
import net.sourceforge.myvd.types.Password; | ||
import net.sourceforge.myvd.types.Results; | ||
|
||
public class ClearMultiValueRDNEscapesFilter implements Insert { | ||
|
||
String name; | ||
@Override | ||
public String getName() { | ||
return name; | ||
} | ||
|
||
@Override | ||
public void configure(String name, Properties props, NameSpace nameSpace) throws LDAPException { | ||
this.name = name; | ||
|
||
} | ||
|
||
@Override | ||
public void add(AddInterceptorChain chain, Entry entry, LDAPConstraints constraints) throws LDAPException { | ||
chain.nextAdd(entry, constraints); | ||
|
||
} | ||
|
||
@Override | ||
public void bind(BindInterceptorChain chain, DistinguishedName dn, Password pwd, LDAPConstraints constraints) | ||
throws LDAPException { | ||
chain.nextBind(dn, pwd, constraints); | ||
|
||
} | ||
|
||
@Override | ||
public void compare(CompareInterceptorChain chain, DistinguishedName dn, Attribute attrib, | ||
LDAPConstraints constraints) throws LDAPException { | ||
chain.nextCompare(dn, attrib, constraints); | ||
|
||
} | ||
|
||
@Override | ||
public void delete(DeleteInterceptorChain chain, DistinguishedName dn, LDAPConstraints constraints) | ||
throws LDAPException { | ||
chain.nextDelete(dn, constraints); | ||
|
||
} | ||
|
||
@Override | ||
public void extendedOperation(ExetendedOperationInterceptorChain chain, ExtendedOperation op, | ||
LDAPConstraints constraints) throws LDAPException { | ||
chain.nextExtendedOperations(op, constraints); | ||
|
||
} | ||
|
||
@Override | ||
public void modify(ModifyInterceptorChain chain, DistinguishedName dn, ArrayList<LDAPModification> mods, | ||
LDAPConstraints constraints) throws LDAPException { | ||
chain.nextModify(dn, mods, constraints); | ||
|
||
} | ||
|
||
@Override | ||
public void search(SearchInterceptorChain chain, DistinguishedName base, Int scope, Filter filter, | ||
ArrayList<Attribute> attributes, Bool typesOnly, Results results, LDAPSearchConstraints constraints) | ||
throws LDAPException { | ||
String strFilter = filter.getValue(); | ||
strFilter = strFilter.replace("\\+", "+"); | ||
Filter nfilter = new Filter(strFilter); | ||
|
||
chain.nextSearch(base, scope, nfilter, attributes, typesOnly, results, constraints); | ||
|
||
} | ||
|
||
@Override | ||
public void rename(RenameInterceptorChain chain, DistinguishedName dn, DistinguishedName newRdn, Bool deleteOldRdn, | ||
LDAPConstraints constraints) throws LDAPException { | ||
chain.nextRename(dn, newRdn, deleteOldRdn, constraints); | ||
|
||
} | ||
|
||
@Override | ||
public void rename(RenameInterceptorChain chain, DistinguishedName dn, DistinguishedName newRdn, | ||
DistinguishedName newParentDN, Bool deleteOldRdn, LDAPConstraints constraints) throws LDAPException { | ||
chain.nextRename(dn, newRdn, newParentDN, deleteOldRdn, constraints); | ||
|
||
} | ||
|
||
@Override | ||
public void postSearchEntry(PostSearchEntryInterceptorChain chain, Entry entry, DistinguishedName base, Int scope, | ||
Filter filter, ArrayList<Attribute> attributes, Bool typesOnly, LDAPSearchConstraints constraints) | ||
throws LDAPException { | ||
chain.nextPostSearchEntry(entry, base, scope, filter, attributes, typesOnly, constraints); | ||
|
||
} | ||
|
||
@Override | ||
public void postSearchComplete(PostSearchCompleteInterceptorChain chain, DistinguishedName base, Int scope, | ||
Filter filter, ArrayList<Attribute> attributes, Bool typesOnly, LDAPSearchConstraints constraints) | ||
throws LDAPException { | ||
chain.nextPostSearchComplete(base, scope, filter, attributes, typesOnly, constraints); | ||
|
||
} | ||
|
||
@Override | ||
public void shutdown() { | ||
|
||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.