You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2022/02/13 12:29:09 UTC
[hop] branch master updated: HOP-3752 Remove unused class CommandExecutorCodes
This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/master by this push:
new 6aa307e HOP-3752 Remove unused class CommandExecutorCodes
new 8085b00 Merge pull request #1356 from nadment/HOP-3752
6aa307e is described below
commit 6aa307e105e6ab3d616d43a9ebce29d52a32a37a
Author: Nicolas Adment <na...@gmail.com>
AuthorDate: Fri Feb 11 21:36:22 2022 +0100
HOP-3752 Remove unused class CommandExecutorCodes
---
.../org/apache/hop/base/CommandExecutorCodes.java | 121 ---------------------
1 file changed, 121 deletions(-)
diff --git a/engine/src/main/java/org/apache/hop/base/CommandExecutorCodes.java b/engine/src/main/java/org/apache/hop/base/CommandExecutorCodes.java
deleted file mode 100644
index 86e4346..0000000
--- a/engine/src/main/java/org/apache/hop/base/CommandExecutorCodes.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hop.base;
-
-import java.util.Arrays;
-
-public class CommandExecutorCodes {
-
- public enum Pan {
- SUCCESS(0, "The pipeline ran without a problem"),
- ERRORS_DURING_PROCESSING(1, "Errors occurred during processing"),
- UNEXPECTED_ERROR(2, "An unexpected error occurred during loading / running of the pipeline"),
- UNABLE_TO_PREP_INIT_PIPELINE(3, "Unable to prepare and initialize this pipeline"),
- HOP_VERSION_PRINT(6, "Hop Version printing"),
- COULD_NOT_LOAD_PIPELINE(7, "The pipeline couldn't be de-serialized"),
- ERROR_LOADING_TRANSFORMS_PLUGINS(
- 8, "Error loading transforms or plugins (error in loading one of the plugins mostly)"),
- CMD_LINE_PRINT(9, "Command line usage printing");
-
- private int code;
- private String description;
-
- Pan(int code, String description) {
- setCode(code);
- setDescription(description);
- }
-
- public int getCode() {
- return code;
- }
-
- public void setCode(int code) {
- this.code = code;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public static Pan getByCode(final int code) {
- return Arrays.asList(Pan.values()).stream()
- .filter(pan -> pan.getCode() == code)
- .findAny()
- .orElse(null);
- }
-
- public static boolean isFailedExecution(final int code) {
- return Pan.UNEXPECTED_ERROR.getCode() == code
- || Pan.UNABLE_TO_PREP_INIT_PIPELINE.getCode() == code
- || Pan.COULD_NOT_LOAD_PIPELINE.getCode() == code
- || Pan.ERROR_LOADING_TRANSFORMS_PLUGINS.getCode() == code;
- }
- }
-
- public enum Kitchen {
- SUCCESS(0, "The workflow ran without a problem"),
- ERRORS_DURING_PROCESSING(1, "Errors occurred during processing"),
- UNEXPECTED_ERROR(2, "An unexpected error occurred during loading or running of the workflow"),
- HOP_VERSION_PRINT(6, "Hop Version printing"),
- COULD_NOT_LOAD_JOB(7, "The workflow couldn't be de-serialized"),
- ERROR_LOADING_TRANSFORMS_PLUGINS(
- 8, "Error loading transforms or plugins (error in loading one of the plugins mostly)"),
- CMD_LINE_PRINT(9, "Command line usage printing");
-
- private int code;
- private String description;
-
- Kitchen(int code, String description) {
- setCode(code);
- setDescription(description);
- }
-
- public int getCode() {
- return code;
- }
-
- public void setCode(int code) {
- this.code = code;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public static Kitchen getByCode(final int code) {
- return Arrays.asList(Kitchen.values()).stream()
- .filter(kitchen -> kitchen.getCode() == code)
- .findAny()
- .orElse(null);
- }
-
- public static boolean isFailedExecution(final int code) {
- return Kitchen.UNEXPECTED_ERROR.getCode() == code
- || Kitchen.COULD_NOT_LOAD_JOB.getCode() == code
- || Kitchen.ERROR_LOADING_TRANSFORMS_PLUGINS.getCode() == code;
- }
- }
-}