@Override public Object find(ItemPath path) { if (path == null || path.isEmpty()) { return this; } T value = getValue(); if (value instanceof Structured) { return ((Structured)value).resolve(path); } else { throw new IllegalArgumentException("Attempt to resolve sub-path '"+path+"' on non-structured property value "+value); } }
private <X> Collection<PrismPropertyValue<X>> resolveStructuredDeltaSet(Collection<PrismPropertyValue<Structured>> set, ItemPath resolvePath, PrismContext prismContext) { if (set == null) { return null; } Collection<PrismPropertyValue<X>> outputSet = new ArrayList<>(set.size()); for (PrismPropertyValue<Structured> structuredPVal: set) { Structured structured = structuredPVal.getValue(); X outputRval = (X) structured.resolve(resolvePath); outputSet.add(prismContext.itemFactory().createPropertyValue(outputRval)); } return outputSet; }
private <X> PrismProperty<X> resolveStructuredPropertyItem(PrismProperty<Structured> sourceProperty, ItemPath resolvePath, PrismPropertyDefinition outputDefinition) { if (sourceProperty == null) { return null; } PrismProperty<X> outputProperty = outputDefinition.instantiate(); for (Structured sourceRealValue: sourceProperty.getRealValues()) { X outputRealValue = (X) sourceRealValue.resolve(resolvePath); outputProperty.addRealValue(outputRealValue); } return outputProperty; }
if (Structured.class.isAssignableFrom(resultTripleValueClass)) { if (residualPath != null && !residualPath.isEmpty()) { realVal = ((Structured) realVal).resolve(residualPath);