Package org.forgerock.opendj.config
Class PropertyDefinitionVisitor<R,P>
java.lang.Object
org.forgerock.opendj.config.PropertyDefinitionVisitor<R,P>
- Type Parameters:
R
- The return type of this visitor's methods. UseVoid
for visitors that do not need to return results.P
- The type of the additional parameter to this visitor's methods. UseVoid
for visitors that do not need an additional parameter.
A visitor of property definitions, in the style of the visitor design
pattern. Classes implementing this interface can query property definitions
in a type-safe manner when the kind of property definition is unknown at
compile time. When a visitor is passed to a property definition's accept
method, the corresponding visit method most applicable to that property
definition is invoked.
Each visitXXX
method is provided with a default implementation
which calls visitUnknown(PropertyDefinition, Object)
. Sub-classes
can override any or all of the methods to provide their own type-specific
behavior.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvisitAci
(AciPropertyDefinition pd, P p) Visit a dseecompat Global ACI property definition.<C extends ConfigurationClient,
S extends Configuration>
RvisitAggregation
(AggregationPropertyDefinition<C, S> pd, P p) Visit an aggregation property definition.Visit an attribute type property definition.Visit a boolean property definition.visitClass
(ClassPropertyDefinition pd, P p) Visit a class property definition.visitDn
(DnPropertyDefinition pd, P p) Visit a DN property definition.Visit a duration property definition.visitEnum
(EnumPropertyDefinition<E> pd, P p) Visit an enumeration property definition.visitHost
(HostPropertyDefinition pd, P p) Visit a host property definition.Visit a host:port property definition.Visit an integer property definition.Visit a IP address mask property definition.visitSize
(SizePropertyDefinition pd, P p) Visit a size property definition.visitString
(StringPropertyDefinition pd, P p) Visit a string property definition.<T> R
visitUnknown
(PropertyDefinition<T> pd, P p) Visit an unknown type of property definition.
-
Constructor Details
-
PropertyDefinitionVisitor
protected PropertyDefinitionVisitor()Default constructor.
-
-
Method Details
-
visitAci
Visit a dseecompat Global ACI property definition.- Parameters:
pd
- The Global ACI property definition to visit.p
- A visitor specified parameter.- Returns:
- Returns a visitor specified result.
-
visitAggregation
public <C extends ConfigurationClient,S extends Configuration> R visitAggregation(AggregationPropertyDefinition<C, S> pd, P p) Visit an aggregation property definition.- Type Parameters:
C
- The type of client managed object configuration that this aggregation property definition refers to.S
- The type of server managed object configuration that this aggregation property definition refers to.- Parameters:
pd
- The aggregation property definition to visit.p
- A visitor specified parameter.- Returns:
- Returns a visitor specified result.
-
visitAttributeType
Visit an attribute type property definition.- Parameters:
pd
- The attribute type property definition to visit.p
- A visitor specified parameter.- Returns:
- Returns a visitor specified result.
-
visitBoolean
Visit a boolean property definition.- Parameters:
pd
- The boolean property definition to visit.p
- A visitor specified parameter.- Returns:
- Returns a visitor specified result.
-
visitClass
Visit a class property definition.- Parameters:
pd
- The class property definition to visit.p
- A visitor specified parameter.- Returns:
- Returns a visitor specified result.
-
visitDn
Visit a DN property definition.- Parameters:
pd
- The DN property definition to visit.p
- A visitor specified parameter.- Returns:
- Returns a visitor specified result.
-
visitDuration
Visit a duration property definition.- Parameters:
pd
- The duration property definition to visit.p
- A visitor specified parameter.- Returns:
- Returns a visitor specified result.
-
visitEnum
Visit an enumeration property definition.- Type Parameters:
E
- The enumeration that should be used for values of the property definition.- Parameters:
pd
- The enumeration property definition to visit.p
- A visitor specified parameter.- Returns:
- Returns a visitor specified result.
-
visitInteger
Visit an integer property definition.- Parameters:
pd
- The integer property definition to visit.p
- A visitor specified parameter.- Returns:
- Returns a visitor specified result.
-
visitHost
Visit a host property definition.- Parameters:
pd
- The host property definition to visit.p
- A visitor specified parameter.- Returns:
- Returns a visitor specified result.
-
visitHostPort
Visit a host:port property definition.- Parameters:
pd
- The host:port property definition to visit.p
- A visitor specified parameter.- Returns:
- Returns a visitor specified result.
-
visitIpAddressMask
Visit a IP address mask property definition.- Parameters:
pd
- The IP address mask property definition to visit.p
- A visitor specified parameter.- Returns:
- Returns a visitor specified result.
-
visitSize
Visit a size property definition.- Parameters:
pd
- The size property definition to visit.p
- A visitor specified parameter.- Returns:
- Returns a visitor specified result.
-
visitString
Visit a string property definition.- Parameters:
pd
- The string property definition to visit.p
- A visitor specified parameter.- Returns:
- Returns a visitor specified result.
-
visitUnknown
Visit an unknown type of property definition. Implementations of this method can provide default behavior for unknown property definition types.The default implementation of this method throws an
PropertyException
. Sub-classes can override this method with their own default behavior.- Type Parameters:
T
- The type of the underlying property.- Parameters:
pd
- The property definition to visit.p
- A visitor specified parameter.- Returns:
- Returns a visitor specified result.
- Throws:
PropertyException
- Visitor implementations may optionally throw this exception.
-