DmwNamedObjectWrapper wrapper = (DmwNamedObjectWrapper) request.getNewObjectWrapped();
if (wrapper.getObjectName() == null){
// The object doesn't have a name, we'll try to generate one for it
synchronized (nameGenerators) {
NameGeneratorIF ng = nameGenerators.get(wrapper.getConstructionClassInfo());
if (ng == null){
// Not good, we don't have a name generator, so we can't proceed
response = (CreateResponse) request.getErrorResponse();
response.setResponseText("No name generator was available for objects of type: " + wrapper.getConstructionClassName());
}
else{
ng.createNameForObject(wrapper);
}
}
}
// We attempt to resolve references in the object, this includes its class