public boolean equals(Object obj) { if (obj == null || obj.getClass() != getClass()) { return false; } PhysicalComponent other = (PhysicalComponent) obj; return uri.equals(other.getComponentUri()); }
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DisposeComponentCommand that = (DisposeComponentCommand) o; return !(component != null ? !component.equals(that.component) : that.component != null); }
public int hashCode() { return (component != null ? component.hashCode() : 0); }
@SuppressWarnings("unchecked") protected PhysicalComponent generateDefinition(LogicalComponent<?> component) throws Fabric3Exception { Implementation<?> implementation = component.getDefinition().getImplementation(); Class<? extends Implementation> type = implementation.getClass(); ComponentGenerator generator = generatorRegistry.getComponentGenerator(type); if (generator == null) { throw new Fabric3Exception("Generator not found: " + type.getName()); } PhysicalComponent physicalComponent = generator.generate(component); URI uri = component.getUri(); physicalComponent.setComponentUri(uri); URI contributionUri = component.getDefinition().getContributionUri(); physicalComponent.setContributionUri(contributionUri); physicalComponent.setClassLoader(classLoaderRegistry.getClassLoader(contributionUri)); return physicalComponent; }
public void execute(BuildComponentCommand command) { PhysicalComponent physicalComponent = command.getComponent(); Component component = build(physicalComponent); URI contributionUri = physicalComponent.getContributionUri(); componentManager.register(component); for (ComponentBuilderListener listener : listeners) { listener.onBuild(component, physicalComponent); } }
public String toString() { return "Component definition: " + component.toString(); }
@SuppressWarnings("unchecked") protected PhysicalComponent generateDefinition(LogicalComponent<?> component) throws Fabric3Exception { Implementation<?> implementation = component.getDefinition().getImplementation(); Class<? extends Implementation> type = implementation.getClass(); ComponentGenerator generator = generatorRegistry.getComponentGenerator(type); if (generator == null) { throw new Fabric3Exception("Generator not found: " + type.getName()); } PhysicalComponent physicalComponent = generator.generate(component); URI uri = component.getUri(); physicalComponent.setComponentUri(uri); URI contributionUri = component.getDefinition().getContributionUri(); physicalComponent.setContributionUri(contributionUri); physicalComponent.setClassLoader(classLoaderRegistry.getClassLoader(contributionUri)); return physicalComponent; }
public void execute(BuildComponentCommand command) { PhysicalComponent physicalComponent = command.getComponent(); Component component = build(physicalComponent); URI contributionUri = physicalComponent.getContributionUri(); componentManager.register(component); for (ComponentBuilderListener listener : listeners) { listener.onBuild(component, physicalComponent); } }
public String toString() { return "Component definition: " + component.toString(); }
@SuppressWarnings({"unchecked"}) public void execute(DisposeComponentCommand command) { PhysicalComponent physicalComponent = command.getComponent(); URI uri = physicalComponent.getComponentUri(); Component component = componentManager.unregister(uri); ComponentBuilder builder = builders.get(physicalComponent.getClass()); if (builder == null) { throw new Fabric3Exception("Builder not found for " + physicalComponent.getClass().getName()); } builder.dispose(physicalComponent, component); for (ComponentBuilderListener listener : listeners) { listener.onDispose(component, physicalComponent); } }
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DisposeComponentCommand that = (DisposeComponentCommand) o; return !(component != null ? !component.equals(that.component) : that.component != null); }
public int hashCode() { return (component != null ? component.hashCode() : 0); }
@SuppressWarnings({"unchecked"}) public void execute(DisposeComponentCommand command) { PhysicalComponent physicalComponent = command.getComponent(); URI uri = physicalComponent.getComponentUri(); Component component = componentManager.unregister(uri); ComponentBuilder builder = builders.get(physicalComponent.getClass()); if (builder == null) { throw new Fabric3Exception("Builder not found for " + physicalComponent.getClass().getName()); } builder.dispose(physicalComponent, component); for (ComponentBuilderListener listener : listeners) { listener.onDispose(component, physicalComponent); } }
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BuildComponentCommand that = (BuildComponentCommand) o; return !(component != null ? !component.equals(that.component) : that.component != null); }
public int hashCode() { return (component != null ? component.hashCode() : 0); }
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BuildComponentCommand that = (BuildComponentCommand) o; return !(component != null ? !component.equals(that.component) : that.component != null); }
public int hashCode() { return (component != null ? component.hashCode() : 0); }