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 * https://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 */ 020package org.apache.directory.api.ldap.extras.controls.syncrepl.syncState; 021 022 023import org.apache.directory.api.ldap.model.message.Control; 024 025 026/** 027 * A syncStateValue object, as defined in RFC 4533 : 028 * <pre> 029 * 2.3. Sync State Control 030 * 031 * The Sync State Control is an LDAP Control [RFC4511] where the 032 * controlType is the object identifier 1.3.6.1.4.1.4203.1.9.1.2 and the 033 * controlValue, an OCTET STRING, contains a BER-encoded syncStateValue. 034 * The criticality is FALSE. 035 * 036 * syncStateValue ::= SEQUENCE { 037 * state ENUMERATED { 038 * present (0), 039 * add (1), 040 * modify (2), 041 * delete (3) 042 * }, 043 * entryUUID syncUUID, 044 * cookie syncCookie OPTIONAL 045 * } 046 * 047 * The Sync State Control is only applicable to SearchResultEntry and 048 * SearchResultReference Messages. 049 * </pre> 050 * 051 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 052 */ 053public interface SyncStateValue extends Control 054{ 055 /** This control OID */ 056 String OID = "1.3.6.1.4.1.4203.1.9.1.2"; 057 058 059 /** 060 * @return the cookie 061 */ 062 byte[] getCookie(); 063 064 065 /** 066 * @param cookie the cookie to set 067 */ 068 void setCookie( byte[] cookie ); 069 070 071 /** 072 * @return the syncState's type 073 */ 074 SyncStateTypeEnum getSyncStateType(); 075 076 077 /** 078 * set the syncState's type 079 * 080 * @param syncStateType the syncState's type 081 */ 082 void setSyncStateType( SyncStateTypeEnum syncStateType ); 083 084 085 /** 086 * @return the entryUUID 087 */ 088 byte[] getEntryUUID(); 089 090 091 /** 092 * set the entryUUID 093 * 094 * @param entryUUID the entryUUID 095 */ 096 void setEntryUUID( byte[] entryUUID ); 097}