View Javadoc
1   /*
2    *   Licensed to the Apache Software Foundation (ASF) under one
3    *   or more contributor license agreements.  See the NOTICE file
4    *   distributed with this work for additional information
5    *   regarding copyright ownership.  The ASF licenses this file
6    *   to you under the Apache License, Version 2.0 (the
7    *   "License"); you may not use this file except in compliance
8    *   with the License.  You may obtain a copy of the License at
9    *
10   *     http://www.apache.org/licenses/LICENSE-2.0
11   *
12   *   Unless required by applicable law or agreed to in writing,
13   *   software distributed under the License is distributed on an
14   *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   *   KIND, either express or implied.  See the License for the
16   *   specific language governing permissions and limitations
17   *   under the License.
18   *
19   */
20  
21  package org.apache.directory.api.ldap.extras.controls.vlv;
22  
23  
24  import org.apache.directory.api.ldap.model.message.Control;
25  
26  
27  /**
28   * Virtual List View response control as specified in draft-ietf-ldapext-ldapv3-vlv-09.
29   * <pre>
30   *  VirtualListViewResponse ::= SEQUENCE {
31   *         targetPosition    INTEGER (0 .. maxInt),
32   *         contentCount     INTEGER (0 .. maxInt),
33   *         virtualListViewResult ENUMERATED {
34   *              success (0),
35   *              operationsError (1),
36   *              protocolError (3),
37   *              unwillingToPerform (53),
38   *              insufficientAccessRights (50),
39   *              timeLimitExceeded (3),
40   *              adminLimitExceeded (11),
41   *              innapropriateMatching (18),
42   *              sortControlMissing (60),
43   *              offsetRangeError (61),
44   *              other(80),
45   *              ... 
46   *         },
47   *         contextID     OCTET STRING OPTIONAL 
48   * }
49   * </pre>
50   *
51   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
52   */
53  public interface VirtualListViewResponse extends Control
54  {
55      /** the OID of the response control */
56      String OID = "2.16.840.1.113730.3.4.10";
57  
58  
59      /**
60       * @return the position in the list of entries
61       */
62      int getTargetPosition();
63  
64  
65      /**
66       * Sets the position in the list of entries
67       * 
68       * @param targetPosition the position in the list of entries
69       */
70      void setTargetPosition( int targetPosition );
71  
72  
73      /**
74       * @return The number of returned entries
75       */
76      int getContentCount();
77  
78  
79      /**
80       * Sets the number of returned entries
81       * 
82       * @param contentCount The number of returned entries
83       */
84      void setContentCount( int contentCount );
85  
86  
87      /**
88       * @return The VLV result
89       */
90      VirtualListViewResultCode getVirtualListViewResult();
91  
92  
93      /**
94       * Store the VLV result
95       * 
96       * @param virtualListViewResultCode The result
97       */
98      void setVirtualListViewResult( VirtualListViewResultCode virtualListViewResultCode );
99  
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 }