public InvalidProperty(String name, LogicalComponent component, Throwable cause) { super(component.getUri(), component.getDefinition().getContributionUri(), Collections.singletonList(component)); this.name = name; this.cause = cause; }
@SuppressWarnings("unchecked") private <C extends LogicalComponent<?>> ComponentGenerator<C> getGenerator(C component) { Implementation<?> implementation = component.getDefinition().getImplementation(); return (ComponentGenerator<C>) generatorRegistry.getComponentGenerator(implementation.getClass()); }
public InvalidPropertyFile(String name, LogicalComponent component, Throwable cause, URI file) { super(component.getUri(), component.getDefinition().getContributionUri(), Collections.singletonList(component)); this.name = name; this.cause = cause; this.file = file; }
public InvalidProperty(String name, LogicalComponent component, Throwable cause) { super(component.getUri(), component.getDefinition().getContributionUri(), Collections.singletonList(component)); this.name = name; this.cause = cause; }
public InvalidPropertyFile(String name, LogicalComponent component, Throwable cause, URI file) { super(component.getUri(), component.getDefinition().getContributionUri(), Collections.singletonList(component)); this.name = name; this.cause = cause; this.file = file; }
@SuppressWarnings("unchecked") private <C extends LogicalComponent<?>> ComponentGenerator<C> getGenerator(C component) throws GeneratorNotFoundException { Implementation<?> implementation = component.getDefinition().getImplementation(); return (ComponentGenerator<C>) generatorRegistry.getComponentGenerator(implementation.getClass()); }
@SuppressWarnings("unchecked") private <C extends LogicalComponent<?>> ComponentGenerator<C> getGenerator(C component) { Implementation<?> implementation = component.getDefinition().getImplementation(); return (ComponentGenerator<C>) generatorRegistry.getComponentGenerator(implementation.getClass()); }
@SuppressWarnings("unchecked") private <C extends LogicalComponent<?>> ComponentGenerator<C> getGenerator(C component) throws GeneratorNotFoundException { Implementation<?> implementation = component.getDefinition().getImplementation(); return (ComponentGenerator<C>) generatorRegistry.getComponentGenerator(implementation.getClass()); }
public InvalidProperty(String name, LogicalComponent component, Throwable cause) { super(component.getUri(), component.getDefinition().getContributionUri(), Collections.singletonList(component)); this.name = name; this.cause = cause; }
/** * Gets the explicit reference associated with this logical reference. * * @return Component reference if defined, otherwise null. */ public Reference<Component> getComponentReference() { return getParent().getDefinition().getReferences().get(getDefinition().getName()); }
/** * Constructor. * * @param source the reference source * @param promotedComponentUri the promoted component URI. */ public AmbiguousReference(LogicalReference source, URI promotedComponentUri) { super(source.getParent().getUri(), source.getParent().getDefinition().getContributionUri(), Collections.singletonList(source)); this.referenceUri = source.getUri(); this.promotedComponentUri = promotedComponentUri; }
public TargetComponentNotFound(LogicalReference reference, URI targetUri) { super(reference.getParent().getUri(), reference.getParent().getDefinition().getContributionUri(), Collections.singletonList(reference)); this.referenceUri = reference.getUri(); this.targetUri = targetUri; }
/** * Constructor. * * @param source the reference source * @param promotedComponentUri the promoted component URI. */ public AmbiguousReference(LogicalReference source, URI promotedComponentUri) { super(source.getParent().getUri(), source.getParent().getDefinition().getContributionUri(), Collections.singletonList(source)); this.referenceUri = source.getUri(); this.promotedComponentUri = promotedComponentUri; }
/** * Constructor. * * @param source the reference source * @param promotedComponentUri the promoted component URI. */ public AmbiguousReference(LogicalReference source, URI promotedComponentUri) { super(source.getParent().getUri(), source.getParent().getDefinition().getContributionUri(), Collections.singletonList(source)); this.referenceUri = source.getUri(); this.promotedComponentUri = promotedComponentUri; }
private <I> ScopedComponent createPhysicalComponent(LogicalComponent<?> logicalComponent, I instance) { URI uri = logicalComponent.getUri(); InjectingComponentType type = (InjectingComponentType) logicalComponent.getDefinition().getComponentType(); type.getInjectionSites(); return new SingletonComponent(uri, instance, type.getInjectionSites(), BOOT_CONTRIBUTION); }
private <I> ScopedComponent createPhysicalComponent(LogicalComponent<?> logicalComponent, I instance) { URI uri = logicalComponent.getUri(); InjectingComponentType type = (InjectingComponentType) logicalComponent.getDefinition().getComponentType(); type.getInjectionSites(); return new SingletonComponent(uri, instance, type.getInjectionSites(), BOOT_CONTRIBUTION); }
public PhysicalComponentDefinition generate(LogicalComponent<TimerImplementation> component) throws GenerationException { TimerComponentDefinition definition = new TimerComponentDefinition(); generationHelper.generate(definition, component); TimerImplementation implementation = component.getDefinition().getImplementation(); InjectingComponentType componentType = implementation.getComponentType(); definition.setTransactional(implementation.getIntents().contains(MANAGED_TRANSACTION) || componentType.getIntents().contains(MANAGED_TRANSACTION)); TimerData data = implementation.getTimerData(); definition.setTriggerData(data); return definition; }
public PhysicalComponent generate(LogicalComponent<JavaImplementation> component) { Object instance = component.getDefinition().getImplementation().getInstance(); if (instance != null) { // deploying an unmanaged instance PhysicalJavaComponent physicalComponent = new PhysicalJavaComponent(instance); physicalComponent.setScope(Scope.COMPOSITE); return physicalComponent; } PhysicalJavaComponent physicalComponent = new PhysicalJavaComponent(); generationHelper.generate(physicalComponent, component); return physicalComponent; }
private URI getContributionUri(LogicalBinding<WsBindingDefinition> binding) { LogicalComponent<?> current = binding.getParent().getParent(); while (current.getParent().getParent() != null) { // component deployed directly to the domain current = current.getParent(); } return current.getDefinition().getContributionUri(); }
public PhysicalComponentDefinition generate(LogicalComponent<WebImplementation> component) throws GenerationException { ComponentDefinition<WebImplementation> definition = component.getDefinition(); WebComponentType componentType = definition.getImplementation().getComponentType(); String contextUrl = calculateContextUrl(component); WebComponentDefinition physical = new WebComponentDefinition(); physical.setContextUrl(contextUrl); Map<String, Map<String, InjectionSite>> sites = generateInjectionMapping(componentType); physical.setInjectionMappings(sites); processPropertyValues(component, physical); return physical; }