Interface ICustomReferencePolicyHandler<TYPE>
-
- All Known Implementing Classes:
AbstractIndexMissPolicyHandler
public interface ICustomReferencePolicyHandler<TYPE>
-
-
Field Summary
Fields Modifier and Type Field Description static ICustomReferencePolicyHandler<?>IGNORE_INDEX_MISS_POLICY
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default booleanhandleIdentifierNonMatch(ICustomReferencePolicy<TYPE> policy, TYPE reference, IReferenceVisitor<?> visitor)A callback used to handle the case where an identifier could not be parsed from the reference text.default booleanhandleIndexHit(ICustomReferencePolicy<TYPE> policy, TYPE reference, IEntityItem item, IReferenceVisitor<?> visitor)A callback used to handle the case where an identifier could be parsed and the index contains a matching entity.default booleanhandleIndexMiss(ICustomReferencePolicy<TYPE> policy, TYPE reference, List<IEntityItem.ItemType> itemTypes, String identifier, IReferenceVisitor<?> visitor)A callback used to handle the case where an identifier could be parsed from the reference text, but the index didn't contain a matching entity.
-
-
-
Field Detail
-
IGNORE_INDEX_MISS_POLICY
@NonNull static final ICustomReferencePolicyHandler<?> IGNORE_INDEX_MISS_POLICY
-
-
Method Detail
-
handleIdentifierNonMatch
default boolean handleIdentifierNonMatch(@NonNull ICustomReferencePolicy<TYPE> policy, @NonNull TYPE reference, @NonNull IReferenceVisitor<?> visitor)
A callback used to handle the case where an identifier could not be parsed from the reference text.- Parameters:
policy- the reference policy for this referencereference- the reference objectvisitor- the reference visitor used to resolve referenced objects- Returns:
trueif the reference is considered handled, orfalseotherwise
-
handleIndexMiss
default boolean handleIndexMiss(@NonNull ICustomReferencePolicy<TYPE> policy, @NonNull TYPE reference, @NonNull List<IEntityItem.ItemType> itemTypes, @NonNull String identifier, @NonNull IReferenceVisitor<?> visitor)
A callback used to handle the case where an identifier could be parsed from the reference text, but the index didn't contain a matching entity.- Parameters:
policy- the reference policy for this referencereference- the reference objectitemTypes- the item types that were checkedidentifier- the parsed identifiervisitor- the reference visitor used to resolve referenced objects- Returns:
trueif the reference is considered handled, orfalseotherwise
-
handleIndexHit
default boolean handleIndexHit(@NonNull ICustomReferencePolicy<TYPE> policy, @NonNull TYPE reference, @NonNull IEntityItem item, @NonNull IReferenceVisitor<?> visitor)
A callback used to handle the case where an identifier could be parsed and the index contains a matching entity.- Parameters:
policy- the reference policy for this referencereference- the reference objectitem- the entity that is referencedvisitor- the reference visitor used to resolve referenced objects- Returns:
trueif the reference is considered handled, orfalseotherwise
-
-