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 ForgeRock AS. 016 */ 017package org.opends.server.api; 018 019 020 021import org.opends.server.types.LDIFImportConfig; 022 023 024 025/** 026 * This interface defines a set of methods that may be used to notify 027 * various Directory Server components whenever an LDIF import task is 028 * about to begin or has just completed. Note that these methods will 029 * only be invoked for the LDIF import task and not for offline LDIF 030 * import processing. 031 */ 032@org.opends.server.types.PublicAPI( 033 stability=org.opends.server.types.StabilityLevel.VOLATILE, 034 mayInstantiate=false, 035 mayExtend=true, 036 mayInvoke=false) 037public interface ImportTaskListener 038{ 039 /** 040 * Performs any processing that might be necessary just before the 041 * server begins processing on an LDIF import task. This should 042 * include pausing interaction with the provided backend while the 043 * import is in progress. 044 * 045 * @param backend The backend to be imported. 046 * @param config Configuration information about the LDIF import 047 * to be performed. 048 */ 049 void processImportBegin(Backend backend, 050 LDIFImportConfig config); 051 052 053 054 /** 055 * Performs any processing that might be necessary after the server 056 * has completed processing on an LDIF import task. Note that this 057 * will always be called when import processing completes, 058 * regardless of whether it was successful. 059 * 060 * @param backend The backend that was imported. 061 * @param config Configuration information about the LDIF 062 * import that was performed. 063 * @param successful Indicates whether the import operation 064 * completed successfully. 065 */ 066 void processImportEnd(Backend backend, 067 LDIFImportConfig config, 068 boolean successful); 069} 070