public class FeatureValidator extends Object
Constructor and Description |
---|
FeatureValidator()
Create a new feature validator
|
Modifier and Type | Method and Description |
---|---|
boolean |
applyDefaultValues(org.apache.sling.feature.Feature feature,
FeatureValidationResult result)
Apply default values from the result of a validation run.
|
org.apache.sling.feature.builder.FeatureProvider |
getFeatureProvider()
Get the current feature provider
|
boolean |
isLiveValues()
Are live values validated?
|
void |
setFeatureProvider(org.apache.sling.feature.builder.FeatureProvider provider)
Set the feature provider
|
void |
setLiveValues(boolean value)
Set whether live values are validated.
|
FeatureValidationResult |
validate(org.apache.sling.feature.Feature feature)
Validate the feature against its configuration API
|
FeatureValidationResult |
validate(org.apache.sling.feature.Feature feature,
ConfigurationApi api)
Validate the feature against the configuration API
|
public org.apache.sling.feature.builder.FeatureProvider getFeatureProvider()
null
public void setFeatureProvider(org.apache.sling.feature.builder.FeatureProvider provider)
provider
- the feature provider to setpublic boolean isLiveValues()
true
if live values are validatedpublic void setLiveValues(boolean value)
value
- Flag for validating live valuespublic FeatureValidationResult validate(org.apache.sling.feature.Feature feature)
feature
- The featureFeatureValidationResult
IllegalArgumentException
- If api is not availablepublic FeatureValidationResult validate(org.apache.sling.feature.Feature feature, ConfigurationApi api)
feature
- The featureapi
- The configuration APIFeatureValidationResult
IllegalArgumentException
- If api is null
public boolean applyDefaultValues(org.apache.sling.feature.Feature feature, FeatureValidationResult result)
feature
- The feature containing the configurationsresult
- The resulttrue
if a default value has been applied (the feature has been changed)Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.