Interface ICustomReferencePolicyHandler<TYPE>
- All Known Implementing Classes:
AbstractIndexMissPolicyHandler
public interface ICustomReferencePolicyHandler<TYPE>
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
handleIdentifierNonMatch
(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 boolean
handleIndexHit
(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 boolean
handleIndexMiss
(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 Details
-
IGNORE_INDEX_MISS_POLICY
-
-
Method Details
-
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:
true
if the reference is considered handled, orfalse
otherwise
-
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:
true
if the reference is considered handled, orfalse
otherwise
-
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:
true
if the reference is considered handled, orfalse
otherwise
-