001/* 002 * The contents of this file are subject to the terms of the Common Development and 003 * Distribution License (the License). You may not use this file except in compliance with the 004 * License. 005 * 006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the 007 * specific language governing permission and limitations under the License. 008 * 009 * When distributing Covered Software, include this CDDL Header Notice in each file and include 010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL 011 * Header, with the fields enclosed by brackets [] replaced by your own identifying 012 * information: "Portions Copyright [year] [name of copyright owner]". 013 * 014 * Copyright 2009 Sun Microsystems, Inc. 015 * Portions copyright 2012 ForgeRock AS. 016 */ 017 018package org.forgerock.opendj.ldap.responses; 019 020import java.util.List; 021 022import org.forgerock.opendj.ldap.DecodeException; 023import org.forgerock.opendj.ldap.DecodeOptions; 024import org.forgerock.opendj.ldap.controls.Control; 025import org.forgerock.opendj.ldap.controls.ControlDecoder; 026 027/** 028 * A Search Result Reference represents an area not yet explored during a Search 029 * operation. 030 */ 031public interface SearchResultReference extends Response { 032 033 @Override 034 SearchResultReference addControl(Control control); 035 036 /** 037 * Adds the provided continuation reference URI to this search result 038 * reference. 039 * 040 * @param uri 041 * The continuation reference URI to be added. 042 * @return This search result reference. 043 * @throws UnsupportedOperationException 044 * If this search result reference does not permit continuation 045 * reference URI to be added. 046 * @throws NullPointerException 047 * If {@code uri} was {@code null}. 048 */ 049 SearchResultReference addURI(String uri); 050 051 @Override 052 <C extends Control> C getControl(ControlDecoder<C> decoder, DecodeOptions options) 053 throws DecodeException; 054 055 @Override 056 List<Control> getControls(); 057 058 /** 059 * Returns a {@code List} containing the continuation reference URIs 060 * included with this search result reference. The returned {@code List} may 061 * be modified if permitted by this search result reference. 062 * 063 * @return A {@code List} containing the continuation reference URIs. 064 */ 065 List<String> getURIs(); 066 067}