public abstract class ModelUtility
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
ModelUtility.ArtifactVersionResolver
Optional artifact dependency version resolver
|
static class |
ModelUtility.ResolverOptions
Parameter builder class for
getEffectiveModel(Model, ResolverOptions) method. |
static interface |
ModelUtility.VariableResolver
Optional variable resolver
|
Constructor and Description |
---|
ModelUtility() |
Modifier and Type | Method and Description |
---|---|
static Model |
applyArtifactVersions(Model model,
ModelUtility.ArtifactVersionResolver resolver)
Resolves artifact versions that are no set explicitly in the provisioning file via the given resolver (version = "LATEST").
|
static Model |
applyVariables(Model model,
ModelUtility.VariableResolver resolver)
Applies a set of variables to the given model.
|
static Model |
getEffectiveModel(Model model)
Replace all variables in the model and return a new model with the replaced values.
|
static Model |
getEffectiveModel(Model model,
ModelUtility.ResolverOptions options)
Replace all variables in the model and return a new model with the replaced values.
|
static Model |
getEffectiveModel(Model model,
ModelUtility.VariableResolver resolver)
Deprecated.
|
static void |
merge(Model base,
Model additional)
Deprecated.
Use {link
MergeUtility.merge(Model, Model) |
static void |
merge(Model base,
Model additional,
boolean handleRemove)
|
static java.util.Map<Traceable,java.lang.String> |
validate(Model model)
Validates the model.
|
static java.util.Map<Traceable,java.lang.String> |
validateIncludingVersion(Model model)
Validates the model and checks that each feature has a valid version.
|
@Deprecated public static void merge(Model base, Model additional)
MergeUtility.merge(Model, Model)
base
- The base model.additional
- The additional model.@Deprecated public static void merge(Model base, Model additional, boolean handleRemove)
MergeUtility.merge(Model, Model, org.apache.sling.provisioning.model.MergeUtility.MergeOptions)
base
- The base model.additional
- The additional model.handleRemove
- Handle special remove run mode@Deprecated public static Model getEffectiveModel(Model model, ModelUtility.VariableResolver resolver)
getEffectiveModel(Model)
or getEffectiveModel(Model, ResolverOptions)
insteadmodel
- The base model.resolver
- Optional variable resolver.java.lang.IllegalArgumentException
- If a variable can't be replaced or configuration properties can't be parsedpublic static Model getEffectiveModel(Model model)
model
- The base model.java.lang.IllegalArgumentException
- If a variable can't be replaced or configuration properties can't be parsedpublic static Model getEffectiveModel(Model model, ModelUtility.ResolverOptions options)
model
- The base model.options
- Resolver options.java.lang.IllegalArgumentException
- If a variable can't be replaced or configuration properties can't be parsedpublic static java.util.Map<Traceable,java.lang.String> validate(Model model)
model
- The model to validatenull
if valid.public static Model applyVariables(Model model, ModelUtility.VariableResolver resolver)
model
- Original modelresolver
- Variable resolverjava.lang.IllegalArgumentException
- If a variable can't be replaced or configuration properties can't be parsedpublic static Model applyArtifactVersions(Model model, ModelUtility.ArtifactVersionResolver resolver)
model
- Original modelresolver
- Artifact version resolverjava.lang.IllegalArgumentException
- If the provider does not allow unresolved version and a version could not be resolvedpublic static java.util.Map<Traceable,java.lang.String> validateIncludingVersion(Model model)
validate(Model)
and then checks
that each feature has a version.model
- The model to validatenull
if valid.Copyright © 2010 - 2020 Adobe. All Rights Reserved