/** * Encodes the provided information into an octet string that can be used as * the value for this control. * * @param filter The filter for this assertion control. It must not be * {@code null}. * * @return An ASN.1 octet string that can be used as the value for this * control. */ private static ASN1OctetString encodeValue(final Filter filter) { return new ASN1OctetString(filter.encode().encode()); }
elements.add(new ASN1OctetString(TYPE_FILTER, filter.encode().encode()));
/** * {@inheritDoc} */ public ASN1Element encodeProtocolOp() { final ArrayList<ASN1Element> attrElements = new ArrayList<ASN1Element>(attributes.size()); for (final String attribute : attributes) { attrElements.add(new ASN1OctetString(attribute)); } return new ASN1Sequence(LDAPMessage.PROTOCOL_OP_TYPE_SEARCH_REQUEST, new ASN1OctetString(baseDN), new ASN1Enumerated(scope.intValue()), new ASN1Enumerated(derefPolicy.intValue()), new ASN1Integer(sizeLimit), new ASN1Integer(timeLimit), new ASN1Boolean(typesOnly), filter.encode(), new ASN1Sequence(attrElements)); }
/** * {@inheritDoc} */ public ASN1Element encodeProtocolOp() { final ArrayList<ASN1Element> attrElements = new ArrayList<ASN1Element>(attributes.size()); for (final String attribute : attributes) { attrElements.add(new ASN1OctetString(attribute)); } return new ASN1Sequence(LDAPMessage.PROTOCOL_OP_TYPE_SEARCH_REQUEST, new ASN1OctetString(baseDN), new ASN1Enumerated(scope.intValue()), new ASN1Enumerated(derefPolicy.intValue()), new ASN1Integer(sizeLimit), new ASN1Integer(timeLimit), new ASN1Boolean(typesOnly), filter.encode(), new ASN1Sequence(attrElements)); }
/** * Encodes the search request protocol op to an ASN.1 element. * * @return The ASN.1 element with the encoded search request protocol op. */ public ASN1Element encodeProtocolOp() { // Create the search request protocol op. final ASN1Element[] attrElements = new ASN1Element[attributes.length]; for (int i=0; i < attrElements.length; i++) { attrElements[i] = new ASN1OctetString(attributes[i]); } final ASN1Element[] protocolOpElements = { new ASN1OctetString(baseDN), new ASN1Enumerated(scope.intValue()), new ASN1Enumerated(derefPolicy.intValue()), new ASN1Integer(sizeLimit), new ASN1Integer(timeLimit), new ASN1Boolean(typesOnly), filter.encode(), new ASN1Sequence(attrElements) }; return new ASN1Sequence(LDAPMessage.PROTOCOL_OP_TYPE_SEARCH_REQUEST, protocolOpElements); }
/** * Encodes the search request protocol op to an ASN.1 element. * * @return The ASN.1 element with the encoded search request protocol op. */ public ASN1Element encodeProtocolOp() { // Create the search request protocol op. final ASN1Element[] attrElements = new ASN1Element[attributes.length]; for (int i=0; i < attrElements.length; i++) { attrElements[i] = new ASN1OctetString(attributes[i]); } final ASN1Element[] protocolOpElements = { new ASN1OctetString(baseDN), new ASN1Enumerated(scope.intValue()), new ASN1Enumerated(derefPolicy.intValue()), new ASN1Integer(sizeLimit), new ASN1Integer(timeLimit), new ASN1Boolean(typesOnly), filter.encode(), new ASN1Sequence(attrElements) }; return new ASN1Sequence(LDAPMessage.PROTOCOL_OP_TYPE_SEARCH_REQUEST, protocolOpElements); }
new ASN1Element(filterType, notComp.encode().encode())); break;
new ASN1Element(filterType, notComp.encode().encode())); break;