-
Notifications
You must be signed in to change notification settings - Fork 542
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor (jkube-kit) : Add GeneratorManager interface in `jkube-kit/c…
…onfig/image` + Add an interface `GeneratorManager` in `jkube-kit/config/image` + Rename existing `GeneratorManager` to `DefaultGeneratorManager` that will implement above interface, rather than relying on static method. + Update maven Mojos and AbstractJKubeTask to use GeneratorManager interface method instead of static method Signed-off-by: Rohan Kumar <rohaan@redhat.com>
- Loading branch information
1 parent
d9610be
commit 325b44f
Showing
7 changed files
with
63 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...e-kit/config/image/src/main/java/org/eclipse/jkube/kit/config/image/GeneratorManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (c) 2019 Red Hat, Inc. | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at: | ||
* | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Red Hat, Inc. - initial API and implementation | ||
*/ | ||
package org.eclipse.jkube.kit.config.image; | ||
|
||
import java.util.List; | ||
|
||
public interface GeneratorManager { | ||
/** | ||
* Customize a given list of image configurations | ||
* | ||
* @param imageConfigs list of image configurations | ||
* @param prePackagePhase if true this is called in a prepackage phase where no artifacts has been packaged in target/. | ||
* @return Modified list of image configurations | ||
*/ | ||
List<ImageConfiguration> generate(List<ImageConfiguration> imageConfigs, boolean prePackagePhase); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
jkube-kit/generator/api/src/test/resources/META-INF/jkube/generator-default
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
org.eclipse.jkube.generator.api.GeneratorManagerTest$TestGenerator | ||
org.eclipse.jkube.generator.api.DefaultGeneratorManagerTest$TestGenerator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters