public void replaceAttributeValues(String name, Collection<Object> values) throws SchemaViolationException, ConnectException, FileNotFoundException, SchemaViolationException, ConflictException, InterruptedException { checkModifyBreak(); delayOperation(); Set<Object> currentValues = attributes.get(name); if (currentValues == null) { currentValues = new HashSet<>(); attributes.put(name, currentValues); } else { currentValues.clear(); } currentValues.addAll(values); checkSchema(name, values, "replace"); recordModify(); }
public void addAttributeValues(String name, String... valuesToAdd) throws SchemaViolationException, ConnectException, FileNotFoundException, SchemaViolationException, ConflictException, InterruptedException { checkModifyBreak(); delayOperation(); Set<Object> currentValues = attributes.get(name); if (currentValues == null) { currentValues = new HashSet<>(); attributes.put(name, currentValues); } for (Object valueToAdd: valuesToAdd) { addAttributeValue(name, currentValues, valueToAdd); } recordModify(); }
public <T> void addAttributeValues(String name, Collection<T> valuesToAdd) throws SchemaViolationException, ConnectException, FileNotFoundException, SchemaViolationException, ConflictException, InterruptedException { checkModifyBreak(); delayOperation(); Set<Object> currentValues = attributes.get(name); if (currentValues == null) { currentValues = new HashSet<>(); attributes.put(name, currentValues); } for(T valueToAdd: valuesToAdd) { addAttributeValue(name, currentValues, valueToAdd); } recordModify(); }
public void replaceAttributeValues(String name, Object... values) throws SchemaViolationException, ConnectException, FileNotFoundException, SchemaViolationException, ConflictException, InterruptedException { checkModifyBreak(); delayOperation(); Set<Object> currentValues = attributes.get(name); if (currentValues == null) { currentValues = new HashSet<>(); attributes.put(name, currentValues); } else { currentValues.clear(); } List<Object> valuesList = Arrays.asList(values); currentValues.addAll(valuesList); checkSchema(name, valuesList, "replace"); if (valuesList.isEmpty()) { attributes.remove(name); } recordModify(); }
public void setEnabled(Boolean enabled) throws ConnectException, FileNotFoundException, SchemaViolationException, ConflictException, InterruptedException { checkModifyBreak(); delayOperation(); this.enabled = enabled; recordModify(); }
public void setValidFrom(Date validFrom) throws ConnectException, FileNotFoundException, SchemaViolationException, ConflictException, InterruptedException { checkModifyBreak(); delayOperation(); this.validFrom = validFrom; recordModify(); }
public void setValidTo(Date validTo) throws ConnectException, FileNotFoundException, SchemaViolationException, ConflictException, InterruptedException { checkModifyBreak(); delayOperation(); this.validTo = validTo; recordModify(); }