| | |
| | | |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | import java.util.HashMap; |
| | | import java.util.LinkedHashMap; |
| | |
| | | try |
| | | { |
| | | final Entry configEntry = DirectoryServer.getConfigEntry(configEntryDN); |
| | | addAllNonMonitorConfigAttributes(userAttrs, configEntry.getUserAttributes().values()); |
| | | addAllNonMonitorConfigAttributes(userAttrs, configEntry.getOperationalAttributes().values()); |
| | | addAllNonMonitorConfigAttributes(userAttrs, configEntry.getAllAttributes()); |
| | | } |
| | | catch (final Exception e) |
| | | { |
| | |
| | | return ccr; |
| | | } |
| | | |
| | | private void addAllNonMonitorConfigAttributes(final List<Attribute> userAttrs, Collection<List<Attribute>> attrbutes) |
| | | private void addAllNonMonitorConfigAttributes(List<Attribute> userAttrs, Iterable<Attribute> attributes) |
| | | { |
| | | for (final List<Attribute> attrs : attrbutes) |
| | | for (final Attribute a : attributes) |
| | | { |
| | | for (final Attribute a : attrs) |
| | | if (!isMonitorConfigAttribute(a)) |
| | | { |
| | | if (!isMonitorConfigAttribute(a)) |
| | | { |
| | | userAttrs.add(a); |
| | | } |
| | | userAttrs.add(a); |
| | | } |
| | | } |
| | | } |
| | |
| | | // attributes that we don't recognize will be included directly in the base |
| | | // monitor entry. |
| | | userDefinedAttributes = new ArrayList<>(); |
| | | addAll(userDefinedAttributes, configEntry.getUserAttributes().values()); |
| | | addAll(userDefinedAttributes, configEntry.getOperationalAttributes().values()); |
| | | addAllNonMonitorConfigAttributes(userDefinedAttributes, configEntry.getAllAttributes()); |
| | | |
| | | // Construct the set of objectclasses to include in the base monitor entry. |
| | | monitorObjectClasses.put(CoreSchema.getTopObjectClass(), OC_TOP); |
| | |
| | | currentConfig = cfg; |
| | | } |
| | | |
| | | private void addAll(ArrayList<Attribute> attributes, Collection<List<Attribute>> attributesToAdd) |
| | | { |
| | | addAllNonMonitorConfigAttributes(attributes, attributesToAdd); |
| | | } |
| | | |
| | | @Override |
| | | public void createBackup(final BackupConfig backupConfig) |
| | | throws DirectoryException |