Search in sources :

Example 1 with SimpleImpl

use of org.codelibs.fess.mylasta.direction.FessConfig.SimpleImpl in project fess by codelibs.

the class AdminMaintenanceAction method writeFessConfig.

protected void writeFessConfig(final ZipOutputStream zos, final String id) {
    if (fessConfig instanceof SimpleImpl) {
        final Properties prop = new Properties();
        ((SimpleImpl) fessConfig).keySet().stream().forEach(k -> prop.setProperty(k, fessConfig.get(k)));
        final ZipEntry entry = new ZipEntry(id + "/fess_config.properties");
        try {
            zos.putNextEntry(entry);
            prop.store(zos, getHostInfo());
        } catch (final IOException e) {
            logger.warn("Failed to access fess_config.properties.", e);
        }
    }
}
Also used : ZipEntry(java.util.zip.ZipEntry) SimpleImpl(org.codelibs.fess.mylasta.direction.FessConfig.SimpleImpl) IOException(java.io.IOException) Properties(java.util.Properties)

Aggregations

IOException (java.io.IOException)1 Properties (java.util.Properties)1 ZipEntry (java.util.zip.ZipEntry)1 SimpleImpl (org.codelibs.fess.mylasta.direction.FessConfig.SimpleImpl)1