package de.hsadmin.core.qserv;

public class CopyFileProcessor extends AbstractProcessor {

	private static final long serialVersionUID = 1741419610410712714L;
	
	private Processor internal;
	
	public CopyFileProcessor(String source, String target, String owner, String group, String modeMask) {
		internal = new ShellProcessor(
			"cp " + source + " " + target + " && " +
			"chown " + owner + ":" + group + " " + target + " && " +
			"chmod " + modeMask + " " + target
		);
	}

	@Override
	public Object process() throws ProcessorException {
		return internal.process();
	}

}
