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  package org.apache.directory.api.ldap.model.message.controls;
20  
21  
22  import org.apache.directory.api.ldap.model.message.Control;
23  
24  
25  /**
26   * A simple Subentries Control. This control is described in RFC 3672 :
27   *    The subentries control MAY be sent with a searchRequest to control
28   *    the visibility of entries and subentries which are within scope.
29   *    Non-visible entries or subentries are not returned in response to the
30   *    request.
31   * 
32   *    The subentries control is an LDAP Control whose controlType is
33   *    1.3.6.1.4.1.4203.1.10.1, criticality is TRUE or FALSE (hence absent),
34   *    and controlValue contains a BER-encoded BOOLEAN indicating
35   *    visibility.  A controlValue containing the value TRUE indicates that
36   *    subentries are visible and normal entries are not.  A controlValue
37   *    containing the value FALSE indicates that normal entries are visible
38   *    and subentries are not.
39   * 
40   *    Note that TRUE visibility has the three octet encoding { 01 01 FF }
41   *    and FALSE visibility has the three octet encoding { 01 01 00 }.
42   * 
43   *    The controlValue SHALL NOT be absent.
44   * 
45   *    In absence of this control, subentries are not visible to singleLevel
46   *    and wholeSubtree scope Search requests but are visible to baseObject
47   *    scope Search requests.
48   * 
49   *    There is no corresponding response control.
50   * 
51   *    This control is not appropriate for non-Search operations.
52   *
53   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
54   */
55  public interface Subentries extends Control
56  {
57      /** The control OID */
58      String OID = "1.3.6.1.4.1.4203.1.10.1";
59  
60  
61      /**
62       * Check if the subEntry is visible
63       *
64       * @return true or false.
65       */
66      boolean isVisible();
67  
68  
69      /**
70       * Set the visibility flag
71       *
72       * @param visibility The visibility flag : true or false
73       */
74      void setVisibility( boolean visibility );
75  }