| | |
| | | import org.opends.server.types.*; |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.messages.AccessControlMessages.*; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import static org.opends.server.util.StaticUtils.isDigit; |
| | | import static org.opends.server.util.StaticUtils.isHexDigit; |
| | | import static org.opends.server.util.StaticUtils.hexStringToByteArray; |
| | |
| | | if (pos >= length) |
| | | { |
| | | ArrayList<ByteString> arrayList = new ArrayList<ByteString>(1); |
| | | arrayList.add(new ASN1OctetString()); |
| | | arrayList.add(ByteString.empty()); |
| | | rdnComponents.add(new PatternRDN(name, arrayList, dnString)); |
| | | break; |
| | | } |
| | |
| | | if (pos >= length) |
| | | { |
| | | ArrayList<ByteString> arrayList = new ArrayList<ByteString>(1); |
| | | arrayList.add(new ASN1OctetString()); |
| | | arrayList.add(ByteString.empty()); |
| | | rdn.addValue(name, arrayList, dnString); |
| | | rdnComponents.add(rdn); |
| | | break; |
| | |
| | | try |
| | | { |
| | | byte[] bytes = hexStringToByteArray(hexString.toString()); |
| | | attributeValues.add(new ASN1OctetString(bytes)); |
| | | attributeValues.add(ByteString.wrap(bytes)); |
| | | return pos; |
| | | } |
| | | catch (Exception e) |
| | |
| | | } |
| | | } |
| | | |
| | | attributeValues.add(new ASN1OctetString(valueString.toString())); |
| | | attributeValues.add(ByteString.valueOf(valueString.toString())); |
| | | return pos; |
| | | } |
| | | |
| | |
| | | else if (c == '*') |
| | | { |
| | | escaped = false; |
| | | attributeValues.add(new ASN1OctetString(valueString.toString())); |
| | | attributeValues.add(ByteString.valueOf(valueString.toString())); |
| | | } |
| | | else |
| | | { |
| | |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, |
| | | message); |
| | | } |
| | | attributeValues.add(new ASN1OctetString(valueString.toString())); |
| | | attributeValues.add(ByteString.valueOf(valueString.toString())); |
| | | valueString = new StringBuilder(); |
| | | hexChars = new StringBuilder(); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | attributeValues.add(new ASN1OctetString(valueString.toString())); |
| | | attributeValues.add(ByteString.valueOf(valueString.toString())); |
| | | return pos; |
| | | } |
| | | } |