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

com.manywho.sdk.services.files.FileService Maven / Gradle / Ivy

There is a newer version: 2.0.1
Show newest version
package com.manywho.sdk.services.files;

import com.google.inject.Injector;
import com.manywho.sdk.api.run.elements.type.MObject;
import com.manywho.sdk.services.types.TypeBuilder;
import com.manywho.sdk.services.types.system.$File;

import javax.inject.Inject;
import java.util.List;

public class FileService {
    private final TypeBuilder typeBuilder;
    private final Injector injector;

    @Inject
    public FileService(TypeBuilder typeBuilder, Injector injector) {
        this.typeBuilder = typeBuilder;
        this.injector = injector;
    }

    FileHandler createFileHandler(Class handlerClass) {
        return injector.getInstance(handlerClass);
    }

    List createFileObject($File file) {
        return typeBuilder.from(file);
    }

    List createFileObjects(List<$File> files) {
        return typeBuilder.from(files);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy