@Override public void execute(ILifecycleProgressMonitor monitor) throws SiteWhereException { if (getComponent() != null) { try { getOwner().initializeNestedComponent(getComponent(), monitor, isRequire()); } catch (SiteWhereException t) { throw t; } catch (Throwable t) { throw new SiteWhereException("Unable to initialize " + getComponent().getComponentName(), t); } } else { throw new SiteWhereException("Attempting to initialize component '" + getComponent().getComponentName() + "' but component is null."); } }
@Override public String getName() { return (getComponent() != null) ? "Initialize " + getComponent().getComponentName() : "Initialize"; }
@Override public void addInitializeStep(ILifecycleComponent owner, ILifecycleComponent component, boolean require) { if (component != null) { addStep(new InitializeComponentLifecycleStep(owner, component, require)); } else { owner.getLogger().warn("Skipping 'initialize' step for null component."); } }