001/* 002 * The contents of this file are subject to the terms of the Common Development and 003 * Distribution License (the License). You may not use this file except in compliance with the 004 * License. 005 * 006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the 007 * specific language governing permission and limitations under the License. 008 * 009 * When distributing Covered Software, include this CDDL Header Notice in each file and include 010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL 011 * Header, with the fields enclosed by brackets [] replaced by your own identifying 012 * information: "Portions Copyright [year] [name of copyright owner]". 013 * 014 * Copyright 2006-2008 Sun Microsystems, Inc. 015 * Portions Copyright 2015-2016 ForgeRock AS. 016 */ 017package org.opends.server.api; 018 019import org.opends.server.types.LDIFImportConfig; 020 021/** 022 * This interface defines a set of methods that may be used to notify 023 * various Directory Server components whenever an LDIF import task is 024 * about to begin or has just completed. Note that these methods will 025 * only be invoked for the LDIF import task and not for offline LDIF 026 * import processing. 027 */ 028@org.opends.server.types.PublicAPI( 029 stability=org.opends.server.types.StabilityLevel.VOLATILE, 030 mayInstantiate=false, 031 mayExtend=true, 032 mayInvoke=false) 033public interface ImportTaskListener 034{ 035 /** 036 * Performs any processing that might be necessary just before the 037 * server begins processing on an LDIF import task. This should 038 * include pausing interaction with the provided backend while the 039 * import is in progress. 040 * 041 * @param backend The backend to be imported. 042 * @param config Configuration information about the LDIF import 043 * to be performed. 044 */ 045 void processImportBegin(Backend<?> backend, LDIFImportConfig config); 046 047 /** 048 * Performs any processing that might be necessary after the server 049 * has completed processing on an LDIF import task. Note that this 050 * will always be called when import processing completes, 051 * regardless of whether it was successful. 052 * 053 * @param backend The backend that was imported. 054 * @param config Configuration information about the LDIF 055 * import that was performed. 056 * @param successful Indicates whether the import operation 057 * completed successfully. 058 */ 059 void processImportEnd(Backend<?> backend, LDIFImportConfig config, boolean successful); 060}