| | |
| | | super(name, description, isRequired, isMultiValued, requiresAdminAction); |
| | | |
| | | |
| | | activeValues = new ArrayList<DN>(); |
| | | activeValues = new ArrayList<>(); |
| | | pendingValues = activeValues; |
| | | } |
| | | |
| | |
| | | |
| | | if (value == null) |
| | | { |
| | | activeValues = new ArrayList<DN>(); |
| | | activeValues = new ArrayList<>(); |
| | | } |
| | | else |
| | | { |
| | | activeValues = new ArrayList<DN>(1); |
| | | activeValues = new ArrayList<>(1); |
| | | activeValues.add(value); |
| | | } |
| | | |
| | |
| | | |
| | | if (activeValues == null) |
| | | { |
| | | this.activeValues = new ArrayList<DN>(); |
| | | this.activeValues = new ArrayList<>(); |
| | | } |
| | | else |
| | | { |
| | |
| | | |
| | | if (requiresAdminAction()) |
| | | { |
| | | pendingValues = new ArrayList<DN>(1); |
| | | pendingValues = new ArrayList<>(1); |
| | | pendingValues.add(value); |
| | | setPendingValues(getValueSet(value)); |
| | | } |
| | |
| | | if (requiresAdminAction()) |
| | | { |
| | | setPendingValues(new LinkedHashSet<ByteString>(0)); |
| | | pendingValues = new ArrayList<DN>(); |
| | | pendingValues = new ArrayList<>(); |
| | | } |
| | | else |
| | | { |
| | |
| | | |
| | | // Iterate through all the provided values, make sure that they are |
| | | // acceptable, and build the value set. |
| | | LinkedHashSet<ByteString> valueSet = new LinkedHashSet<ByteString>(numValues); |
| | | LinkedHashSet<ByteString> valueSet = new LinkedHashSet<>(numValues); |
| | | for (DN value : values) |
| | | { |
| | | if (value == null) |
| | |
| | | LinkedHashSet<ByteString> valueSet; |
| | | if (value == null) |
| | | { |
| | | valueSet = new LinkedHashSet<ByteString>(0); |
| | | valueSet = new LinkedHashSet<>(0); |
| | | } |
| | | else |
| | | { |
| | | valueSet = new LinkedHashSet<ByteString>(1); |
| | | valueSet = new LinkedHashSet<>(1); |
| | | valueSet.add(ByteString.valueOf(value.toString())); |
| | | } |
| | | return valueSet; |
| | |
| | | return null; |
| | | } |
| | | |
| | | LinkedHashSet<ByteString> valueSet = new LinkedHashSet<ByteString>(values.size()); |
| | | LinkedHashSet<ByteString> valueSet = new LinkedHashSet<>(values.size()); |
| | | for (DN value : values) |
| | | { |
| | | valueSet.add(ByteString.valueOf(value.toString())); |
| | |
| | | } |
| | | else |
| | | { |
| | | return new LinkedHashSet<ByteString>(); |
| | | return new LinkedHashSet<>(); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | LinkedHashSet<ByteString> valueSet = new LinkedHashSet<ByteString>(numValues); |
| | | LinkedHashSet<ByteString> valueSet = new LinkedHashSet<>(numValues); |
| | | for (String valueString : valueStrings) |
| | | { |
| | | if (valueString == null) |
| | |
| | | */ |
| | | public List<String> activeValuesToStrings() |
| | | { |
| | | ArrayList<String> valueStrings = new ArrayList<String>(activeValues.size()); |
| | | ArrayList<String> valueStrings = new ArrayList<>(activeValues.size()); |
| | | for (DN dn : activeValues) |
| | | { |
| | | valueStrings.add(dn.toString()); |
| | |
| | | { |
| | | if (hasPendingValues()) |
| | | { |
| | | ArrayList<String> valueStrings = |
| | | new ArrayList<String>(pendingValues.size()); |
| | | ArrayList<String> valueStrings = new ArrayList<>(pendingValues.size()); |
| | | for (DN dn : pendingValues) |
| | | { |
| | | valueStrings.add(dn.toString()); |
| | | } |
| | | |
| | | return valueStrings; |
| | | } |
| | | else |
| | |
| | | else |
| | | { |
| | | // This is fine. The pending value set can be empty. |
| | | pendingValues = new ArrayList<DN>(0); |
| | | pendingValues = new ArrayList<>(0); |
| | | } |
| | | } |
| | | else |
| | |
| | | throw new ConfigException(message); |
| | | } |
| | | |
| | | pendingValues = new ArrayList<DN>(numValues); |
| | | pendingValues = new ArrayList<>(numValues); |
| | | for (ByteString v : a) |
| | | { |
| | | DN dn; |
| | |
| | | else |
| | | { |
| | | // This is fine. The active value set can be empty. |
| | | activeValues = new ArrayList<DN>(0); |
| | | activeValues = new ArrayList<>(0); |
| | | } |
| | | } |
| | | else |
| | |
| | | throw new ConfigException(message); |
| | | } |
| | | |
| | | activeValues = new ArrayList<DN>(numValues); |
| | | activeValues = new ArrayList<>(numValues); |
| | | for (ByteString v : a) |
| | | { |
| | | DN dn; |
| | |
| | | |
| | | if (componentType.equals(DN.class.getName())) |
| | | { |
| | | ArrayList<DN> dnList = new ArrayList<DN>(length); |
| | | ArrayList<DN> dnList = new ArrayList<>(length); |
| | | for (int i=0; i < length; i++) |
| | | { |
| | | dnList.add((DN) Array.get(value, i)); |
| | |
| | | { |
| | | try |
| | | { |
| | | ArrayList<DN> values = new ArrayList<DN>(length); |
| | | ArrayList<DN> values = new ArrayList<>(length); |
| | | for (int i=0; i < length; i++) |
| | | { |
| | | String valueStr = (String) Array.get(value, i); |