| | |
| | | import java.util.List; |
| | | |
| | | import org.opends.sdk.ByteSequence; |
| | | import org.opends.sdk.ByteString; |
| | | import org.opends.sdk.Filter; |
| | | import org.opends.sdk.FilterVisitor; |
| | | import org.opends.sdk.asn1.ASN1Reader; |
| | |
| | | |
| | | |
| | | public IOException visitApproxMatchFilter(ASN1Writer writer, |
| | | String attributeDescription, ByteSequence assertionValue) |
| | | String attributeDescription, ByteString assertionValue) |
| | | { |
| | | try |
| | | { |
| | |
| | | |
| | | |
| | | public IOException visitEqualityMatchFilter(ASN1Writer writer, |
| | | String attributeDescription, ByteSequence assertionValue) |
| | | String attributeDescription, ByteString assertionValue) |
| | | { |
| | | try |
| | | { |
| | |
| | | |
| | | public IOException visitExtensibleMatchFilter(ASN1Writer writer, |
| | | String matchingRule, String attributeDescription, |
| | | ByteSequence assertionValue, boolean dnAttributes) |
| | | ByteString assertionValue, boolean dnAttributes) |
| | | { |
| | | try |
| | | { |
| | |
| | | |
| | | |
| | | public IOException visitGreaterOrEqualFilter(ASN1Writer writer, |
| | | String attributeDescription, ByteSequence assertionValue) |
| | | String attributeDescription, ByteString assertionValue) |
| | | { |
| | | try |
| | | { |
| | |
| | | |
| | | |
| | | public IOException visitLessOrEqualFilter(ASN1Writer writer, |
| | | String attributeDescription, ByteSequence assertionValue) |
| | | String attributeDescription, ByteString assertionValue) |
| | | { |
| | | try |
| | | { |
| | |
| | | |
| | | |
| | | public IOException visitSubstringsFilter(ASN1Writer writer, |
| | | String attributeDescription, ByteSequence initialSubstring, |
| | | List<ByteSequence> anySubstrings, ByteSequence finalSubstring) |
| | | String attributeDescription, ByteString initialSubstring, |
| | | List<ByteString> anySubstrings, ByteString finalSubstring) |
| | | { |
| | | try |
| | | { |
| | |
| | | |
| | | |
| | | public IOException visitUnrecognizedFilter(ASN1Writer writer, |
| | | byte filterTag, ByteSequence filterBytes) |
| | | byte filterTag, ByteString filterBytes) |
| | | { |
| | | try |
| | | { |
| | |
| | | throws IOException |
| | | { |
| | | String attributeDescription; |
| | | ByteSequence assertionValue; |
| | | ByteString assertionValue; |
| | | |
| | | reader.readStartSequence(TYPE_FILTER_APPROXIMATE); |
| | | try |
| | |
| | | throws IOException |
| | | { |
| | | String attributeDescription; |
| | | ByteSequence assertionValue; |
| | | ByteString assertionValue; |
| | | |
| | | reader.readStartSequence(TYPE_FILTER_EQUALITY); |
| | | try |
| | |
| | | String matchingRule; |
| | | String attributeDescription; |
| | | boolean dnAttributes; |
| | | ByteSequence assertionValue; |
| | | ByteString assertionValue; |
| | | |
| | | reader.readStartSequence(TYPE_FILTER_EXTENSIBLE_MATCH); |
| | | try |
| | |
| | | ASN1Reader reader) throws IOException |
| | | { |
| | | String attributeDescription; |
| | | ByteSequence assertionValue; |
| | | ByteString assertionValue; |
| | | |
| | | reader.readStartSequence(TYPE_FILTER_GREATER_OR_EQUAL); |
| | | try |
| | |
| | | throws IOException |
| | | { |
| | | String attributeDescription; |
| | | ByteSequence assertionValue; |
| | | ByteString assertionValue; |
| | | |
| | | reader.readStartSequence(TYPE_FILTER_LESS_OR_EQUAL); |
| | | try |
| | |
| | | private static Filter decodeSubstringsFilter(ASN1Reader reader) |
| | | throws IOException |
| | | { |
| | | ByteSequence initialSubstring = null; |
| | | List<ByteSequence> anySubstrings = null; |
| | | ByteSequence finalSubstring = null; |
| | | ByteString initialSubstring = null; |
| | | List<ByteString> anySubstrings = null; |
| | | ByteString finalSubstring = null; |
| | | String attributeDescription; |
| | | |
| | | reader.readStartSequence(TYPE_FILTER_SUBSTRING); |
| | |
| | | if (reader.hasNextElement() |
| | | && (reader.peekType() == TYPE_SUBANY)) |
| | | { |
| | | anySubstrings = new LinkedList<ByteSequence>(); |
| | | anySubstrings = new LinkedList<ByteString>(); |
| | | do |
| | | { |
| | | anySubstrings.add(reader.readOctetString(TYPE_SUBANY)); |