/** * Creates a wrapper used to include a composite at the domain level. The wrapper is thrown away during the inclusion. * * @param deployable the deployable being included * @return the composite wrapper * @throws DeploymentException if there is an error creating the composite wrapper */ private Composite createWrapper(QName deployable) throws DeploymentException { Composite composite = contributionHelper.findComposite(deployable); // In order to include a composite at the domain level, it must first be wrapped in a composite that includes it. // This wrapper is thrown away during the inclusion. Composite wrapper = new Composite(deployable); Include include = new Include(); include.setName(deployable); include.setIncluded(composite); wrapper.add(include); return wrapper; }