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.syncInfoValue;
21
22
23 import java.util.List;
24
25 import org.apache.directory.api.ldap.model.message.Control;
26
27
28 /**
29 * A syncInfoValue object, as defined in RFC 4533 ;
30 * <pre>
31 * 2.5. Sync Info Message
32 *
33 * The Sync Info Message is an LDAP Intermediate Response Message
34 * [RFC4511] where responseName is the object identifier
35 * 1.3.6.1.4.1.4203.1.9.1.4 and responseValue contains a BER-encoded
36 * syncInfoValue. The criticality is FALSE (and hence absent).
37 *
38 * syncInfoValue ::= CHOICE {
39 * newcookie [0] syncCookie,
40 * refreshDelete [1] SEQUENCE {
41 * cookie syncCookie OPTIONAL,
42 * refreshDone BOOLEAN DEFAULT TRUE
43 * },
44 * refreshPresent [2] SEQUENCE {
45 * cookie syncCookie OPTIONAL,
46 * refreshDone BOOLEAN DEFAULT TRUE
47 * },
48 * syncIdSet [3] SEQUENCE {
49 * cookie syncCookie OPTIONAL,
50 * refreshDeletes BOOLEAN DEFAULT FALSE,
51 * syncUUIDs SET OF syncUUID
52 * }
53 * }
54 * </pre>
55 *
56 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
57 */
58 public interface SyncInfoValue extends Control
59 {
60 /** This control OID */
61 String OID = "1.3.6.1.4.1.4203.1.9.1.4";
62
63
64 /**
65 * Get the control type.
66 *
67 * @return the type : one of newCookie, refreshDelete, refreshPresent or syncIdSet
68 */
69 SynchronizationInfoEnum getType();
70
71
72 /**
73 * @param type the synchronization type to set
74 */
75 void setType( SynchronizationInfoEnum type );
76
77
78 /**
79 * @return the cookie
80 */
81 byte[] getCookie();
82
83
84 /**
85 * @param cookie the cookie to set
86 */
87 void setCookie( byte[] cookie );
88
89
90 /**
91 * @return the refreshDone
92 */
93 boolean isRefreshDone();
94
95
96 /**
97 * @param refreshDone the refreshDone to set
98 */
99 void setRefreshDone( boolean refreshDone );
100
101
102 /**
103 * @return the refreshDeletes
104 */
105 boolean isRefreshDeletes();
106
107
108 /**
109 * @param refreshDeletes the refreshDeletes to set
110 */
111 void setRefreshDeletes( boolean refreshDeletes );
112
113
114 /**
115 * @return the syncUUIDs
116 */
117 List<byte[]> getSyncUUIDs();
118
119
120 /**
121 * @param syncUUIDs the syncUUIDs to set
122 */
123 void setSyncUUIDs( List<byte[]> syncUUIDs );
124
125
126 /**
127 * @param syncUUID the syncUUIDs to set
128 */
129 void addSyncUUID( byte[] syncUUID );
130 }