public List<ModuleMetadata> findAllByContainerId(String containerId) {
		Assert.hasText(containerId, "containerId is required");

		List<ModuleMetadata.Id> deployedModules = getDeployedModules(containerId);
		logger.debug("deployedModules: {}", deployedModules);

		List<ModuleMetadata> results = new ArrayList<ModuleMetadata>(deployedModules.size());
		for (ModuleMetadata.Id moduleId : deployedModules) {
			ModuleMetadata metadata = findOne(moduleId);
			logger.debug("found metadata: {}", metadata);
			if (metadata != null) {
				results.add(metadata);
			}
		}
		return results;
	}
Find all the modules that are deployed into this container.

@param containerId the containerId
@return {@link ModuleMetadata} of the modules deployed into this container.
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/module/store/ZooKeeperModuleMetadataRepository.java