| | |
| | | */ |
| | | package org.opends.server.synchronization.plugin; |
| | | |
| | | import java.util.HashSet; |
| | | import java.util.LinkedHashSet; |
| | | import java.util.Set; |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * This Class is used to encode/decode hsitorical information |
| | | * This Class is used to encode/decode historical information |
| | | * from the String form to the internal usable form. |
| | | * |
| | | * @author Gilles Bellaton |
| | |
| | | private String attrString; |
| | | private AttributeValue attributeValue; |
| | | private ChangeNumber cn; |
| | | private Set<String> options = null; |
| | | private LinkedHashSet<String> options; |
| | | private HistKey histKey; |
| | | private String stringValue; |
| | | |
| | |
| | | */ |
| | | String[] token = strVal.split(":", 4); |
| | | |
| | | options = new LinkedHashSet<String>(); |
| | | if (token[0].contains(";")) |
| | | { |
| | | String[] optionsToken = token[0].split(";"); |
| | | options = new HashSet<String>(); |
| | | int index = 1; |
| | | while (index < optionsToken.length) |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Get the options. |
| | | * Get the options or an empty set if there are no options. |
| | | * @return Returns the options. |
| | | */ |
| | | public Set<String> getOptions() |
| | |
| | | */ |
| | | public Modification generateMod() |
| | | { |
| | | Attribute attr = new Attribute(attrType); |
| | | Attribute attr = new Attribute(attrType, attrString, options, null); |
| | | Modification mod; |
| | | if (histKey != HistKey.DELATTR) |
| | | { |