| | |
| | | */ |
| | | public LDAPAttribute(String attributeType) |
| | | { |
| | | |
| | | this.attributeType = attributeType; |
| | | |
| | | values = new ArrayList<ASN1OctetString>(0); |
| | |
| | | */ |
| | | public LDAPAttribute(String attributeType, ArrayList<ASN1OctetString> values) |
| | | { |
| | | |
| | | this.attributeType = attributeType; |
| | | |
| | | if (values == null) |
| | |
| | | */ |
| | | public LDAPAttribute(Attribute attribute) |
| | | { |
| | | |
| | | StringBuilder attrName = new StringBuilder(attribute.getName()); |
| | | for (String o : attribute.getOptions()) |
| | | { |
| | |
| | | */ |
| | | public String getAttributeType() |
| | | { |
| | | |
| | | return attributeType; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void setAttributeType(String attributeType) |
| | | { |
| | | |
| | | this.attributeType = attributeType; |
| | | } |
| | | |
| | |
| | | */ |
| | | public ArrayList<ASN1OctetString> getValues() |
| | | { |
| | | |
| | | return values; |
| | | } |
| | | |
| | |
| | | */ |
| | | public ASN1Element encode() |
| | | { |
| | | |
| | | ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(2); |
| | | elements.add(new ASN1OctetString(attributeType)); |
| | | |
| | |
| | | public static LDAPAttribute decode(ASN1Element element) |
| | | throws LDAPException |
| | | { |
| | | |
| | | ArrayList<ASN1Element> elements; |
| | | try |
| | | { |
| | |
| | | public Attribute toAttribute() |
| | | throws LDAPException |
| | | { |
| | | |
| | | String baseName; |
| | | String lowerBaseName; |
| | | int semicolonPos = attributeType.indexOf(';'); |
| | |
| | | */ |
| | | public String toString() |
| | | { |
| | | |
| | | StringBuilder buffer = new StringBuilder(); |
| | | toString(buffer); |
| | | return buffer.toString(); |
| | |
| | | */ |
| | | public void toString(StringBuilder buffer) |
| | | { |
| | | |
| | | buffer.append("LDAPAttribute(type="); |
| | | buffer.append(attributeType); |
| | | buffer.append(", values={"); |
| | |
| | | */ |
| | | public void toString(StringBuilder buffer, int indent) |
| | | { |
| | | |
| | | StringBuilder indentBuf = new StringBuilder(indent); |
| | | for (int i=0 ; i < indent; i++) |
| | | { |