List<String> fieldNameList = operationResult.getFieldNameList();
getProperties(connection, PluginConstants.ComponentType.VDB.NAME);
operationResult.setContent(createReportResultList(fieldNameList, resultObject.iterator()));
} else if (operationName.equals(VDB.Operations.GET_SESSIONS)) {
List<String> fieldNameList = operationResult.getFieldNameList();
MetaValue sessionMetaValue = getSessions(connection);
getSessionCollectionValueForVDB(sessionMetaValue, activeSessionsCollection, vdbName);
operationResult.setContent(createReportResultList(fieldNameList, activeSessionsCollection.iterator()));
} else if (operationName.equals(VDB.Operations.GET_REQUESTS)) {
List<String> fieldNameList = operationResult.getFieldNameList();
MetaValue requestMetaValue = getRequestsForVDB(connection, vdbName, Integer.parseInt(vdbVersion));
getRequestCollectionValue(requestMetaValue, resultObject);
operationResult.setContent(createReportResultList(fieldNameList, resultObject.iterator()));
} else if (operationName.equals(VDB.Operations.GET_MATVIEWS)) {
List<String> fieldNameList = operationResult.getFieldNameList();
MetaValue resultsMetaValue = executeMaterializedViewQuery( connection, vdbName, Integer.parseInt(vdbVersion));
getResultsCollectionValue(resultsMetaValue, sqlResultsObject);
operationResult.setContent(createReportResultListForMatViewQuery(fieldNameList, sqlResultsObject.iterator()));
} else if (operationName.equals(VDB.Operations.CLEAR_CACHE)) {
try {
executeClearCache( connection, vdbName, Integer.parseInt(vdbVersion),
(String) valueMap.get(Operation.Value.CACHE_TYPE));
}catch(Exception e){
//Some failure during Clear Cache. Set message here since it has already been logged.
operationResult.setContent("failure - see log for details"); //$NON-NLS-1$
}
//If no exceptions, we assume the clear cache worked
operationResult.setContent("cache successfully cleared!"); //$NON-NLS-1$
} else if (operationName.equals(VDB.Operations.RELOAD_MATVIEW)) {
MetaValue resultsMetaValue = reloadMaterializedView(connection, vdbName, Integer.parseInt(vdbVersion),
(String) valueMap.get(Operation.Value.MATVIEW_SCHEMA),
(String) valueMap.get(Operation.Value.MATVIEW_TABLE),
(Boolean) valueMap.get(Operation.Value.INVALIDATE_MATVIEW));
if (resultsMetaValue==null) {
operationResult.setContent("failure - see log for details"); //$NON-NLS-1$