use of com.cubrid.cubridmanager.core.logs.model.AnalyzeCasLogTopResultInfo in project cubrid-manager by CUBRID.
the class GetCasLogTopResultTask method getAnalyzeCasLogTopResultList.
/**
* get result from the response
*
* @return AnalyzeCasLogTopResultInfo
*/
public AnalyzeCasLogTopResultInfo getAnalyzeCasLogTopResultList() {
TreeNode response = getResponse();
if (response == null || (this.getErrorMsg() != null && getErrorMsg().trim().length() > 0)) {
return null;
}
AnalyzeCasLogTopResultInfo analyzeCasLogTopResultList = new AnalyzeCasLogTopResultInfo();
if (response != null && response.getValue("logstringlist") != null && response.getValue("logstringlist").equals("start")) {
String[] results = response.getValues("logstring");
for (int j = 0; j < results.length; j++) {
String str = results[j];
analyzeCasLogTopResultList.addLogString(str);
}
}
return analyzeCasLogTopResultList;
}
use of com.cubrid.cubridmanager.core.logs.model.AnalyzeCasLogTopResultInfo in project cubrid-manager by CUBRID.
the class LogsModelTest method testModelAnalyzeCasLogTopResultInfo.
public void testModelAnalyzeCasLogTopResultInfo() {
AnalyzeCasLogTopResultInfo bean = new AnalyzeCasLogTopResultInfo();
assertEquals(bean.getTaskName(), "getcaslogtopresult");
bean.addLogString("a");
assertEquals(bean.getLogString().get(0), "a");
}
use of com.cubrid.cubridmanager.core.logs.model.AnalyzeCasLogTopResultInfo in project cubrid-manager by CUBRID.
the class ManagerLogInfoListTest method testModelAnalyzeCasLogTopResultInfo.
public void testModelAnalyzeCasLogTopResultInfo() {
AnalyzeCasLogTopResultInfo bean = new AnalyzeCasLogTopResultInfo();
assertEquals(bean.getTaskName(), "getcaslogtopresult");
bean.addLogString("a");
assertEquals(bean.getLogString().get(0), "a");
}
use of com.cubrid.cubridmanager.core.logs.model.AnalyzeCasLogTopResultInfo in project cubrid-manager by CUBRID.
the class LogsModelTest method testModelAnalyzeCasLogTopResultInfo.
public void testModelAnalyzeCasLogTopResultInfo() {
AnalyzeCasLogTopResultInfo bean = new AnalyzeCasLogTopResultInfo();
assertEquals(bean.getTaskName(), "getcaslogtopresult");
bean.addLogString("a");
bean.addLogString("b");
assertEquals(bean.getLogString().get(0), "a");
}
use of com.cubrid.cubridmanager.core.logs.model.AnalyzeCasLogTopResultInfo in project cubrid-manager by CUBRID.
the class SqlLogAnalyzeResultDialog method connect.
/**
* each page of log connect
*
* @param qindex String
* @param queryString StringBuffer
* @return queryString
*/
public StringBuilder connect(String qindex, StringBuilder queryString) {
final GetCasLogTopResultTask task = new GetCasLogTopResultTask(node.getServer().getServerInfo());
task.setFileName(resultFile);
task.setQindex(qindex);
TaskExecutor taskExecutor = new CommonTaskExec(Messages.loadLogTaskName);
taskExecutor.addTask(task);
new ExecTaskWithProgress(taskExecutor).exec();
if (taskExecutor.isSuccess() && task.getAnalyzeCasLogTopResultList() != null) {
AnalyzeCasLogTopResultInfo resultInfo = (AnalyzeCasLogTopResultInfo) task.getAnalyzeCasLogTopResultList();
if (resultInfo != null && resultInfo.getLogString() != null) {
for (String logString : resultInfo.getLogString()) {
queryString.append(logString + "\n");
}
}
}
return queryString;
}
Aggregations