if (localOcds == null) {
localOcds = Collections.EMPTY_MAP;
}
Iterator i = designates.keySet().iterator();
while (i.hasNext()) {
Designate designate = (Designate) designates.get(i.next());
// check object
if (designate.getObject() == null) {
throw new ResourceProcessorException(ResourceProcessorException.CODE_OTHER_ERROR, "Designate Object child missing or invalid");
}
// check attributes
if (designate.getObject().getAttributes() == null || designate.getObject().getAttributes().size() == 0) {
throw new ResourceProcessorException(ResourceProcessorException.CODE_OTHER_ERROR, "Object Attributes child missing or invalid");
}
// check ocdRef
String ocdRef = designate.getObject().getOcdRef();
if (ocdRef == null || "".equals(ocdRef)) {
throw new ResourceProcessorException(ResourceProcessorException.CODE_OTHER_ERROR, "Object ocdRef attribute missing or invalid");
}
// determine OCD
ObjectClassDefinition ocd = null;
OCD localOcd = (OCD) localOcds.get(ocdRef);
// ask meta type service for matching OCD if no local OCD has been defined
ocd = (localOcd != null) ? new ObjectClassDefinitionImpl(localOcd) : getMetaTypeOCD(data, designate);
if (ocd == null) {
throw new ResourceProcessorException(ResourceProcessorException.CODE_OTHER_ERROR, "No Object Class Definition found with id=" + ocdRef);
}
// determine configuration data based on the values and their type definition
Dictionary dict = getProperties(designate, ocd);
if (dict == null) {
// designate does not match it's definition, but was marked optional, ignore it
continue;
}
List resources = (List) m_toBeInstalled.get(name);
resources.add(new AutoConfResource(name, designate.getPid(), designate.getFactoryPid(), designate.getBundleLocation(), designate.isMerge(), dict, filter));
}
m_log.log(LogService.LOG_DEBUG, "processing " + name + " done");
}