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 2009 Sun Microsystems, Inc. 015 * Portions Copyright 2014-2016 ForgeRock AS. 016 */ 017package org.opends.server.api.plugin; 018 019import java.util.List; 020import java.util.Set; 021 022import org.forgerock.i18n.LocalizableMessage; 023import org.opends.server.admin.std.server.PluginCfg; 024import org.forgerock.opendj.config.server.ConfigException; 025import org.forgerock.opendj.ldap.DN; 026import org.opends.server.types.InitializationException; 027 028/** 029 * An internal directory server plugin which can be registered with 030 * the server without requiring any associated configuration. 031 */ 032public abstract class InternalDirectoryServerPlugin extends 033 DirectoryServerPlugin<PluginCfg> 034{ 035 036 /** 037 * Creates a new internal directory server plugin using the provided 038 * component name and plugin types. 039 * 040 * @param componentDN 041 * The configuration entry name of the component associated 042 * with this internal plugin. 043 * @param pluginTypes 044 * The set of plugin types for which this internal plugin 045 * is registered. 046 * @param invokeForInternalOps 047 * Indicates whether this internal plugin should be invoked 048 * for internal operations. 049 */ 050 protected InternalDirectoryServerPlugin(DN componentDN, 051 Set<PluginType> pluginTypes, boolean invokeForInternalOps) 052 { 053 initializeInternal(componentDN, pluginTypes, 054 invokeForInternalOps); 055 } 056 057 058 059 /** {@inheritDoc} */ 060 public final void initializePlugin(Set<PluginType> pluginTypes, 061 PluginCfg configuration) throws ConfigException, 062 InitializationException 063 { 064 // Unused. 065 } 066 067 068 069 /** {@inheritDoc} */ 070 public final boolean isConfigurationAcceptable( 071 PluginCfg configuration, List<LocalizableMessage> unacceptableReasons) 072 { 073 // Unused. 074 return true; 075 } 076 077}