class SlingJcrInstaller implements ProgressCheckFactory {

    @Override
    public ProgressCheck newInstance(final JsonObject config) {
        final List<String> rootPaths = JavaxJson.optArray(config, keys().rootPaths())
                .map(JavaxJson::mapArrayOfStrings)
                .orElse(DEFAULT_ROOT_PATHS);

        final int maxDepth = config.getInt(keys().maxDepth(), DEFAULT_MAX_DEPTH);

        return new Check(rootPaths, maxDepth);
    }

}