001/*- 002 * #%L 003 * Smile CDR - CDR 004 * %% 005 * Copyright (C) 2016 - 2025 Smile CDR, Inc. 006 * %% 007 * All rights reserved. 008 * #L% 009 */ 010package ca.cdr.api.consent; 011 012import java.util.ArrayList; 013import java.util.Collection; 014import java.util.List; 015 016/** 017 * Accumulator for the CONSENT_FETCH_QUERIES pointcut. 018 * String-based fetch queries should be added to this object which will be used to search for Consent resources. 019 */ 020public class ConsentFetchQueries { 021 022 private final List<String> myQueries = new ArrayList<>(); 023 024 public void addQuery(String theQuery) { 025 myQueries.add(theQuery); 026 } 027 028 public void addQueries(Collection<String> theFetchQueries) { 029 myQueries.addAll(theFetchQueries); 030 } 031 032 public List<String> getQueries() { 033 return myQueries; 034 } 035 036 public boolean isEmpty() { 037 return myQueries.isEmpty(); 038 } 039}