public class ProfileUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ProfileUtil.ProcessorConfigurationExtractor |
| Modifier and Type | Field and Description |
|---|---|
static ProfileUtil.ProcessorConfigurationExtractor |
ENRICHER_CONFIG
Get the enricher configuration
|
static ProfileUtil.ProcessorConfigurationExtractor |
GENERATOR_CONFIG
Get the generator configuration
|
static String[] |
PROFILE_FILENAMES |
| Constructor and Description |
|---|
ProfileUtil() |
| Modifier and Type | Method and Description |
|---|---|
static ProcessorConfig |
extractProcesssorConfiguration(ProcessorConfig given,
ProfileUtil.ProcessorConfigurationExtractor extractor,
String profile,
File resourceDir)
Find an enricher or generator config, possibly via a profile
|
static Profile |
findProfile(String profile,
File resourceDir)
Find a profile.
|
static List<Profile> |
fromYaml(InputStream is)
Load a profile from an input stream.
|
static Profile |
lookup(String name,
File directory)
Lookup profiles from a given directory
|
static Map<String,Profile> |
readAllFromClasspath()
Read all profiles found in the classpath.
|
public static final String[] PROFILE_FILENAMES
public static final ProfileUtil.ProcessorConfigurationExtractor GENERATOR_CONFIG
public static final ProfileUtil.ProcessorConfigurationExtractor ENRICHER_CONFIG
public static Profile findProfile(String profile, File resourceDir) throws IOException
findProfile(String, File)profile - the profile's nameresourceDir - a directory to check for profiles.IOExceptionpublic static ProcessorConfig extractProcesssorConfiguration(ProcessorConfig given, ProfileUtil.ProcessorConfigurationExtractor extractor, String profile, File resourceDir) throws IOException
given - a given config which should be used directlyextractor - how to extract the config from a profile when foundprofile - the profile name (can be null, then no profile is used)resourceDir - resource directory where to lookup the profile (in addition to a classpath lookup)null if none could be foundMojoExecutionExceptionIOExceptionpublic static Map<String,Profile> readAllFromClasspath() throws IOException
IOException - if reading of a profile failspublic static Profile lookup(String name, File directory) throws IOException
name - name of the profile to lookupdirectory - directory to lookupIOException - if somethings fails during lookuppublic static List<Profile> fromYaml(InputStream is) throws IOException
is - inputstream to read the profile fromIOException - if deserialization failsCopyright © 2016. All rights reserved.