io.jshift.maven.enricher.api.model.Configuration Maven / Gradle / Ivy
The newest version!
package io.jshift.maven.enricher.api.model;
import io.jshift.kit.build.service.docker.ImageConfiguration;
import io.jshift.kit.config.resource.ProcessorConfig;
import io.jshift.kit.config.resource.ResourceConfig;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Properties;
import java.util.function.BiFunction;
import java.util.function.Function;
/**
* Configuration class which holds various configuration
* related components
*
* @author roland
* @since 12.10.18
*/
public class Configuration {
// Project properties
private Properties properties = new Properties();
// List of image configuration used when building
private List images;
// Configuration influencing the resource generation
private ResourceConfig resource;
// Lookup plugin project configuration
private BiFunction>> pluginConfigLookup;
// Lookup secret configuration
private Function>> secretConfigLookup;
// Processor config which holds all the configuration for processors / enrichers
private ProcessorConfig processorConfig;
private Configuration() {
}
public Properties getProperties() {
return properties;
}
public Optional> getImages() {
return Optional.ofNullable(images);
}
public Optional getResource() {
return Optional.ofNullable(resource);
}
public Optional getProcessorConfig() {
return Optional.ofNullable(processorConfig);
}
/**
* Gets plugin configuration values. Since there can be inner values,
* it returns a Map of Objects where an Object can be a
* simple type, List or another Map.
*
* @param system the underlying build platform (e.g. "maven")
* @param id which plugin configuration to pick
* @return configuration map specific to this id
*/
public Optional
© 2015 - 2024 Weber Informatics LLC | Privacy Policy