public ItemName getName() { return ItemPathTypeUtil.asSingleNameOrFail(resourceObjectAssociationType.getRef()); }
private ResourceAttributeDefinitionType findAttributeDefinitionType(QName attrName, ResourceObjectTypeDefinitionType rOcDefType, String contextDescription) throws SchemaException { ResourceAttributeDefinitionType foundAttrDefType = null; for (ResourceAttributeDefinitionType attrDefType : rOcDefType.getAttribute()) { if (attrDefType.getRef() != null) { QName ref = ItemPathTypeUtil.asSingleNameOrFail(attrDefType.getRef()); if (QNameUtil.match(ref, attrName)) { if (foundAttrDefType == null) { foundAttrDefType = attrDefType; } else { throw new SchemaException("Duplicate definition of attribute " + ref + " in "+kind+" type " + rOcDefType.getIntent() + ", in " + contextDescription); } } } else { throw new SchemaException("Missing reference to the attribute schema definition in definition " + SchemaDebugUtil.prettyPrint(attrDefType) + " during processing of " + contextDescription); } } return foundAttrDefType; }
boolean foundDepartmentNumber = false; for (ResourceAttributeDefinitionType attributeDefinitionType : accountType.getAttribute()) { if ("description".equals(ItemPathTypeUtil.asSingleNameOrFail(attributeDefinitionType.getRef()).getLocalPart())) { foundDescription = true; MappingType outbound = attributeDefinitionType.getOutbound(); assertEquals("wrong expression evaluator element name for description", SchemaConstantsGenerated.C_VALUE, valueEvaluator.getName()); assertEquals("wrong expression evaluator actual type for description", RawType.class, valueEvaluator.getValue().getClass()); } else if ("departmentNumber".equals(ItemPathTypeUtil.asSingleNameOrFail(attributeDefinitionType.getRef()).getLocalPart())) { foundDepartmentNumber = true; MappingType outbound = attributeDefinitionType.getOutbound();
for (PrismContainerValue<ResourceAttributeDefinitionType> cval: attributeCont.getValues()) { ResourceAttributeDefinitionType attrType = cval.getValue(); if (ItemPathTypeUtil.asSingleNameOrFail(attrType.getRef()).getLocalPart().equals(DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_WEAPON_NAME)) { oldAttrContainer = cval;