definition.setInherited(inherited); if (containingCtd != null) { containingCtd.toMutable().add(definition);
private PrismSchema constructSchema(PrismContext prismContext) { PrismSchemaImpl schema = new PrismSchemaImpl(NS_MY_SCHEMA, prismContext); MutableComplexTypeDefinition weaponTypeDef = schema.createComplexTypeDefinition(WEAPON_TYPE_QNAME).toMutable(); MutablePrismPropertyDefinition<?> kindPropertyDef = weaponTypeDef.createPropertyDefinition(WEAPON_KIND_QNAME, DOMUtil.XSD_STRING); kindPropertyDef.setDisplayName("Weapon kind"); weaponTypeDef.createPropertyDefinition(WEAPON_BRAND_LOCAL_NAME, PrismInternalTestUtil.WEAPONS_WEAPON_BRAND_TYPE_QNAME); weaponTypeDef.createPropertyDefinition(WEAPON_PASSWORD_LOCAL_NAME, PrismInternalTestUtil.DUMMY_PROTECTED_STRING_TYPE); weaponTypeDef.createPropertyDefinition(WEAPON_BLADE_LOCAL_NAME, PrismInternalTestUtil.EXTENSION_BLADE_TYPE_QNAME); MutablePrismPropertyDefinition<?> createTimestampPropertyDef = weaponTypeDef.createPropertyDefinition(WEAPON_CREATE_TIMESTAMP_QNAME, DOMUtil.XSD_DATETIME); createTimestampPropertyDef.setDisplayName("Create timestamp"); createTimestampPropertyDef.setOperational(true); schema.createPropertyContainerDefinition(WEAPON_LOCAL_NAME, WEAPON_TYPE_LOCAL_NAME); return schema; }
LOGGER.trace("{}: Mapping ICF config schema property {} from {} to {}", this, icfPropertyName, icfProperty.getType(), propXsdType); MutablePrismPropertyDefinition<?> propertyDefinition = configPropertiesTypeDef.toMutable().createPropertyDefinition( icfPropertyName, propXsdType); propertyDefinition.setDisplayName(icfProperty.getDisplayName(null));
objectDefinition.getComplexTypeDefinition().toMutable().replaceDefinition(ShadowType.F_ATTRIBUTES, refinedObjectClassDefinition.toResourceAttributeContainerDefinition());