/*
 * Copyright 2021 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.tomcat.vestige.full_installer;

import java.io.File;
import java.io.IOException;

import org.apache.tomcat.vestige.installer.FileAdder;
import org.apache.tomcat.vestige.installer.InstallerUtils;
import org.apache.tomcat.vestige.installer.TomcatVestigeInstaller;

/**
 * @author Gael Lalire
 */
public class TomcatVestigeFullInstaller extends TomcatVestigeInstaller {

    public TomcatVestigeFullInstaller(final File base) {
        super(base);
    }
    
    @Override
    public void getPreResources(FileAdder fileAdder) throws IOException {
        super.getPreResources(fileAdder);
        InstallerUtils.addFile(TomcatVestigeFullInstaller.class, "myresource.txt", "pre-resources/mypackage/myresource.txt", fileAdder);
    }
    
    @Override
    public void getWebapps(FileAdder fileAdder) throws IOException {
        super.getWebapps(fileAdder);
        InstallerUtils.addFiles(TomcatVestigeFullInstaller.class, "webapps.txt", fileAdder);
        InstallerUtils.addFile(TomcatVestigeFullInstaller.class, "mywar.vwar", "webapps/mywar.vwar", fileAdder);
        InstallerUtils.addFile(TomcatVestigeFullInstaller.class, "vwar-1.0.0.xsd", "webapps/vwar-1.0.0.xsd", fileAdder);
    }

}
