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 * http://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 */ 019package org.apache.directory.api.ldap.model.message.controls; 020 021 022import org.apache.directory.api.ldap.model.message.Control; 023 024 025/** 026 * A persistence search object 027 * 028 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 029 */ 030public interface PersistentSearch extends Control 031{ 032 /** This control OID */ 033 String OID = "2.16.840.1.113730.3.4.3"; 034 035 /** Min and Max values for the possible combined change types */ 036 int CHANGE_TYPES_MIN = ChangeType.ADD.getValue(); 037 038 /** The maximum value for the possible combined changes type */ 039 int CHANGE_TYPES_MAX = ChangeType.ADD.getValue() 040 | ChangeType.DELETE.getValue() 041 | ChangeType.MODIFY.getValue() 042 | ChangeType.MODDN.getValue(); 043 044 045 /** 046 * Sets the ChangesOnly flag 047 * 048 * @param changesOnly The ChangesOnly flag 049 */ 050 void setChangesOnly( boolean changesOnly ); 051 052 053 /** 054 * @return <TT>TRUE</TT> if the changesOnly flag is set 055 */ 056 boolean isChangesOnly(); 057 058 059 /** 060 * Sets the return entry changes flag 061 * 062 * @param returnECs the return entry changes flag 063 */ 064 void setReturnECs( boolean returnECs ); 065 066 067 /** 068 * @return <TT>TRUE</TT> if the return entry changes flag is set 069 */ 070 boolean isReturnECs(); 071 072 073 /** 074 * Set the changeType value we want to get back ( a combinaison of Add, Delete, 075 * Modify and ModifyDN) 076 * 077 * @param changeTypes The changeType values (Add, Modify, Delete and ModifyDn) 078 */ 079 void setChangeTypes( int changeTypes ); 080 081 082 /** 083 * @return The changeTypes value 084 */ 085 int getChangeTypes(); 086 087 088 /** 089 * For each changeType, tells if the notification is enabled 090 * 091 * @param changeType The ChnageType we are interested in 092 * @return <T>TRUE<T> if the notification is set for this ChangeType 093 */ 094 boolean isNotificationEnabled( ChangeType changeType ); 095 096 097 /** 098 * Sets the notification for a given changeType 099 * @param changeType The chnageType we want some notification to be set 100 */ 101 void enableNotification( ChangeType changeType ); 102 103 104 /** 105 * Unsets the notification for a given changeType 106 * @param changeType The chnageType we want some notification to be unset 107 */ 108 void disableNotification( ChangeType changeType ); 109}