
com.anrisoftware.sscontrol.scripts.unpack.UnpackFactory Maven / Gradle / Ivy
The newest version!
/*
* Copyright 2014-2015 Erwin Müller
*
* This file is part of sscontrol-scripts-unix.
*
* sscontrol-scripts-unix is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* sscontrol-scripts-unix 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 Affero General Public License
* for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with sscontrol-scripts-unix. If not, see .
*/
package com.anrisoftware.sscontrol.scripts.unpack;
import java.io.File;
import java.util.Map;
import com.anrisoftware.globalpom.exec.runcommands.RunCommands;
import com.anrisoftware.globalpom.threads.api.Threads;
/**
* Factory to create unpack archives.
*
* @author Erwin Mueller, [email protected]
* @since 1.0
*/
public interface UnpackFactory {
/**
* Creates to unpack archives.
*
* @param args
* the {@link Map} arguments:
*
* - {@code runCommands} optionally, set to the
* {@link RunCommands} to record the command.
*
*
- {@code file} the {@link File} to unpack;
*
*
- {@code output} the output {@link File} directory;
*
*
- {@code override} optionally, set to {@code true} to
* override existing files;
*
*
- {@code strip} optionally, set to {@code true} to strip the
* first level directory from the archive;
*
*
- {@code commands} set the {@link Map} of command to unpack
* the archive for each archive type.
*
* - {@code tgz} tar/gz archive for extension {@code .tar.gz}
*
- {@code zip} Zip archive for extension {@code .zip}
*
*
*
* @param parent
* the {@link Object} parent script.
*
* @param threads
* the {@link Threads} pool.
*
* @return the {@link Unpack}.
*/
Unpack create(Map args, Object parent, Threads threads);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy