![JAR search and dependency download from the Maven repository](/logo.png)
com.aeontronix.anypointsdk.cli.ImportCmd Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of anypoint-sdk Show documentation
Show all versions of anypoint-sdk Show documentation
Anypoint Software Development Toolkit
/*
* Copyright (c) 2023. Aeontronix Inc
*/
package com.aeontronix.anypointsdk.cli;
import com.aeontronix.anypointsdk.export.AnypointExportFile;
import com.aeontronix.anypointsdk.export.ExportFilters;
import com.fasterxml.jackson.databind.ObjectMapper;
import picocli.CommandLine;
import java.io.File;
import java.util.Set;
import java.util.concurrent.Callable;
@CommandLine.Command(name = "import")
public class ImportCmd 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;
@Override
public Integer call() throws Exception {
ExportFilters exportFilters = new ExportFilters(orgs, envs);
AnypointExportFile exportFile = new ObjectMapper().readValue(file, AnypointExportFile.class);
exportFile.doImport(exportFilters, getClient());
return 0;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy