Search in sources :

Example 1 with ConfigBO

use of com.ctrip.framework.apollo.portal.entity.bo.ConfigBO in project apollo by ctripcorp.

the class ConfigsExportService method exportNamespaces.

private void exportNamespaces(final Env env, final App exportApp, final ClusterDTO exportCluster, ZipOutputStream zipOutputStream) {
    String clusterName = exportCluster.getName();
    List<NamespaceBO> namespaceBOS = namespaceService.findNamespaceBOs(exportApp.getAppId(), env, clusterName);
    if (CollectionUtils.isEmpty(namespaceBOS)) {
        return;
    }
    Stream<ConfigBO> configBOStream = namespaceBOS.stream().map(namespaceBO -> new ConfigBO(env, exportApp.getOwnerName(), exportApp.getAppId(), clusterName, namespaceBO));
    writeNamespacesToZip(configBOStream, zipOutputStream);
}
Also used : NamespaceBO(com.ctrip.framework.apollo.portal.entity.bo.NamespaceBO) ConfigBO(com.ctrip.framework.apollo.portal.entity.bo.ConfigBO)

Aggregations

ConfigBO (com.ctrip.framework.apollo.portal.entity.bo.ConfigBO)1 NamespaceBO (com.ctrip.framework.apollo.portal.entity.bo.NamespaceBO)1