This commit is contained in:
Rinjae
2025-10-23 13:21:43 +09:00
commit d6bf8e1943
1004 changed files with 192647 additions and 0 deletions
@@ -0,0 +1,37 @@
package com.eactive.eai.agent.rule.dirInfo;
import com.eactive.eai.agent.command.Command;
import com.eactive.eai.agent.command.CommandException;
import com.eactive.eai.batch.rule.dirInfo.DirInfoManager;
import com.eactive.eai.common.util.Logger;
public class RefreshAllJobCommand extends Command
{
/**
*
*/
private static final long serialVersionUID = 1L;
public RefreshAllJobCommand(String name) {
super(name);
}
public Object execute() throws CommandException
{
Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT);
logger.info(this.name + " Agent 가 호출되었습니다.");
try {
DirInfoManager.getInstance().loadAllFileInfo();
logger.info(this.name + " Agent 가 성공적으로 완료되었습니다.");
return "sucess";
} catch (Exception e) {
String msg = makeException("BECEAICAG002", e);
logger.error(msg, e);
throw new CommandException(msg);
}
}
}
@@ -0,0 +1,58 @@
package com.eactive.eai.agent.rule.nodeinfo;
import java.util.ArrayList;
import java.util.HashMap;
import com.eactive.eai.agent.command.Command;
import com.eactive.eai.agent.command.CommandException;
import com.eactive.eai.batch.rule.nodeinfo.NodeInfoDAO;
import com.eactive.eai.batch.rule.nodeinfo.NodeInfoManager;
import com.eactive.eai.batch.rule.nodeinfo.NodeInfoVO;
import com.eactive.eai.common.dao.DAOFactory;
import com.eactive.eai.common.util.Logger;
public class RemoveNodeInfoCommand extends Command
{
/**
*
*/
private static final long serialVersionUID = 1L;
public RemoveNodeInfoCommand(String name) {
super(name);
}
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(this.name+" " + msg);
throw new CommandException(msg);
}
try {
String strRuleCode = (String)args;
logger.info(this.name +": (Agent Argument) RuleCode=["+strRuleCode+"]");
NodeInfoDAO dao = (NodeInfoDAO)DAOFactory.newInstance().create(NodeInfoDAO.class);
HashMap<String, ArrayList<NodeInfoVO>> map = dao.getAllNodeInfo();
ArrayList<NodeInfoVO> al = map.get(strRuleCode);
if (al == null) {
NodeInfoManager.getInstance().removeRuleCodeArray(strRuleCode);
}else{
NodeInfoManager.getInstance().setRuleCodeArray(strRuleCode, al);
}
logger.info(this.name + " Agent 가 성공적으로 완료되었습니다.");
return "success";
} catch (Exception ex) {
String msg = makeException("BECEAICAG002", ex);
logger.error(msg, ex);
throw new CommandException(msg);
}
}
}
@@ -0,0 +1,59 @@
package com.eactive.eai.agent.rule.nodeinfo;
import java.util.ArrayList;
import java.util.HashMap;
import com.eactive.eai.agent.command.Command;
import com.eactive.eai.agent.command.CommandException;
import com.eactive.eai.batch.rule.nodeinfo.NodeInfoDAO;
import com.eactive.eai.batch.rule.nodeinfo.NodeInfoManager;
import com.eactive.eai.batch.rule.nodeinfo.NodeInfoVO;
import com.eactive.eai.common.dao.DAOFactory;
import com.eactive.eai.common.util.Logger;
public class UpdateNodeInfoCommand extends Command
{
/**
*
*/
private static final long serialVersionUID = 1L;
public UpdateNodeInfoCommand(String name) {
super(name);
}
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(this.name+" " + msg);
throw new CommandException(msg);
}
try {
String strRuleCode = (String)args;
logger.info(this.name +": (Agent Argument) RuleCode=["+strRuleCode+"]");
NodeInfoDAO dao = (NodeInfoDAO)DAOFactory.newInstance().create(NodeInfoDAO.class);
HashMap<String, ArrayList<NodeInfoVO>> map = dao.getAllNodeInfo();
ArrayList<NodeInfoVO> al = map.get(strRuleCode);
if (al == null) {
String errMsg = this.name + ": error >> RuleCode [" + strRuleCode + "] not found in DBMS";
logger.error(errMsg);
return errMsg;
}
NodeInfoManager.getInstance().setRuleCodeArray(strRuleCode, al);
logger.info(this.name + " Agent 가 성공적으로 완료되었습니다.");
return "success";
} catch (Exception ex) {
String msg = makeException("BECEAICAG002", ex);
logger.error(msg, ex);
throw new CommandException(msg);
}
}
}
@@ -0,0 +1,46 @@
package com.eactive.eai.agent.rule.phaseinfo;
import com.eactive.eai.agent.command.Command;
import com.eactive.eai.agent.command.CommandException;
import com.eactive.eai.batch.rule.phaseinfo.PhaseInfoManager;
import com.eactive.eai.common.util.Logger;
public class RemovePhaseInfoCommand extends Command
{
/**
*
*/
private static final long serialVersionUID = 1L;
public RemovePhaseInfoCommand(String name) {
super(name);
}
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(this.name+" "+ msg);
throw new CommandException(msg);
}
try {
String strRuleCode = (String)args;
logger.info(this.name +": (Agent Argument) RuleCode=["+strRuleCode+"]");
PhaseInfoManager.getInstance().removeRuleCodeArray(strRuleCode);
logger.info(this.name + " Agent 가 성공적으로 완료되었습니다.");
return "success";
} catch (Exception ex) {
String msg = makeException("BECEAICAG002", ex);
logger.error(msg, ex);
throw new CommandException(msg);
}
}
}
@@ -0,0 +1,59 @@
package com.eactive.eai.agent.rule.phaseinfo;
import java.util.ArrayList;
import java.util.HashMap;
import com.eactive.eai.agent.command.Command;
import com.eactive.eai.agent.command.CommandException;
import com.eactive.eai.batch.rule.phaseinfo.PhaseInfoDAO;
import com.eactive.eai.batch.rule.phaseinfo.PhaseInfoManager;
import com.eactive.eai.batch.rule.phaseinfo.PhaseInfoVO;
import com.eactive.eai.common.dao.DAOFactory;
import com.eactive.eai.common.util.Logger;
public class UpdatePhaseInfoCommand extends Command
{
/**
*
*/
private static final long serialVersionUID = 1L;
public UpdatePhaseInfoCommand(String name) {
super(name);
}
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(this.name+" "+ msg);
throw new CommandException(msg);
}
try {
String strRuleCode = (String)args;
logger.info(this.name +": (Agent Argument) RuleCode=["+strRuleCode+"]");
PhaseInfoDAO dao = (PhaseInfoDAO)DAOFactory.newInstance().create(PhaseInfoDAO.class);
HashMap<String, ArrayList<PhaseInfoVO>> map = dao.getAllPhaseInfos();
ArrayList<PhaseInfoVO> al = map.get(strRuleCode);
if (al == null) {
String errMsg = this.name + ": error >> RuleCode [" + strRuleCode + "] not found in DBMS";
logger.error(errMsg);
return errMsg;
}
PhaseInfoManager.getInstance().setRuleCodeArray(strRuleCode, al);
logger.info(this.name + " Agent 가 성공적으로 완료되었습니다.");
return "success";
} catch (Exception ex) {
String msg = makeException("BECEAICAG002", ex);
logger.error(msg, ex);
throw new CommandException(msg);
}
}
}
@@ -0,0 +1,58 @@
package com.eactive.eai.agent.rule.ruleinfo;
import java.util.HashMap;
import com.eactive.eai.agent.command.Command;
import com.eactive.eai.agent.command.CommandException;
import com.eactive.eai.batch.rule.ruleinfo.RuleInfoDAO;
import com.eactive.eai.batch.rule.ruleinfo.RuleInfoManager;
import com.eactive.eai.batch.rule.ruleinfo.RuleInfoVO;
import com.eactive.eai.common.dao.DAOFactory;
import com.eactive.eai.common.util.Logger;
public class AddRuleInfoCommand extends Command
{
/**
*
*/
private static final long serialVersionUID = 1L;
public AddRuleInfoCommand() {
super("AddRuleInfoCommand");
}
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(this.name+" "+ msg);
throw new CommandException(msg);
}
try {
String strRuleCode = (String)args;
logger.info(this.name +": (Agent Argument) RuleCode=["+strRuleCode+"]");
RuleInfoDAO dao = (RuleInfoDAO)DAOFactory.newInstance().create(RuleInfoDAO.class);
HashMap<String, RuleInfoVO> map = dao.getAllRuleInfo();
RuleInfoVO vo = map.get(strRuleCode);
if (vo == null) {
String errMsg = this.name + ": error >> RuleCode [" + strRuleCode + "] not found in DBMS";
logger.error(errMsg);
return errMsg;
}
RuleInfoManager.getInstance().setRuleCodeArray(strRuleCode, vo);
logger.info(this.name + " Agent 가 성공적으로 완료되었습니다.");
return "success";
} catch (Exception ex) {
String msg = makeException("BECEAICAG002", ex);
logger.error(msg, ex);
throw new CommandException(msg);
}
}
}
@@ -0,0 +1,47 @@
package com.eactive.eai.agent.rule.ruleinfo;
import com.eactive.eai.agent.command.Command;
import com.eactive.eai.agent.command.CommandException;
import com.eactive.eai.batch.rule.ruleinfo.RuleInfoManager;
import com.eactive.eai.common.util.Logger;
public class RemoveRuleInfoCommand extends Command
{
/**
*
*/
private static final long serialVersionUID = 1L;
public RemoveRuleInfoCommand() {
super("RemoveRuleInfoCommand");
}
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(this.name+" "+ msg);
throw new CommandException(msg);
}
try {
String strRuleCode = (String)args;
logger.info(this.name +": (Agent Argument) RuleCode=["+strRuleCode+"]");
RuleInfoManager.getInstance().removeRuleCodeArray(strRuleCode);
logger.info(this.name + " Agent 가 성공적으로 완료되었습니다.");
return "success";
} catch (Exception ex) {
String msg = makeException("BECEAICAG002", ex);
logger.error(msg, ex);
throw new CommandException(msg);
}
}
}
@@ -0,0 +1,58 @@
package com.eactive.eai.agent.rule.ruleinfo;
import java.util.HashMap;
import com.eactive.eai.agent.command.Command;
import com.eactive.eai.agent.command.CommandException;
import com.eactive.eai.batch.rule.ruleinfo.RuleInfoDAO;
import com.eactive.eai.batch.rule.ruleinfo.RuleInfoManager;
import com.eactive.eai.batch.rule.ruleinfo.RuleInfoVO;
import com.eactive.eai.common.dao.DAOFactory;
import com.eactive.eai.common.util.Logger;
public class UpdateRuleInfoCommand extends Command
{
/**
*
*/
private static final long serialVersionUID = 1L;
public UpdateRuleInfoCommand() {
super("UpdateRuleInfoCommand");
}
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(this.name+" "+ msg);
throw new CommandException(msg);
}
try {
String strRuleCode = (String)args;
logger.info(this.name +": (Agent Argument) RuleCode=["+strRuleCode+"]");
RuleInfoDAO dao = (RuleInfoDAO)DAOFactory.newInstance().create(RuleInfoDAO.class);
HashMap<String, RuleInfoVO> map = dao.getAllRuleInfo();
RuleInfoVO vo = map.get(strRuleCode);
if (vo == null) {
String errMsg = this.name + ": error >> RuleCode [" + strRuleCode + "] not found in DBMS";
logger.error(errMsg);
return errMsg;
}
RuleInfoManager.getInstance().setRuleCodeArray(strRuleCode, vo);
logger.info(this.name + " Agent 가 성공적으로 완료되었습니다.");
return "success";
} catch (Exception ex) {
String msg = makeException("BECEAICAG002", ex);
logger.error(msg, ex);
throw new CommandException(msg);
}
}
}
@@ -0,0 +1,60 @@
package com.eactive.eai.agent.rule.telegraminfo;
import java.util.HashMap;
import com.eactive.eai.agent.command.Command;
import com.eactive.eai.agent.command.CommandException;
import com.eactive.eai.batch.rule.telegraminfo.TelegramInfoDAO;
import com.eactive.eai.batch.rule.telegraminfo.TelegramInfoManager;
import com.eactive.eai.batch.rule.telegraminfo.TelegramInfoVO;
import com.eactive.eai.common.dao.DAOFactory;
import com.eactive.eai.common.util.Logger;
public class AddTelegramInfoCommand extends Command
{
/**
*
*/
private static final long serialVersionUID = 1L;
public AddTelegramInfoCommand() {
super("AddTelegramInfoCommand");
}
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(this.name+" "+ msg);
throw new CommandException(msg);
}
try {
String strRuleCode = (String)args;
logger.info(this.name +": (Agent Argument) RuleCode=["+strRuleCode+"]");
TelegramInfoDAO dao = (TelegramInfoDAO)DAOFactory.newInstance().create(TelegramInfoDAO.class);
HashMap<String, TelegramInfoVO> map = dao.getAllTelegramInfos();
TelegramInfoVO vo = map.get(strRuleCode);
if (vo == null) {
String errMsg = this.name + ": error >> RuleCode [" + strRuleCode + "] not found in DBMS";
logger.error(errMsg);
throw new CommandException(errMsg);
}
TelegramInfoManager.getInstance().setRuleCodeArray(strRuleCode, vo);
logger.info(this.name + " Agent 가 성공적으로 완료되었습니다.");
return "success";
} catch (Exception ex) {
String msg = makeException("BECEAICAG002", ex);
logger.error(msg, ex);
throw new CommandException(msg);
}
}
}
@@ -0,0 +1,49 @@
package com.eactive.eai.agent.rule.telegraminfo;
import com.eactive.eai.agent.command.Command;
import com.eactive.eai.agent.command.CommandException;
import com.eactive.eai.batch.rule.telegraminfo.TelegramInfoManager;
import com.eactive.eai.common.util.Logger;
public class RemoveTelegramInfoCommand extends Command
{
/**
*
*/
private static final long serialVersionUID = 1L;
public RemoveTelegramInfoCommand(String name) {
super(name);
}
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(this.name+" "+ msg);
throw new CommandException(msg);
}
try {
String strRuleCode = ((String)args).trim();
logger.info(this.name +": (Agent Argument) RuleCode=["+strRuleCode+"]");
TelegramInfoManager.getInstance().removeRuleCodeArray(strRuleCode);
logger.info(this.name + " Agent 가 성공적으로 완료되었습니다.");
return "success";
} catch (Exception ex) {
String msg = makeException("BECEAICAG002", ex);
logger.error(msg, ex);
throw new CommandException(msg);
}
}
}
@@ -0,0 +1,59 @@
package com.eactive.eai.agent.rule.telegraminfo;
import java.util.HashMap;
import com.eactive.eai.agent.command.Command;
import com.eactive.eai.agent.command.CommandException;
import com.eactive.eai.batch.rule.telegraminfo.TelegramInfoDAO;
import com.eactive.eai.batch.rule.telegraminfo.TelegramInfoManager;
import com.eactive.eai.batch.rule.telegraminfo.TelegramInfoVO;
import com.eactive.eai.common.dao.DAOFactory;
import com.eactive.eai.common.util.Logger;
public class UpdateTelegramInfoCommand extends Command
{
/**
*
*/
private static final long serialVersionUID = 1L;
public UpdateTelegramInfoCommand(String name) {
super(name);
}
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(this.name+" "+ msg);
throw new CommandException(msg);
}
try {
String strRuleCode = ((String)args).trim();
logger.info(this.name +": (Agent Argument) RuleCode=["+strRuleCode+"]");
TelegramInfoDAO dao = (TelegramInfoDAO)DAOFactory.newInstance().create(TelegramInfoDAO.class);
HashMap<String, TelegramInfoVO> map = dao.getAllTelegramInfos();
TelegramInfoVO vo = map.get(strRuleCode);
if (vo == null) {
String errMsg = this.name + ": error >> RuleCode [" + strRuleCode + "] not found in DBMS";
logger.error(errMsg);
return errMsg;
}
TelegramInfoManager.getInstance().setRuleCodeArray(strRuleCode, vo);
logger.info(this.name + " Agent 가 성공적으로 완료되었습니다.");
return "success";
} catch (Exception ex) {
String msg = makeException("BECEAICAG002", ex);
logger.error(msg, ex);
throw new CommandException(msg);
}
}
}