|
@@ -117,7 +117,7 @@ bool doAction(IEspContext& context, StringArray& wuids, CECLWUActions action, IP
|
|
|
const char* strAction = (action < NumOfECLWUActionNames) ? ECLWUActionNames[action] : "Unknown Action";
|
|
|
for(aindex_t i=0; i<wuids.length();i++)
|
|
|
{
|
|
|
- StringBuffer wuidStr = wuids.item(i);
|
|
|
+ StringBuffer wuidStr(wuids.item(i));
|
|
|
const char* wuid = wuidStr.trim().str();
|
|
|
if (isEmpty(wuid))
|
|
|
{
|
|
@@ -513,7 +513,7 @@ bool CWsWorkunitsEx::onWUUpdate(IEspContext &context, IEspWUUpdateRequest &req,
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuid = req.getWuid();
|
|
|
+ StringBuffer wuid(req.getWuid());
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUUpdate", wuid);
|
|
|
|
|
|
ensureWsWorkunitAccess(context, wuid.str(), SecAccess_Write);
|
|
@@ -815,7 +815,7 @@ bool CWsWorkunitsEx::onWUResubmit(IEspContext &context, IEspWUResubmitRequest &r
|
|
|
IArrayOf<IEspResubmittedWU> resubmittedWUs;
|
|
|
for(aindex_t i=0; i<req.getWuids().length();i++)
|
|
|
{
|
|
|
- StringBuffer requestWuid = req.getWuids().item(i);
|
|
|
+ StringBuffer requestWuid(req.getWuids().item(i));
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUResubmit", requestWuid);
|
|
|
|
|
|
ensureWsWorkunitAccess(context, requestWuid.str(), SecAccess_Write);
|
|
@@ -919,7 +919,7 @@ bool CWsWorkunitsEx::onWUSchedule(IEspContext &context, IEspWUScheduleRequest &r
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuid = req.getWuid();
|
|
|
+ StringBuffer wuid(req.getWuid());
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUSchedule", wuid);
|
|
|
|
|
|
const char* cluster = req.getCluster();
|
|
@@ -974,7 +974,7 @@ bool CWsWorkunitsEx::onWUSubmit(IEspContext &context, IEspWUSubmitRequest &req,
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuid = req.getWuid();
|
|
|
+ StringBuffer wuid(req.getWuid());
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUSubmit", wuid);
|
|
|
|
|
|
const char *cluster = req.getCluster();
|
|
@@ -1041,7 +1041,7 @@ bool CWsWorkunitsEx::onWURun(IEspContext &context, IEspWURunRequest &req, IEspWU
|
|
|
if (notEmpty(cluster) && !isValidCluster(cluster))
|
|
|
throw MakeStringException(ECLWATCH_INVALID_CLUSTER_NAME, "Invalid cluster name: %s", cluster);
|
|
|
|
|
|
- StringBuffer wuidStr = req.getWuid();
|
|
|
+ StringBuffer wuidStr(req.getWuid());
|
|
|
const char* runWuid = wuidStr.trim().str();
|
|
|
StringBuffer wuid;
|
|
|
|
|
@@ -1114,7 +1114,7 @@ bool CWsWorkunitsEx::onWUFullResult(IEspContext &context, IEspWUFullResultReques
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuid = req.getWuid();
|
|
|
+ StringBuffer wuid(req.getWuid());
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUFullResult", wuid);
|
|
|
|
|
|
ErrorSeverity severity = checkGetExceptionSeverity(req.getExceptionSeverity());
|
|
@@ -1167,7 +1167,7 @@ bool CWsWorkunitsEx::onWUWaitCompiled(IEspContext &context, IEspWUWaitRequest &r
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuid = req.getWuid();
|
|
|
+ StringBuffer wuid(req.getWuid());
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUWaitCompiled", wuid);
|
|
|
ensureWsWorkunitAccess(context, wuid.str(), SecAccess_Full);
|
|
|
PROGLOG("WUWaitCompiled: %s", wuid.str());
|
|
@@ -1190,7 +1190,7 @@ bool CWsWorkunitsEx::onWUWaitComplete(IEspContext &context, IEspWUWaitRequest &r
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuid = req.getWuid();
|
|
|
+ StringBuffer wuid(req.getWuid());
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUWaitComplete", wuid);
|
|
|
ensureWsWorkunitAccess(context, wuid.str(), SecAccess_Full);
|
|
|
PROGLOG("WUWaitComplete: %s", wuid.str());
|
|
@@ -1207,7 +1207,7 @@ bool CWsWorkunitsEx::onWUCDebug(IEspContext &context, IEspWUDebugRequest &req, I
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuid = req.getWuid();
|
|
|
+ StringBuffer wuid(req.getWuid());
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUCDebug", wuid);
|
|
|
ensureWsWorkunitAccess(context, wuid.str(), SecAccess_Full);
|
|
|
PROGLOG("WUCDebug: %s", wuid.str());
|
|
@@ -1547,7 +1547,7 @@ bool CWsWorkunitsEx::onWUInfo(IEspContext &context, IEspWUInfoRequest &req, IEsp
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuid = req.getWuid();
|
|
|
+ StringBuffer wuid(req.getWuid());
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUInfo", wuid);
|
|
|
|
|
|
double version = context.getClientVersion();
|
|
@@ -1672,7 +1672,7 @@ bool CWsWorkunitsEx::onWUInfoDetails(IEspContext &context, IEspWUInfoRequest &re
|
|
|
|
|
|
bool CWsWorkunitsEx::onWUResultView(IEspContext &context, IEspWUResultViewRequest &req, IEspWUResultViewResponse &resp)
|
|
|
{
|
|
|
- StringBuffer wuid = req.getWuid();
|
|
|
+ StringBuffer wuid(req.getWuid());
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUResultView", wuid);
|
|
|
|
|
|
ensureWsWorkunitAccess(context, wuid.str(), SecAccess_Read);
|
|
@@ -2520,7 +2520,7 @@ bool CWsWorkunitsEx::onWUQuery(IEspContext &context, IEspWUQueryRequest & req, I
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuidStr = req.getWuid();
|
|
|
+ StringBuffer wuidStr(req.getWuid());
|
|
|
const char* wuid = wuidStr.trim().str();
|
|
|
|
|
|
if (req.getType() && strieq(req.getType(), "archived workunits"))
|
|
@@ -2956,7 +2956,7 @@ bool CWsWorkunitsEx::onWUFile(IEspContext &context,IEspWULogFileRequest &req, IE
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuidStr = req.getWuid();
|
|
|
+ StringBuffer wuidStr(req.getWuid());
|
|
|
const char* wuidIn = wuidStr.trim().str();
|
|
|
if (wuidIn && *wuidIn)
|
|
|
{
|
|
@@ -3180,7 +3180,7 @@ bool CWsWorkunitsEx::onWUResultBin(IEspContext &context,IEspWUResultBinRequest &
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuidStr = req.getWuid();
|
|
|
+ StringBuffer wuidStr(req.getWuid());
|
|
|
const char* wuidIn = wuidStr.trim().str();
|
|
|
if (wuidIn && *wuidIn)
|
|
|
{
|
|
@@ -3334,7 +3334,7 @@ bool CWsWorkunitsEx::onWUResultSummary(IEspContext &context, IEspWUResultSummary
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuid = req.getWuid();
|
|
|
+ StringBuffer wuid(req.getWuid());
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUResultSummary", wuid);
|
|
|
|
|
|
Owned<IWorkUnitFactory> factory = getWorkUnitFactory(context.querySecManager(), context.queryUser());
|
|
@@ -3369,7 +3369,7 @@ bool CWsWorkunitsEx::onWUResult(IEspContext &context, IEspWUResultRequest &req,
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuidStr = req.getWuid();
|
|
|
+ StringBuffer wuidStr(req.getWuid());
|
|
|
const char* wuid = wuidStr.trim().str();
|
|
|
if (wuid && *wuid)
|
|
|
{
|
|
@@ -3712,7 +3712,7 @@ bool CWsWorkunitsEx::onWUListLocalFileRequired(IEspContext& context, IEspWUListL
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuid = req.getWuid();
|
|
|
+ StringBuffer wuid(req.getWuid());
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUListLocalFileRequired", wuid);
|
|
|
|
|
|
ensureWsWorkunitAccess(context, wuid.str(), SecAccess_Read);
|
|
@@ -3812,7 +3812,7 @@ bool CWsWorkunitsEx::onWUAddLocalFileToWorkunit(IEspContext& context, IEspWUAddL
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuid = req.getWuid();
|
|
|
+ StringBuffer wuid(req.getWuid());
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUAddLocalFileToWorkunit", wuid);
|
|
|
ensureWsWorkunitAccess(context, wuid.str(), SecAccess_Write);
|
|
|
resp.setWuid(wuid.str());
|
|
@@ -3904,12 +3904,12 @@ bool CWsWorkunitsEx::onWUGetGraphNameAndTypes(IEspContext &context,IEspWUGetGrap
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuid = req.getWuid();
|
|
|
+ StringBuffer wuid(req.getWuid());
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUGraphQuery", wuid);
|
|
|
ensureWsWorkunitAccess(context, wuid.str(), SecAccess_Read);
|
|
|
PROGLOG("WUGetGraphNameAndTypes: %s", wuid.str());
|
|
|
|
|
|
- StringBuffer type = req.getType();
|
|
|
+ StringBuffer type(req.getType());
|
|
|
WUGraphType graphType = GraphTypeAny;
|
|
|
if (type.trim().length())
|
|
|
graphType = getGraphTypeFromString(type.str());
|
|
@@ -3931,7 +3931,7 @@ bool CWsWorkunitsEx::onWUProcessGraph(IEspContext &context,IEspWUProcessGraphReq
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuid = req.getWuid();
|
|
|
+ StringBuffer wuid(req.getWuid());
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUProcessGraph", wuid);
|
|
|
|
|
|
Owned<IWorkUnitFactory> factory = getWorkUnitFactory(context.querySecManager(), context.queryUser());
|
|
@@ -4027,7 +4027,7 @@ bool CWsWorkunitsEx::onWUGetGraph(IEspContext& context, IEspWUGetGraphRequest& r
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuid = req.getWuid();
|
|
|
+ StringBuffer wuid(req.getWuid());
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUGetGraph", wuid);
|
|
|
|
|
|
Owned<IWorkUnitFactory> factory = getWorkUnitFactory(context.querySecManager(), context.queryUser());
|
|
@@ -4089,7 +4089,7 @@ bool CWsWorkunitsEx::onWUDetails(IEspContext &context, IEspWUDetailsRequest &req
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuid = req.getWUID();
|
|
|
+ StringBuffer wuid(req.getWUID());
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUDetails", wuid);
|
|
|
|
|
|
PROGLOG("WUDetails: %s", wuid.str());
|
|
@@ -4245,7 +4245,7 @@ bool CWsWorkunitsEx::onWUGraphInfo(IEspContext &context,IEspWUGraphInfoRequest &
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuid = req.getWuid();
|
|
|
+ StringBuffer wuid(req.getWuid());
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUGraphInfo", wuid);
|
|
|
|
|
|
Owned<IWorkUnitFactory> factory = getWorkUnitFactory(context.querySecManager(), context.queryUser());
|
|
@@ -4274,7 +4274,7 @@ bool CWsWorkunitsEx::onWUGVCGraphInfo(IEspContext &context,IEspWUGVCGraphInfoReq
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuid = req.getWuid();
|
|
|
+ StringBuffer wuid(req.getWuid());
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUGVCGraphInfo", wuid);
|
|
|
|
|
|
Owned<IWorkUnitFactory> factory = getWorkUnitFactory(context.querySecManager(), context.queryUser());
|
|
@@ -4314,7 +4314,7 @@ bool CWsWorkunitsEx::onWUGraphTiming(IEspContext &context, IEspWUGraphTimingRequ
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuid = req.getWuid();
|
|
|
+ StringBuffer wuid(req.getWuid());
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUGraphTiming", wuid);
|
|
|
|
|
|
Owned<IWorkUnitFactory> factory = getWorkUnitFactory(context.querySecManager(), context.queryUser());
|
|
@@ -4756,7 +4756,7 @@ bool CWsWorkunitsEx::onWUGetZAPInfo(IEspContext &context, IEspWUGetZAPInfoReques
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- StringBuffer wuid = req.getWUID();
|
|
|
+ StringBuffer wuid(req.getWUID());
|
|
|
WsWuHelpers::checkAndTrimWorkunit("WUGetZAPInfo", wuid);
|
|
|
|
|
|
Owned<IWorkUnitFactory> factory = getWorkUnitFactory(context.querySecManager(), context.queryUser());
|
|
@@ -4917,7 +4917,7 @@ bool CWsWorkunitsEx::onWUGetStats(IEspContext &context, IEspWUGetStatsRequest &r
|
|
|
if (!req.getCreateDescriptions_isNull())
|
|
|
createDescriptions = req.getCreateDescriptions();
|
|
|
|
|
|
- StringBuffer wuid = req.getWUID();
|
|
|
+ StringBuffer wuid(req.getWUID());
|
|
|
PROGLOG("WUGetStats: %s", wuid.str());
|
|
|
|
|
|
IArrayOf<IEspWUStatisticItem> statistics;
|
|
@@ -5241,7 +5241,7 @@ void CWsWorkunitsEx::deployEclDefinition(IEspContext &context, const char *targe
|
|
|
void CWsWorkunitsEx::publishEclDefinition(IEspContext &context, const char *target, const char *eclDefinition,
|
|
|
int msToWait, IEspWUEclDefinitionActionRequest &req, IArrayOf<IConstWUEclDefinitionActionResult> &results)
|
|
|
{
|
|
|
- StringBuffer priorityReq = req.getPriority();
|
|
|
+ StringBuffer priorityReq(req.getPriority());
|
|
|
if (priorityReq.trim().length() && !isValidPriorityValue(priorityReq.str()))
|
|
|
{
|
|
|
VStringBuffer msg("Invalid Priority: %s", priorityReq.str());
|
|
@@ -5249,7 +5249,7 @@ void CWsWorkunitsEx::publishEclDefinition(IEspContext &context, const char *targ
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- StringBuffer memoryLimitReq = req.getMemoryLimit();
|
|
|
+ StringBuffer memoryLimitReq(req.getMemoryLimit());
|
|
|
if (memoryLimitReq.trim().length() && !isValidMemoryValue(memoryLimitReq.str()))
|
|
|
{
|
|
|
VStringBuffer msg("Invalid MemoryLimit: %s", memoryLimitReq.str());
|
|
@@ -5275,9 +5275,9 @@ void CWsWorkunitsEx::publishEclDefinition(IEspContext &context, const char *targ
|
|
|
}
|
|
|
|
|
|
//Do publish now
|
|
|
- StringBuffer comment = req.getComment();
|
|
|
- StringBuffer remoteDali = req.getRemoteDali();
|
|
|
- StringBuffer sourceProcess = req.getSourceProcess();
|
|
|
+ StringBuffer comment(req.getComment());
|
|
|
+ StringBuffer remoteDali(req.getRemoteDali());
|
|
|
+ StringBuffer sourceProcess(req.getSourceProcess());
|
|
|
int timeLimit = req.getTimeLimit();
|
|
|
int warnTimeLimit = req.getWarnTimeLimit();
|
|
|
|
|
@@ -5349,7 +5349,7 @@ bool CWsWorkunitsEx::onWUEclDefinitionAction(IEspContext &context, IEspWUEclDefi
|
|
|
|
|
|
ensureWsCreateWorkunitAccess(context);
|
|
|
|
|
|
- StringBuffer target = req.getTarget();
|
|
|
+ StringBuffer target(req.getTarget());
|
|
|
if (target.trim().isEmpty())
|
|
|
throw MakeStringException(ECLWATCH_INVALID_INPUT,"Target not defined in onWUEclDefinitionAction.");
|
|
|
|
|
@@ -5358,7 +5358,7 @@ bool CWsWorkunitsEx::onWUEclDefinitionAction(IEspContext &context, IEspWUEclDefi
|
|
|
int msToWait = req.getMsToWait();
|
|
|
for (aindex_t i = 0; i < eclDefinitions.length(); i++)
|
|
|
{
|
|
|
- StringBuffer eclDefinitionName = eclDefinitions.item(i);
|
|
|
+ StringBuffer eclDefinitionName(eclDefinitions.item(i));
|
|
|
if (eclDefinitionName.trim().isEmpty())
|
|
|
WARNLOG("Empty ECL Definition name in WUEclDefinitionAction request");
|
|
|
else if (action == CEclDefinitionActions_SyntaxCheck)
|