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

org.openl.rules.deploy.LocalProjectFolder Maven / Gradle / Ivy

There is a newer version: 5.27.9
Show newest version
package org.openl.rules.deploy;

import java.util.Collections;
import java.util.Map;

import org.openl.rules.common.ArtefactPath;
import org.openl.rules.common.ProjectException;
import org.openl.rules.common.impl.ArtefactPathImpl;
import org.openl.rules.project.abstraction.IProjectArtefact;
import org.openl.rules.project.abstraction.IProjectFolder;
import org.openl.rules.repository.api.FileData;
import org.openl.util.FileUtils;

public class LocalProjectFolder extends ALocalProjectArtefact implements IProjectFolder {

    private final FileData data;
    private final Map artefacts;

    public LocalProjectFolder(FileData data, Map artefacts) {
        super(FileUtils.getName(data.getName()));
        this.data = data;
        this.artefacts = Collections.unmodifiableMap(artefacts);
    }

    @Override
    public String getFolderPath() {
        return data.getName();
    }

    @Override
    public IProjectArtefact getArtefact(String name) throws ProjectException {
        return artefacts.get(name);
    }

    @Override
    public ArtefactPath getArtefactPath() {
        return new ArtefactPathImpl(getFolderPath());
    }

    public FileData getData() {
        return data;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy