public class ConfigMain extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
ConfigMain.Command |
| Modifier and Type | Field and Description |
|---|---|
private Map<String,ConfigMain.Command> |
commandMap |
static int |
ERR_INVALID_ARGS |
static int |
ERR_INVALID_CONFIG |
static int |
ERR_UNABLE_TO_CLOSE_CONFIG |
static int |
ERR_UNABLE_TO_OPEN_INPUT |
static int |
ERR_UNABLE_TO_OPEN_OUTPUT |
static int |
ERR_UNABLE_TO_PARSE_CONFIG |
static int |
ERR_UNABLE_TO_READ_TEMPLATE |
static int |
ERR_UNABLE_TO_SAVE_CONFIG |
private PathInputStreamFactory |
pathInputStreamFactory |
private PathOutputStreamFactory |
pathOutputStreamFactory |
static int |
SUCCESS |
static String |
THERE_ARE_VALIDATION_ERRORS_WITH_THE_TEMPLATE_STILL_OUTPUTTING_YAML_BUT_IT_WILL_NEED_TO_BE_EDITED |
static String |
TRANSFORM |
static String |
TRANSFORM_VFS |
static String |
UPGRADE |
static String |
VALIDATE |
| Constructor and Description |
|---|
ConfigMain() |
ConfigMain(PathInputStreamFactory pathInputStreamFactory,
PathOutputStreamFactory pathOutputStreamFactory) |
public static final int ERR_INVALID_ARGS
public static final int ERR_UNABLE_TO_OPEN_OUTPUT
public static final int ERR_UNABLE_TO_OPEN_INPUT
public static final int ERR_UNABLE_TO_READ_TEMPLATE
public static final int ERR_UNABLE_TO_PARSE_CONFIG
public static final int ERR_INVALID_CONFIG
public static final int ERR_UNABLE_TO_CLOSE_CONFIG
public static final int ERR_UNABLE_TO_SAVE_CONFIG
public static final int SUCCESS
public static final String TRANSFORM
public static final String TRANSFORM_VFS
public static final String VALIDATE
public static final String UPGRADE
public static final String THERE_ARE_VALIDATION_ERRORS_WITH_THE_TEMPLATE_STILL_OUTPUTTING_YAML_BUT_IT_WILL_NEED_TO_BE_EDITED
private final Map<String,ConfigMain.Command> commandMap
private final PathInputStreamFactory pathInputStreamFactory
private final PathOutputStreamFactory pathOutputStreamFactory
public ConfigMain()
public ConfigMain(PathInputStreamFactory pathInputStreamFactory, PathOutputStreamFactory pathOutputStreamFactory)
public static void main(String[] args)
public static void printValidateUsage()
public int validate(String[] args)
public static void printTransformUsage()
public static void printUpgradeUsage()
public static ConfigSchema transformTemplateToSchema(InputStream source) throws JAXBException, IOException
JAXBExceptionIOExceptionpublic static ConfigSchema transformVersionedFlowSnapshotToSchema(InputStream source) throws IOException
IOExceptionpublic static ConfigSchema transformVersionedFlowSnapshotToSchema(org.apache.nifi.registry.flow.VersionedFlowSnapshot versionedFlowSnapshot)
public int upgrade(String[] args)
public <T> T loadAndPrintValidationErrors(InputStream inputStream, BiFunction<ConfigSchema,Boolean,T> resultHandler) throws IOException, SchemaLoaderException
IOExceptionSchemaLoaderExceptionpublic int transform(String[] args)
protected void handleErrorClosingOutput(IOException e)
protected void handleErrorClosingInput(IOException e)
protected int handleErrorOpeningInput(String fileName, Runnable usagePrinter, FileNotFoundException e)
protected int handleErrorOpeningOutput(String fileName, Runnable usagePrinter, FileNotFoundException e)
protected int handleErrorLoadingConfiguration(Exception e, Runnable usagePrinter)
protected int handleErrorSavingCofiguration(IOException e)
public int execute(String[] args)
public Map<String,ConfigMain.Command> createCommandMap()
public void printUsage()
Copyright © 2023 Apache NiFi Project. All rights reserved.