package de.hsadmin.core.qserv;

import java.util.ArrayList;
import java.util.List;

public class CompoundProcessor extends AbstractProcessor {

	private static final long serialVersionUID = 5718623579674305929L;

	private List<Processor> aProcessors;

	public CompoundProcessor(Processor... aProcessor) {
		aProcessors = new ArrayList<Processor>();
		for (Processor aP : aProcessor) {
			aProcessors.add(aP);
		}
	}

	public Object process() throws ProcessorException {
		for (Processor aProcessor : aProcessors) {
			aProcessor.process();
		}
		return null;
	}

	public void appendProcessor(Processor aProcessor) {
		aProcessors.add(aProcessor);
	}
	
}
