/** * @return Returns the {@link LimbusSystem} represented by {@link MockLimbusSystem} that allows to add mocked system * components as well as real system components. */ public LimbusSystemStaging withComponents() { return new LimbusSystemStaging(stage); }
/** * Creates a Limbus System from the specified XML configuration. The {@link MockLimbusSystem} will contain all * component configurations defined in the specified Limbus System XML configuration. The methods of this stage can be * used to replace components by mocks. * * @param limbusSystemXML * The Limbus System configuration to load. * @return Returns the {@link LimbusSystem} represented by {@link MockLimbusSystem} that allows to add mocked system * components as well as real system components. * @throws SerializeException * Thrown if the specified Limbus System configuration cannot be parsed. */ public LimbusSystemStaging withComponentsFrom(InputStream limbusSystemXML) throws SerializeException { return new LimbusSystemStaging(stage, limbusSystemXML); }
/** * Applies a set of default components to this {@link LimbusStaging}. The most Limbus Engine implementations deliver * an implementation of {@link DefaultComponents} to provide a minimal system configuration. * * @param defaultComponentsEnumerator * The enumerator of default components. This object should be delivered by Limbus Engine implementations. * @return Returns the {@link LimbusSystem} represented by {@link MockLimbusSystem} that allows to add mocked system * components as well as real system components. */ public LimbusSystemStaging withDefaultLimbusComponents(DefaultComponents defaultComponentsEnumerator) { LimbusSystemStaging limbusSystemStaging = new LimbusSystemStaging(stage); defaultComponentsEnumerator.applyDefaultComponents(limbusSystemStaging); return limbusSystemStaging; }
/** * Creates a Limbus System from the specified XML configuration. The {@link MockLimbusSystem} will contain all * component configurations defined in the specified Limbus System XML configuration. The methods of this stage can be * used to replace components by mocks. * * @param limbusSystemXMLURI * The URI to load the Limbus System configuration from. * @return Returns the {@link LimbusSystem} represented by {@link MockLimbusSystem} that allows to add mocked system * components as well as real system components. * @throws SerializeException * Thrown if the specified Limbus System configuration cannot be parsed. */ public LimbusSystemStaging withComponentsFrom(URI limbusSystemXMLURI) throws SerializeException { try { return new LimbusSystemStaging(stage, limbusSystemXMLURI.toURL() .openStream()); } catch (IOException e) { throw new SerializeException("Cannot open URL connection.", e); } }