| | |
| | | final String path = getInstallPath(classPaths); |
| | | if (path == null) |
| | | { |
| | | return installPath; |
| | | return null; |
| | | } |
| | | |
| | | /* |
| | |
| | | final Filter filter, final ChangeOperationType changeType, |
| | | final String... ldifLines) throws IOException |
| | | { |
| | | final File original = configFile; |
| | | final File copyConfig = |
| | | File.createTempFile("copyConfig", ".tmp", original.getParentFile()); |
| | | File.createTempFile("copyConfig", ".tmp", configFile.getParentFile()); |
| | | |
| | | int changeCount = 0; |
| | | final Schema schema = getUpgradeSchema(); |
| | |
| | | if (changeType == ADD && !entryAlreadyExist) |
| | | { |
| | | writer.writeEntry(Requests.newAddRequest(ldifLines)); |
| | | logger.debug(LocalizableMessage.raw("Entry successfully added %s in %s", ldifDN, original.getAbsolutePath())); |
| | | logger.debug(LocalizableMessage.raw("Entry successfully added %s in %s", ldifDN, configFile.getAbsolutePath())); |
| | | changeCount++; |
| | | } |
| | | } |
| | |
| | | catch (IOException e) |
| | | { |
| | | logger.error(LocalizableMessage.raw(e.getMessage())); |
| | | deleteRecursively(original); |
| | | deleteRecursively(configFile); |
| | | throw e; |
| | | } |
| | | } |
| | |
| | | return changeCount; |
| | | } |
| | | |
| | | private static Entry readFirstEntryFromTemplate(final File destination) throws DecodeException, IOException |
| | | private static Entry readFirstEntryFromTemplate(final File destination) throws IOException |
| | | { |
| | | try (LDIFEntryReader r = new LDIFEntryReader(new FileInputStream(destination))) |
| | | { |