private void fillPartitions(DeploymentPolicy deploymentPolicy) throws InvalidPartitionException {
PartitionManager partitionMgr = PartitionManager.getInstance();
for (Partition partition : deploymentPolicy.getAllPartitions()) {
String partitionId = partition.getId();
if ((partitionId == null) || (!partitionMgr.partitionExist(partitionId))) {
String msg = "Could not find partition: [id] " + partitionId + ". " +
"Please deploy the partitions before deploying the deployment policies.";
throw new InvalidPartitionException(msg);
}