| | |
| | | * @param duplicateValues |
| | | * A list to which any duplicate values will be added. |
| | | */ |
| | | public void addAttribute(Attribute attribute, List<ByteString> duplicateValues) |
| | | public void addAttribute(Attribute attribute, Collection<? super ByteString> duplicateValues) |
| | | { |
| | | setAttribute(attribute, duplicateValues, false /* merge */); |
| | | } |
| | |
| | | * attribute, then this method will return {@code true} |
| | | * but will add those values to the provided list. |
| | | */ |
| | | public boolean removeAttribute(Attribute attribute, List<ByteString> missingValues) |
| | | public boolean removeAttribute(Attribute attribute, Collection<? super ByteString> missingValues) |
| | | { |
| | | attachment = null; |
| | | |
| | |
| | | return removeNonObjectClassAttribute(attribute, missingValues); |
| | | } |
| | | |
| | | private boolean removeObjectClassAttribute(Attribute attribute, List<ByteString> missingValues) |
| | | private boolean removeObjectClassAttribute(Attribute attribute, Collection<? super ByteString> missingValues) |
| | | { |
| | | AttributeType attrType = attribute.getAttributeDescription().getAttributeType(); |
| | | if (attribute.isEmpty()) |
| | |
| | | return allSuccessful; |
| | | } |
| | | |
| | | private boolean removeNonObjectClassAttribute(Attribute attribute, List<ByteString> missingValues) |
| | | private boolean removeNonObjectClassAttribute(Attribute attribute, Collection<? super ByteString> missingValues) |
| | | { |
| | | AttributeDescription attrDesc = attribute.getAttributeDescription(); |
| | | AttributeType attrType = attrDesc.getAttributeType(); |
| | |
| | | * existing attribute. |
| | | */ |
| | | private void setAttribute(Attribute attribute, |
| | | List<ByteString> duplicateValues, boolean replace) |
| | | Collection<? super ByteString> duplicateValues, boolean replace) |
| | | { |
| | | attachment = null; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | private void setObjectClassAttribute(Attribute attribute, List<ByteString> duplicateValues, boolean replace) |
| | | private void setObjectClassAttribute( |
| | | Attribute attribute, Collection<? super ByteString> duplicateValues, boolean replace) |
| | | { |
| | | AttributeType attrType = attribute.getAttributeDescription().getAttributeType(); |
| | | // We will not do any validation of the object classes - this is |
| | |
| | | } |
| | | } |
| | | |
| | | private void setNonObjectClassAttribute(Attribute attribute, List<ByteString> duplicateValues, boolean replace) |
| | | private void setNonObjectClassAttribute( |
| | | Attribute attribute, Collection<? super ByteString> duplicateValues, boolean replace) |
| | | { |
| | | AttributeDescription attrDesc = attribute.getAttributeDescription(); |
| | | AttributeType attrType = attrDesc.getAttributeType(); |