}
/* ******** Common Functionality ********* */
private static NSMutableDictionary createUpdateRequestDictionary(MSiteConfig _Config, MHost _Host,
MApplication _Application, NSArray _InstanceArray, String requestType) {
NSMutableDictionary monitorRequest = new NSMutableDictionary(1);
NSMutableDictionary updateWotaskd = new NSMutableDictionary(1);
NSMutableDictionary requestTypeDict = new NSMutableDictionary();
if (_Config != null) {
NSDictionary site = new NSDictionary(_Config.values());
requestTypeDict.takeValueForKey(site, "site");
}
if (_Host != null) {
NSArray hostArray = new NSArray(_Host.values());
requestTypeDict.takeValueForKey(hostArray, "hostArray");
}
if (_Application != null) {
NSArray applicationArray = new NSArray(_Application.values());
requestTypeDict.takeValueForKey(applicationArray, "applicationArray");
}
if (_InstanceArray != null) {
int instanceCount = _InstanceArray.count();
NSMutableArray instanceArray = new NSMutableArray(instanceCount);
for (int i = 0; i < instanceCount; i++) {
MInstance anInst = (MInstance) _InstanceArray.objectAtIndex(i);
instanceArray.addObject(anInst.values());
}
requestTypeDict.takeValueForKey(instanceArray, "instanceArray");
}
updateWotaskd.takeValueForKey(requestTypeDict, requestType);
monitorRequest.takeValueForKey(updateWotaskd, "updateWotaskd");