pac.delete remove domains before users

This commit is contained in:
Peter Hormanns 2013-03-06 12:39:40 +01:00
parent 6208e0ec8c
commit ff76f1bf59

View File

@ -81,16 +81,16 @@ public class PacProcessorFactory implements EntityProcessorFactory {
public <T extends AbstractEntity> Processor createDeleteProcessor(EntityManager em, T entity) throws ProcessorException { public <T extends AbstractEntity> Processor createDeleteProcessor(EntityManager em, T entity) throws ProcessorException {
Pac pac = (Pac) entity; Pac pac = (Pac) entity;
Hive hive = pac.getHive(); Hive hive = pac.getHive();
WaitingTasksProcessor waitingProcessor = new WaitingTasksProcessor(new CompoundProcessor( WaitingTasksProcessor waiting = new WaitingTasksProcessor(createDelUserProc(pac.getName()));
waiting.appendProcessor(pac.getHiveName(), new CompoundProcessor(
createIfDown(pac.getName()), createIfDown(pac.getName()),
createEtcHostsProc(hive), createEtcHostsProc(hive),
createNetworkInterfacesProc(hive), createNetworkInterfacesProc(hive),
createSudouersProc(hive), createSudouersProc(hive),
createProftpdConfProc(hive), createProftpdConfProc(hive),
createHttpdVirtualProc(hive), createHttpdVirtualProc(hive),
createAccountingRulesProc())); createAccountingRulesProc()), "remove packet");
waitingProcessor.appendProcessor(pac.getHiveName(), createDelUserProc(pac.getName()), "remove packet"); return waiting;
return waitingProcessor;
} }
private Processor createEtcHostsProc(Hive hive) throws ProcessorException { private Processor createEtcHostsProc(Hive hive) throws ProcessorException {