| | |
| | | public LDAPModification(ModificationType modificationType, |
| | | LDAPAttribute attribute) |
| | | { |
| | | |
| | | this.modificationType = modificationType; |
| | | this.attribute = attribute; |
| | | } |
| | |
| | | */ |
| | | public ModificationType getModificationType() |
| | | { |
| | | |
| | | return modificationType; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void setModificationType(ModificationType modificationType) |
| | | { |
| | | |
| | | this.modificationType = modificationType; |
| | | } |
| | | |
| | |
| | | */ |
| | | public LDAPAttribute getAttribute() |
| | | { |
| | | |
| | | return attribute; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void setAttribute(LDAPAttribute attribute) |
| | | { |
| | | |
| | | this.attribute = attribute; |
| | | } |
| | | |
| | |
| | | */ |
| | | public ASN1Element encode() |
| | | { |
| | | |
| | | ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(2); |
| | | elements.add(new ASN1Enumerated(modificationType.intValue())); |
| | | elements.add(attribute.encode()); |
| | |
| | | public static LDAPModification decode(ASN1Element element) |
| | | throws LDAPException |
| | | { |
| | | |
| | | ArrayList<ASN1Element> elements; |
| | | try |
| | | { |
| | |
| | | */ |
| | | public String toString() |
| | | { |
| | | |
| | | StringBuilder buffer = new StringBuilder(); |
| | | toString(buffer); |
| | | return buffer.toString(); |
| | |
| | | */ |
| | | public void toString(StringBuilder buffer) |
| | | { |
| | | |
| | | buffer.append("LDAPModification(type="); |
| | | buffer.append(String.valueOf(modificationType)); |
| | | buffer.append(", attr="); |
| | |
| | | */ |
| | | public void toString(StringBuilder buffer, int indent) |
| | | { |
| | | |
| | | StringBuilder indentBuf = new StringBuilder(indent); |
| | | for (int i=0 ; i < indent; i++) |
| | | { |