Class MissingValueHelper
- java.lang.Object
-
- org.craftercms.deployer.utils.handlebars.MissingValueHelper
-
- All Implemented Interfaces:
com.github.jknack.handlebars.Helper<Object>
public class MissingValueHelper extends Object implements com.github.jknack.handlebars.Helper<Object>
Handlebars helper that will add a missing field error to the currentValidationResult
if the parameter value is missing.- Author:
- avasquez
-
-
Field Summary
Fields Modifier and Type Field Description static MissingValueHelper
INSTANCE
protected ThreadLocal<org.craftercms.commons.validation.ValidationResult>
validationResult
-
Constructor Summary
Constructors Modifier Constructor Description protected
MissingValueHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
apply(Object context, com.github.jknack.handlebars.Options options)
void
clearValidationResult()
org.craftercms.commons.validation.ValidationResult
getValidationResult()
-
-
-
Field Detail
-
INSTANCE
public static final MissingValueHelper INSTANCE
-
validationResult
protected ThreadLocal<org.craftercms.commons.validation.ValidationResult> validationResult
-
-
Method Detail
-
getValidationResult
public org.craftercms.commons.validation.ValidationResult getValidationResult()
-
clearValidationResult
public void clearValidationResult()
-
apply
public Object apply(Object context, com.github.jknack.handlebars.Options options) throws IOException
- Specified by:
apply
in interfacecom.github.jknack.handlebars.Helper<Object>
- Throws:
IOException
-
-