public class ResourceUtil extends Object
Modifier and Type | Method and Description |
---|---|
static List<io.fabric8.kubernetes.api.model.HasMetadata> |
deserializeKubernetesListOrTemplate(File manifest) |
static File |
getFinalResourceDir(File resourceDir,
String environment) |
static boolean |
jsonEquals(com.google.gson.JsonObject first,
com.google.gson.JsonObject second) |
static <T> T |
load(File file,
Class<T> clazz) |
static <T> T |
load(File file,
Class<T> clazz,
ResourceFileType resourceFileType) |
static <T> T |
load(InputStream in,
Class<T> clazz,
ResourceFileType resourceFileType) |
static File |
save(File file,
Object data) |
static File |
save(File file,
Object data,
ResourceFileType type) |
static String |
toJson(Object resource) |
static String |
toYaml(Object resource) |
public static boolean jsonEquals(com.google.gson.JsonObject first, com.google.gson.JsonObject second)
public static List<io.fabric8.kubernetes.api.model.HasMetadata> deserializeKubernetesListOrTemplate(File manifest) throws IOException
IOException
public static <T> T load(File file, Class<T> clazz) throws IOException
IOException
public static <T> T load(File file, Class<T> clazz, ResourceFileType resourceFileType) throws IOException
IOException
public static <T> T load(InputStream in, Class<T> clazz, ResourceFileType resourceFileType) throws IOException
IOException
public static File save(File file, Object data) throws IOException
IOException
public static File save(File file, Object data, ResourceFileType type) throws IOException
IOException
public static String toYaml(Object resource) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingException
public static String toJson(Object resource) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingException
Copyright © 2021. All rights reserved.