All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.kolibrifx.plovercrest.server.local.DefaultPlovercrestProvider Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2010-2017, KolibriFX AS. Licensed under the Apache License, version 2.0.
 */

package com.kolibrifx.plovercrest.server.local;

import java.io.File;
import com.kolibrifx.plovercrest.client.PlovercrestLocal;
import com.kolibrifx.plovercrest.client.PlovercrestProvider;
import com.kolibrifx.plovercrest.client.TableSerializerFactory;
import com.kolibrifx.plovercrest.client.remote.DefaultPlovercrestRemoteProvider;

public class DefaultPlovercrestProvider extends DefaultPlovercrestRemoteProvider implements PlovercrestProvider {

    public DefaultPlovercrestProvider(final TableSerializerFactory serializerFactory) {
        super(serializerFactory);
    }

    @Override
    public PlovercrestLocal createLocal(final String path) {
        final File file = new File(path);
        if (!file.exists()) {
            file.mkdirs();
        }
        return new DefaultPlovercrestLocal(serializerFactory, path);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy