private void reconcileReferenceMultiplicity(Component component, Reference componentReference, Reference componentTypeReference, Monitor monitor) { if (componentReference.getMultiplicity() != null) { if (!isValidMultiplicityOverride(componentTypeReference.getMultiplicity(), componentReference .getMultiplicity())) { Monitor.error(monitor, this, Messages.ASSEMBLY_VALIDATION, "ReferenceIncompatibleMultiplicity", component.getName(), componentReference.getName()); } } else { componentReference.setMultiplicity(componentTypeReference.getMultiplicity()); } }
private void reconcileReferenceMultiplicity(Component component, Reference componentReference, Reference componentTypeReference, Monitor monitor) { if (componentReference.getMultiplicity() != null) { if (!isValidMultiplicityOverride(componentTypeReference.getMultiplicity(), componentReference .getMultiplicity())) { Monitor.error(monitor, this, Messages.ASSEMBLY_VALIDATION, "ReferenceIncompatibleMultiplicity", component.getName(), componentReference.getName()); } } else { componentReference.setMultiplicity(componentTypeReference.getMultiplicity()); } }
private void reconcileReferenceMultiplicity(ComponentType componentType, Reference compositeReference, Reference promotedComponentReference, Monitor monitor) { if (compositeReference.getMultiplicity() != null) { if (!isValidMultiplicityOverride(promotedComponentReference.getTargets().size() > 0, promotedComponentReference.getMultiplicity(), compositeReference.getMultiplicity())) { Monitor.error(monitor, this, Messages.ASSEMBLY_VALIDATION, "CompositeReferenceIncompatibleMultiplicity", componentType.getURI(), compositeReference.getName(), promotedComponentReference.getName()); } } else { compositeReference.setMultiplicity(promotedComponentReference.getMultiplicity()); } }
private void reconcileReferenceMultiplicity(ComponentType componentType, Reference compositeReference, Reference promotedComponentReference, Monitor monitor) { if (compositeReference.getMultiplicity() != null) { if (!isValidMultiplicityOverride(promotedComponentReference.getTargets().size() > 0, promotedComponentReference.getMultiplicity(), compositeReference.getMultiplicity())) { Monitor.error(monitor, this, Messages.ASSEMBLY_VALIDATION, "CompositeReferenceIncompatibleMultiplicity", componentType.getURI(), compositeReference.getName(), promotedComponentReference.getName()); } } else { compositeReference.setMultiplicity(promotedComponentReference.getMultiplicity()); } }
/** * ASM50042 - Checks that if a component reference with multiplicity="1..1" is marked * as nonOveridable then there are no composite references that promote it * * @param componentType * @param compositeReference * @param promotedComponentReference * @param monitor */ private void validateNonOverridable(ComponentType componentType, Reference compositeReference, Reference promotedComponentReference, Monitor monitor){ if ((promotedComponentReference.getMultiplicity() == Multiplicity.ONE_ONE) && (((ComponentReference)promotedComponentReference)).isNonOverridable() == true) { Monitor.error(monitor, this, Messages.ASSEMBLY_VALIDATION, "CompositeReferencePromotesNonOverridableReference", componentType.getURI(), compositeReference.getName(), promotedComponentReference.getName()); } }
/** * ASM50042 - Checks that if a component reference with multiplicity="1..1" is marked * as nonOveridable then there are no composite references that promote it * * @param componentType * @param compositeReference * @param promotedComponentReference * @param monitor */ private void validateNonOverridable(ComponentType componentType, Reference compositeReference, Reference promotedComponentReference, Monitor monitor){ if ((promotedComponentReference.getMultiplicity() == Multiplicity.ONE_ONE) && (((ComponentReference)promotedComponentReference)).isNonOverridable() == true) { Monitor.error(monitor, this, Messages.ASSEMBLY_VALIDATION, "CompositeReferencePromotesNonOverridableReference", componentType.getURI(), compositeReference.getName(), promotedComponentReference.getName()); } }
if (ref.getMultiplicity() == Multiplicity.ONE_N || ref.getMultiplicity() == Multiplicity.ZERO_N) { List<ObjectFactory<?>> factories = new ArrayList<ObjectFactory<?>>(); Class<?> baseType = if (wireList == null && ref.getMultiplicity() == Multiplicity.ONE_ONE) { throw new IllegalStateException("Required reference is missing: " + ref.getName());