| | |
| | | |
| | | private ArrayList<ByteString> toByteStrings(String value) |
| | | { |
| | | final ArrayList<ByteString> values = new ArrayList<ByteString>(1); |
| | | final ArrayList<ByteString> values = new ArrayList<>(1); |
| | | values.add(ByteString.valueOf(value)); |
| | | return values; |
| | | } |
| | | |
| | | private ArrayList<ByteString> toByteStrings(List<String> attrValues) |
| | | { |
| | | final ArrayList<ByteString> values = new ArrayList<ByteString>(attrValues.size()); |
| | | final ArrayList<ByteString> values = new ArrayList<>(attrValues.size()); |
| | | for (String includeBranche : attrValues) |
| | | { |
| | | values.add(ByteString.valueOf(includeBranche)); |
| | |
| | | // Initialize the plugin manager. |
| | | try |
| | | { |
| | | HashSet<PluginType> pluginTypes = new HashSet<PluginType>(1); |
| | | HashSet<PluginType> pluginTypes = new HashSet<>(1); |
| | | directoryServer.initializePlugins(pluginTypes); |
| | | } |
| | | catch (Exception e) |
| | |
| | | // Make sure that the plugin initialization is performed. |
| | | try |
| | | { |
| | | HashSet<PluginType> pluginTypes = new HashSet<PluginType>(1); |
| | | HashSet<PluginType> pluginTypes = new HashSet<>(1); |
| | | pluginTypes.add(PluginType.LDIF_IMPORT); |
| | | PluginConfigManager pluginConfigManager = |
| | | DirectoryServer.getPluginConfigManager(); |
| | |
| | | } |
| | | else |
| | | { |
| | | excludeAttributes = new HashSet<AttributeType>(); |
| | | excludeAttributes = new HashSet<>(); |
| | | for (String attrName : excludeAttributeStrings.getValues()) |
| | | { |
| | | String lowerName = attrName.toLowerCase(); |
| | |
| | | } |
| | | else |
| | | { |
| | | includeAttributes = new HashSet<AttributeType>(); |
| | | includeAttributes = new HashSet<>(); |
| | | for (String attrName : includeAttributeStrings.getValues()) |
| | | { |
| | | String lowerName = attrName.toLowerCase(); |
| | |
| | | } |
| | | else |
| | | { |
| | | excludeFilters = new ArrayList<SearchFilter>(); |
| | | excludeFilters = new ArrayList<>(); |
| | | for (String filterString : excludeFilterStrings.getValues()) |
| | | { |
| | | try |
| | |
| | | } |
| | | else |
| | | { |
| | | includeFilters = new ArrayList<SearchFilter>(); |
| | | includeFilters = new ArrayList<>(); |
| | | for (String filterString : includeFilterStrings.getValues()) |
| | | { |
| | | try |
| | |
| | | // excluded from the import. |
| | | Backend<?> backend = null; |
| | | Set<DN> defaultIncludeBranches = null; |
| | | Set<DN> excludeBranches = new HashSet<DN>(); |
| | | Set<DN> includeBranches = new HashSet<DN>(); |
| | | Set<DN> excludeBranches = new HashSet<>(); |
| | | Set<DN> includeBranches = new HashSet<>(); |
| | | |
| | | if (includeBranchStrings.isPresent()) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | ArrayList<Backend> backendList = new ArrayList<Backend>(); |
| | | ArrayList<BackendCfg> entryList = new ArrayList<BackendCfg>(); |
| | | ArrayList<List<DN>> dnList = new ArrayList<List<DN>>(); |
| | | ArrayList<Backend> backendList = new ArrayList<>(); |
| | | ArrayList<BackendCfg> entryList = new ArrayList<>(); |
| | | ArrayList<List<DN>> dnList = new ArrayList<>(); |
| | | int code = BackendToolUtils.getBackends(backendList, entryList, dnList); |
| | | if (code != 0) |
| | | { |
| | |
| | | if (backend == null) |
| | | { |
| | | backend = b; |
| | | defaultIncludeBranches = new HashSet<DN>(dnList.get(i)); |
| | | defaultIncludeBranches = new HashSet<>(dnList.get(i)); |
| | | } |
| | | else |
| | | { |
| | |
| | | LDIFImportConfig importConfig; |
| | | if (ldifFiles.isPresent()) |
| | | { |
| | | ArrayList<String> fileList = new ArrayList<String>(ldifFiles.getValues()); |
| | | ArrayList<String> fileList = new ArrayList<>(ldifFiles.getValues()); |
| | | int badFileCount = 0; |
| | | for (String pathname : fileList) |
| | | { |
| | |
| | | PATH_MAKELDIF_RESOURCE_DIR; |
| | | TemplateFile tf = new TemplateFile(resourcePath, random); |
| | | |
| | | ArrayList<LocalizableMessage> warnings = new ArrayList<LocalizableMessage>(); |
| | | ArrayList<LocalizableMessage> warnings = new ArrayList<>(); |
| | | try |
| | | { |
| | | tf.parse(templateFile.getValue(), warnings); |