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

org.nuiton.eugene.plugin.writer.FriendModelChainedFileWriter Maven / Gradle / Ivy

There is a newer version: 3.0-beta-2
Show newest version
package org.nuiton.eugene.plugin.writer;

/*-
 * #%L
 * EUGene :: Maven plugin
 * %%
 * Copyright (C) 2006 - 2017 Code Lutin, Ultreia.io
 * %%
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Lesser Public License for more details.
 * 
 * You should have received a copy of the GNU General Lesser Public
 * License along with this program.  If not, see
 * .
 * #L%
 */

import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import org.nuiton.eugene.writer.ChainedFileWriterConfiguration;

/**
 * Created by tchemit on 24/06/17.
 *
 * @author Tony Chemit - [email protected]
 * @plexus.component role="org.nuiton.eugene.writer.ChainedFileWriter" role-hint="friendModel2Memory"
 */
public class FriendModelChainedFileWriter extends BaseChainedFileWriterToMemoryModel {

    @Override
    protected String getInputType() {
        return "friend";
    }

    @Override
    public String getInputProtocol() {
        return "friend";
    }

    @Override
    public boolean acceptInclude(String include) {
        return include.startsWith("friend:") ||
                include.endsWith(".friendmodel");
    }

    @Override
    public void generate(ChainedFileWriterConfiguration configuration, File outputDir, Map> filesByRoot, Map> resourcesByFile) throws IOException {
        super.generate(configuration, outputDir, filesByRoot, resourcesByFile);
    }

    @Override
    public String getDefaultIncludes() {
        return "**/*.friendmodel";
    }

    @Override
    public String getDefaultInputDirectory() {
        return "src/main/models";
    }

    @Override
    public String getDefaultOutputDirectory() {
        return "java";
    }

    @Override
    public String getDefaultTestInputDirectory() {
        return "src/test/models";
    }

    @Override
    public String getDefaultTestOutputDirectory() {
        return "test-java";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy