@NotNull public QName getLastItemName() { return itemPath.lastName(); }
public ResourceDataItem(@NotNull DataModel ctx, @NotNull String resourceOid, @NotNull ShadowKindType kind, @NotNull String intent, RefinedResourceSchema refinedResourceSchema, RefinedObjectClassDefinition refinedDefinition, @NotNull ItemPath itemPath) { this.ctx = ctx; this.resourceOid = resourceOid; this.kind = kind; this.intent = intent; this.itemPath = itemPath; if (itemPath.lastName() == null) { throw new IllegalArgumentException("Wrong itemPath (have a named segment): " + itemPath); } this.hasItemDefinition = itemPath.size() == 1; // TODO this.refinedResourceSchema = refinedResourceSchema; this.refinedObjectClassDefinition = refinedDefinition; }
private String lastName(ItemPath path) { QName lastName = path.lastName(); return lastName != null ? lastName.getLocalPart() : "?"; }
private void checkRangeTarget(Task task, OperationResult result) throws ExpressionEvaluationException, ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException { QName name = outputPath.lastName(); if (originalTargetValues == null) { throw new IllegalStateException("Couldn't check range for mapping in " + contextDescription + ", as original target values are not known."); } ValueSetDefinitionType rangetSetDefType = mappingType.getTarget().getSet(); ValueSetDefinition setDef = new ValueSetDefinition(rangetSetDefType, name, "range of "+name.getLocalPart()+" in "+getMappingContextDescription(), task, result); setDef.init(expressionFactory); setDef.setAdditionalVariables(variables); for (V originalValue : originalTargetValues) { if (!setDef.contains(originalValue)) { continue; } addToMinusIfNecessary(originalValue); } }
public <V,ID extends ItemDefinition> V getParsedRealValue(ID itemDefinition, ItemPath itemPath) throws SchemaException { if (parsed == null && xnode != null) { if (itemDefinition == null) { return prismContext.parserFor(xnode.toRootXNode()).parseRealValue(); // TODO what will be the result without definition? } else { getParsedValue(itemDefinition, itemPath.lastName()); } } if (parsed != null) { return parsed.getRealValue(); } return null; }
throw new IllegalArgumentException("Last segment of item path (" + fullPath.lastName() + ") " + "does not match item name from the definition: " + definition);
@Override public RObjectReference map(Referencable input, MapperContext context) { ObjectReferenceType objectRef = buildReference(input); ObjectTypeUtil.normalizeRelation(objectRef, context.getRelationRegistry()); RObject owner = (RObject) context.getOwner(); Class<? extends ObjectType> jaxbObjectType = RObjectType.getType(owner.getClass()).getJaxbClass(); RReferenceOwner refType = RReferenceOwner.getOwnerByQName(jaxbObjectType, context.getDelta().getPath().lastName()); return RUtil.jaxbRefToRepo(objectRef, owner, refType, context.getRelationRegistry()); } }
for (Item item : items) { PrismProperty pp = (PrismProperty) item; String paramName = pp.getPath().lastName().getLocalPart(); Object value = null; if (isSingleValue(paramName, jasperReport.getParameters())) {
@Override public RAssignmentReference map(Referencable input, MapperContext context) { ObjectReferenceType objectRef = buildReference(input); ObjectTypeUtil.normalizeRelation(objectRef, context.getRelationRegistry()); RAssignment owner = (RAssignment) context.getOwner(); QName name = context.getDelta().getPath().lastName().asSingleName(); RCReferenceOwner refType = null; if (MetadataType.F_CREATE_APPROVER_REF.equals(name)) { refType = RCReferenceOwner.CREATE_APPROVER; } else if (MetadataType.F_MODIFY_APPROVER_REF.equals(name)) { refType = RCReferenceOwner.MODIFY_APPROVER; } RAssignmentReference ref = new RAssignmentReference(); ref.setOwner(owner); ref.setReferenceType(refType); RObjectReference.copyFromJAXB(objectRef, ref, context.getRelationRegistry()); return ref; } }
protected PrismObject<ShadowType> getParsedShadowBefore(PrismContext prismContext) throws SchemaException, IOException { PrismObject<ShadowType> oldObject = getRawShadowBefore(prismContext); // resolve rawtypes ObjectDeltaType objectChange = oldObject.asObjectable().getObjectChange(); for (ItemDeltaType itemDeltaType : objectChange.getItemDelta()) { for (RawType rawType : itemDeltaType.getValue()) { rawType.getParsedItem( prismContext.definitionFactory().createPropertyDefinition(itemDeltaType.getPath().getItemPath().lastName(), rawType.getXnode().getTypeQName())); } } return oldObject; }
ItemName lastName = delta.getPath().lastName(); if (AssignmentType.F_EXTENSION.equals(lastName)) { handleAssignmentExtensionWholeContainer((RAssignment) attributeStep.bean, delta, idGenerator);