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 package org.apache.directory.api.ldap.extras.controls.syncrepl.syncState;
21
22
23 import org.apache.directory.api.ldap.model.message.Control;
24
25
26 /**
27 * A syncStateValue object, as defined in RFC 4533 :
28 * <pre>
29 * 2.3. Sync State Control
30 *
31 * The Sync State Control is an LDAP Control [RFC4511] where the
32 * controlType is the object identifier 1.3.6.1.4.1.4203.1.9.1.2 and the
33 * controlValue, an OCTET STRING, contains a BER-encoded syncStateValue.
34 * The criticality is FALSE.
35 *
36 * syncStateValue ::= SEQUENCE {
37 * state ENUMERATED {
38 * present (0),
39 * add (1),
40 * modify (2),
41 * delete (3)
42 * },
43 * entryUUID syncUUID,
44 * cookie syncCookie OPTIONAL
45 * }
46 *
47 * The Sync State Control is only applicable to SearchResultEntry and
48 * SearchResultReference Messages.
49 * </pre>
50 *
51 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
52 */
53 public interface SyncStateValue extends Control
54 {
55 /** This control OID */
56 String OID = "1.3.6.1.4.1.4203.1.9.1.2";
57
58
59 /**
60 * @return the cookie
61 */
62 byte[] getCookie();
63
64
65 /**
66 * @param cookie the cookie to set
67 */
68 void setCookie( byte[] cookie );
69
70
71 /**
72 * @return the syncState's type
73 */
74 SyncStateTypeEnum getSyncStateType();
75
76
77 /**
78 * set the syncState's type
79 *
80 * @param syncStateType the syncState's type
81 */
82 void setSyncStateType( SyncStateTypeEnum syncStateType );
83
84
85 /**
86 * @return the entryUUID
87 */
88 byte[] getEntryUUID();
89
90
91 /**
92 * set the entryUUID
93 *
94 * @param entryUUID the entryUUID
95 */
96 void setEntryUUID( byte[] entryUUID );
97 }