001/* 002 * SPDX-FileCopyrightText: none 003 * SPDX-License-Identifier: CC0-1.0 004 */ 005 006package gov.nist.secauto.oscal.lib.profile.resolver.policy; 007 008import edu.umd.cs.findbugs.annotations.NonNull; 009 010public interface ICustomReferencePolicy<TYPE> extends IReferencePolicy<TYPE> { 011 012 /** 013 * Get the parser to use to parse an entity identifier from the reference text. 014 * 015 * @return the parser 016 */ 017 @NonNull 018 IIdentifierParser getIdentifierParser(); 019 020 /** 021 * Retrieve the reference text from the {@code reference} object. 022 * 023 * @param reference 024 * the reference object 025 * @return the reference text or {@code null} if there is no text 026 */ 027 String getReferenceText(@NonNull TYPE reference); 028 029 /** 030 * Update the reference text used in the {@code reference} object. 031 * 032 * @param reference 033 * the reference object 034 * @param newReferenceText 035 * the reference text replacement 036 */ 037 void setReferenceText(@NonNull TYPE reference, @NonNull String newReferenceText); 038}