public static MappingStrengthType getStrength(MappingType mappingType) { if (mappingType == null) { return MappingStrengthType.NORMAL; } MappingStrengthType value = mappingType.getStrength(); if (value == null) { value = MappingStrengthType.NORMAL; } return value; }
@Override public String getEdgeStyle() { switch (getMapping().getStrength() != null ? getMapping().getStrength() : MappingStrengthType.NORMAL) { case NORMAL: return "dashed"; case STRONG: return "solid"; case WEAK: return "dotted"; } return ""; }
public static boolean needsFullShadowForCredentialProcessing(LensProjectionContext projCtx) throws SchemaException { RefinedObjectClassDefinition refinedProjDef = projCtx.getStructuralObjectClassDefinition(); if (refinedProjDef == null) { return false; } List<MappingType> outboundMappingType = refinedProjDef.getPasswordOutbound(); if (outboundMappingType == null) { return false; } for (MappingType mappingType: outboundMappingType) { if (mappingType.getStrength() == MappingStrengthType.STRONG || mappingType.getStrength() == MappingStrengthType.WEAK) { return true; } } return false; }
private boolean hasAnyStrongMapping(RefinedObjectClassDefinition objectDefinition) { for (QName attributeName : objectDefinition.getNamesOfAttributesWithInboundExpressions()) { RefinedAttributeDefinition<?> attributeDefinition = objectDefinition.findAttributeDefinition(attributeName); for (MappingType inboundMapping : attributeDefinition.getInboundMappingTypes()){ if (inboundMapping.getStrength() == MappingStrengthType.STRONG) { return true; } } } return false; }
if (mappingType.getStrength() != null) { sb.append(" (").append(mappingType.getStrength().value()).append(")");
if (inboundMappingType.getStrength() == MappingStrengthType.STRONG) { LOGGER.trace("There is an association inbound mapping with strength == STRONG, trying to load full account now."); if (!projContext.isFullShadow() && !projContext.isDelete()) {
if (inboundMappingType.getStrength() == MappingStrengthType.STRONG) { LOGGER.trace("There is an inbound mapping with strength == STRONG, trying to load full account now."); if (!projContext.isFullShadow() && !projContext.isDelete()) {
MappingStrengthType strength = outboundMappingType.getStrength(); if (!projCtx.isDelete() && !projCtx.isFullShadow() && (strength == MappingStrengthType.STRONG || strength == MappingStrengthType.WEAK)) { contextLoader.loadFullShadow(context, projCtx, "strong/weak outbound mapping", task, result);