if (dram == null) {
throw new IllegalArgumentException("Cannot be null: " +
"dram.");
}
ComboPolicyValueModifier comboPVM = null;
// Retrieve the policy type element for the named policy.
Element policyTypeElement =
dram.getTypeDefinitionElement(policyName);
if (policyTypeElement != null) {
if (!policyTypeElement.getName().
equals(DeviceRepositorySchemaConstants.
POLICY_DEFINITION_TYPE_ELEMENT_NAME)) {
throw new IllegalStateException("The policy type " +
"element for " + policyName + " is " +
"named " + policyTypeElement.getName() +
". Expected " + DeviceRepositorySchemaConstants.
POLICY_DEFINITION_TYPE_ELEMENT_NAME);
}
comboPVM = new ComboPolicyValueModifier(parent, style,
getValues(policyTypeElement), policyName, dram);
} else {
throw new IllegalStateException("The policy type " +
"element for " + policyName + " is null.");
}