Files
bapweb/src/com/eactive/eai/agent/makeDir/RemoveDirProcessCommand.java
T
Rinjae d6bf8e1943 init
2025-10-23 13:21:43 +09:00

49 lines
1.3 KiB
Java

package com.eactive.eai.agent.makeDir;
import com.eactive.eai.agent.command.Command;
import com.eactive.eai.agent.command.CommandException;
import com.eactive.eai.batch.common.BatchDirUtil;
import com.eactive.eai.common.util.Logger;
public class RemoveDirProcessCommand extends Command
{
/**
*
*/
private static final long serialVersionUID = 1L;
public RemoveDirProcessCommand() {
super("RemoveDirProcessCommand");
}
public Object execute() throws CommandException
{
Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT);
logger.info(this.name + " Agent 가 호출되었습니다.");
if ( args == null || !(args instanceof String[]) ) {
String msg = makeException("BECEAICAG001", null);
logger.error(msg);
throw new CommandException(msg);
}
try {
String[] argArray = (String[]) args;
String processCode = argArray[0];
BatchDirUtil.removeDirProcess(processCode);
logger.info(this.name + " Agent 가 성공적으로 완료되었습니다.");
return "sucess";
} catch (Exception e) {
String msg = makeException("BECEAICAG002", e);
logger.error(msg, e);
throw new CommandException(msg);
}
}
}