001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 * 019 */ 020 021package org.apache.directory.api.ldap.extras.controls.vlv; 022 023 024import org.apache.directory.api.ldap.model.message.Control; 025 026 027/** 028 * Virtual List View response control as specified in draft-ietf-ldapext-ldapv3-vlv-09. 029 * <pre> 030 * VirtualListViewResponse ::= SEQUENCE { 031 * targetPosition INTEGER (0 .. maxInt), 032 * contentCount INTEGER (0 .. maxInt), 033 * virtualListViewResult ENUMERATED { 034 * success (0), 035 * operationsError (1), 036 * protocolError (3), 037 * unwillingToPerform (53), 038 * insufficientAccessRights (50), 039 * timeLimitExceeded (3), 040 * adminLimitExceeded (11), 041 * innapropriateMatching (18), 042 * sortControlMissing (60), 043 * offsetRangeError (61), 044 * other(80), 045 * ... 046 * }, 047 * contextID OCTET STRING OPTIONAL 048 * } 049 * </pre> 050 * 051 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 052 */ 053public interface VirtualListViewResponse extends Control 054{ 055 /** the OID of the response control */ 056 String OID = "2.16.840.1.113730.3.4.10"; 057 058 059 /** 060 * @return the position in the list of entries 061 */ 062 int getTargetPosition(); 063 064 065 /** 066 * Sets the position in the list of entries 067 * 068 * @param targetPosition the position in the list of entries 069 */ 070 void setTargetPosition( int targetPosition ); 071 072 073 /** 074 * @return The number of returned entries 075 */ 076 int getContentCount(); 077 078 079 /** 080 * Sets the number of returned entries 081 * 082 * @param contentCount The number of returned entries 083 */ 084 void setContentCount( int contentCount ); 085 086 087 /** 088 * @return The VLV result 089 */ 090 VirtualListViewResultCode getVirtualListViewResult(); 091 092 093 /** 094 * Store the VLV result 095 * 096 * @param virtualListViewResultCode The result 097 */ 098 void setVirtualListViewResult( VirtualListViewResultCode virtualListViewResultCode ); 099 100 101 /** 102 * @return The context ID 103 */ 104 byte[] getContextId(); 105 106 107 /** 108 * Sets the context ID 109 * 110 * @param contextId The context ID 111 */ 112 void setContextId( byte[] contextId ); 113}