Interface ICustomReferencePolicyHandler<TYPE>

    • 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 reference
        reference - the reference object
        visitor - the reference visitor used to resolve referenced objects
        Returns:
        true if the reference is considered handled, or false 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 reference
        reference - the reference object
        itemTypes - the item types that were checked
        identifier - the parsed identifier
        visitor - the reference visitor used to resolve referenced objects
        Returns:
        true if the reference is considered handled, or false 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 reference
        reference - the reference object
        item - the entity that is referenced
        visitor - the reference visitor used to resolve referenced objects
        Returns:
        true if the reference is considered handled, or false otherwise