All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aeontronix.anypointsdk.cli.ExportCmd Maven / Gradle / Ivy

There is a newer version: 1.0.0-beta35
Show newest version
/*
 * Copyright (c) 2023. Aeontronix Inc
 */

package com.aeontronix.anypointsdk.cli;

import com.aeontronix.anypointsdk.export.AnypointExportFile;
import com.aeontronix.anypointsdk.export.ExportFilters;
import picocli.CommandLine;

import java.io.File;
import java.util.Set;
import java.util.concurrent.Callable;

@CommandLine.Command(name = "export")
public class ExportCmd extends AbstractCmd implements Callable {
    @CommandLine.Parameters(defaultValue = "anypoint-export.json")
    private File file;
    @CommandLine.Option(names = {"-o"})
    private Set orgs;
    @CommandLine.Option(names = {"-e"})
    private Set envs;
    @CommandLine.Option(names = {"-da"})
    private boolean downloadApps;

    @Override
    public Integer call() throws Exception {
        ExportFilters exportFilters = new ExportFilters(orgs, envs);
        AnypointExportFile exportFile = new AnypointExportFile(exportFilters, downloadApps, getClient());
        exportFile.write(file);
        return 0;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy