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