private Map toMap()

in src/main/java/org/apache/sling/maven/bundlesupport/fsresource/FsMountHelper.java [171:192]


    private Map<String, String> toMap(FsResourceConfiguration cfg) {
        Map<String, String> props = new HashMap<>();
        if (cfg.getFsMode() != null) {
            props.put(PROPERTY_FSMODE, cfg.getFsMode().name());
        }
        if (cfg.getFsRootPath() != null) {
            props.put(PROPERTY_PATH, cfg.getFsRootPath().toString());
        }
        if (cfg.getResourceRootPath() != null) {
            // save property value to both "provider.roots" and "provider.root" because the name has changed between
            // fsresource 1.x and 2.x
            props.put(PROPERTY_ROOT, cfg.getResourceRootPath());
            props.put(PROPERTY_ROOTS, cfg.getResourceRootPath());
        }
        if (cfg.getInitialContentImportOptions() != null) {
            props.put(PROPERTY_INITIAL_CONTENT_IMPORT_OPTIONS, cfg.getInitialContentImportOptions());
        }
        if (cfg.getStringVaultFilterXml() != null) {
            props.put(PROPERTY_FILEVAULT_FILTER_XML, cfg.getStringVaultFilterXml());
        }
        return props;
    }