Capability[] dlgCapabilities = dlgAeMetadata.getCapabilities();
if (dlgCapabilities != null)
for (int n = 0; n < dlgCapabilities.length; n++)
allCapabilities.add(dlgCapabilities[n]);
// check operational properties
OperationalProperties dlgOperProps = dlgAeMetadata.getOperationalProperties();
if (dlgOperProps != null) {
if (!dlgOperProps.isMultipleDeploymentAllowed())
isMultipleDeploymentAllowed = false;
if (dlgOperProps.getModifiesCas())
modifiesCas = true;
} else
// by default, AE modifies CAS
modifiesCas = true;
} else if (dlgSpecifier instanceof CasConsumerDescription) {
// get CC metadata
ProcessingResourceMetaData dlgCcMetadata = ((CasConsumerDescription) dlgSpecifier)
.getCasConsumerMetaData();
// collect CC capabilities
Capability[] dlgCapabilities = dlgCcMetadata.getCapabilities();
if (dlgCapabilities != null)
for (int n = 0; n < dlgCapabilities.length; n++)
allCapabilities.add(dlgCapabilities[n]);
// check operational properties
OperationalProperties dlgOperProps = dlgCcMetadata.getOperationalProperties();
if (dlgOperProps != null) {
if (!dlgOperProps.isMultipleDeploymentAllowed())
isMultipleDeploymentAllowed = false;
}
} else
// other categories (CR, CI) are not allowed
throw new IllegalArgumentException("unsupported input component");
}
// merge capabilities, excluding duplicates
Capability[] mergedCapabilities = mergeCapabilities(allCapabilities, rsFactory);
// set aggregate capabilities
aggMetadata.setCapabilities(mergedCapabilities);
// set aggregate operational properties
OperationalProperties aggOperProps = aggMetadata.getOperationalProperties();
if (aggOperProps != null) {
aggOperProps.setMultipleDeploymentAllowed(isMultipleDeploymentAllowed);
aggOperProps.setModifiesCas(modifiesCas);
}
} catch (IllegalArgumentException exc) {
PMController.logErrorMessage("Invalid input component # " + lastInputNo);
PMController.logErrorMessage("IllegalArgumentException: " + exc.getMessage());
aggDescription = null;