public ObjectClass objectClassToConnId(PrismObject<? extends ShadowType> shadow, String schemaNamespace, ConnectorType connectorType, boolean legacySchema) { ShadowType shadowType = shadow.asObjectable(); QName qnameObjectClass = shadowType.getObjectClass(); if (qnameObjectClass == null) { ResourceAttributeContainer attrContainer = ShadowUtil.getAttributesContainer(shadowType); if (attrContainer == null) { return null; } ResourceAttributeContainerDefinition objectClassDefinition = attrContainer.getDefinition(); qnameObjectClass = objectClassDefinition.getTypeName(); } return objectClassToConnId(qnameObjectClass, schemaNamespace, connectorType, legacySchema); }
if (def instanceof ResourceAttributeContainerDefinition) { ResourceAttributeContainerDefinition rdef = (ResourceAttributeContainerDefinition) def; assertNotEmpty("No type name in object class", rdef.getTypeName()); assertNotEmpty("No native object class for " + rdef.getTypeName(), rdef.getNativeObjectClass()); assertNotEmpty("No name for " + rdef.getTypeName(), rdef.getName());
.findOrCreateContainer(ShadowType.F_ATTRIBUTES); ResourceAttributeContainerDefinition attributesContainerDefinition = attributesContainer.getDefinition(); shadow.setObjectClass(attributesContainerDefinition.getTypeName()); throw new SchemaException("Unknown attribute " + qname + " in definition of object class " + attributesContainerDefinition.getTypeName() + ". Original ConnId name: " + connIdAttr.getName() + " in resource object identified by " + co.getName(), qname);
resultShadowType.setObjectClass(resourceAttributesContainer.getDefinition().getTypeName());
repoShadowType.setObjectClass(attributesContainer.getDefinition().getTypeName());