Class HasPropertyVisitor
- java.lang.Object
-
- org.forgerock.config.resolvers.template.HasPropertyVisitor
-
- All Implemented Interfaces:
TemplateVisitor<Boolean,Void>
public class HasPropertyVisitor extends Object implements TemplateVisitor<Boolean,Void>
This visitor detects if there is any token/placeholder inside the givenTemplate.
-
-
Constructor Summary
Constructors Constructor Description HasPropertyVisitor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TemplateVisitor<Boolean,Void>hasProperty()Returns a newHasPropertyVisitor.BooleanvisitEmpty(Void context)Visit an empty template with the givencontextobject.BooleanvisitProperty(Void context, Template property, Template defaultValue)Visit a property template with the givencontextobject.BooleanvisitSequence(Void context, List<Template> sequence)Visit a sequence of templates with the givencontextobject.BooleanvisitText(Void context, String text)Visit a textual template with the givencontextobject.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.forgerock.config.resolvers.template.TemplateVisitor
visitAny
-
-
-
-
Method Detail
-
hasProperty
public static TemplateVisitor<Boolean,Void> hasProperty()
Returns a newHasPropertyVisitor.- Returns:
- a new
HasPropertyVisitor.
-
visitText
public Boolean visitText(Void context, String text)
Description copied from interface:TemplateVisitorVisit a textual template with the givencontextobject.- Specified by:
visitTextin interfaceTemplateVisitor<Boolean,Void>- Parameters:
context- the contextual object (can benull)text- the text contained in the visited textual template- Returns:
- the result of the operation on the template
-
visitEmpty
public Boolean visitEmpty(Void context)
Description copied from interface:TemplateVisitorVisit an empty template with the givencontextobject.- Specified by:
visitEmptyin interfaceTemplateVisitor<Boolean,Void>- Parameters:
context- the contextual object (can benull)- Returns:
- the result of the operation on the template
-
visitProperty
public Boolean visitProperty(Void context, Template property, Template defaultValue)
Description copied from interface:TemplateVisitorVisit a property template with the givencontextobject.- Specified by:
visitPropertyin interfaceTemplateVisitor<Boolean,Void>- Parameters:
context- the contextual object (can benull)property- the template that defines the property's namedefaultValue- the template that defines the property's default value- Returns:
- the result of the operation on the template
-
visitSequence
public Boolean visitSequence(Void context, List<Template> sequence)
Description copied from interface:TemplateVisitorVisit a sequence of templates with the givencontextobject.- Specified by:
visitSequencein interfaceTemplateVisitor<Boolean,Void>- Parameters:
context- the contextual object (can benull)sequence- the (nevernull) list of templates within this sequence- Returns:
- the result of the operation on the template
-
-