public static String determineConstructionIntent(AssignmentType assignmentType) { ConstructionType construction = assignmentType.getConstruction(); if (construction != null){ if (construction.getIntent() != null){ return construction.getIntent(); } return SchemaConstants.INTENT_DEFAULT; } throw new IllegalArgumentException("Construction not defined in the assigment."); }
public static String prettyPrint(ConstructionType act) { if (act == null) { return "null"; } StringBuilder sb = new StringBuilder("ConstructionType("); if (act.getResource() != null) { sb.append(prettyPrint(act.getResource())); } if (act.getResourceRef() != null) { sb.append(prettyPrint(act.getResourceRef())); } sb.append(", "); if (act.getIntent() != null) { sb.append("intent="); sb.append(act.getIntent()); sb.append(", "); } if (act.getAttribute() != null) { for (ResourceAttributeDefinitionType attrConstr: act.getAttribute()) { sb.append(prettyPrint(attrConstr)); } } // TODO: Other properties sb.append(")"); return sb.toString(); }
sb.append(getConstructionType().getKind()); sb.append(" / "); sb.append(getConstructionType().getIntent());
kind = ShadowKindType.ACCOUNT; refinedObjectClassDefinition = refinedSchema.getRefinedDefinition(kind, getConstructionType().getIntent()); if (getConstructionType().getIntent() != null) { throw new SchemaException( "No " + kind + " type '" + getConstructionType().getIntent() + "' found in " + getResource(task, result) + " as specified in construction in " + getSource()); } else { ResourceShadowDiscriminator rat = new ResourceShadowDiscriminator(resourceOid, kind, getConstructionType().getIntent()); projectionContext = getLensContext().findProjectionContext(rat);