| | |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.plugins; |
| | | import org.opends.messages.Message; |
| | | |
| | | |
| | | import java.util.LinkedHashSet; |
| | |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.PluginMessages.*; |
| | | import static org.opends.messages.PluginMessages.*; |
| | | |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | // The set of plugin types must contain only the pre-parse search element. |
| | | if (pluginTypes.isEmpty()) |
| | | { |
| | | int msgID = MSGID_PLUGIN_ADLIST_NO_PLUGIN_TYPES; |
| | | String message = getMessage(msgID, String.valueOf(configuration.dn())); |
| | | throw new ConfigException(msgID, message); |
| | | Message message = ERR_PLUGIN_ADLIST_NO_PLUGIN_TYPES.get( |
| | | String.valueOf(configuration.dn())); |
| | | throw new ConfigException(message); |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | if (t != PluginType.PRE_PARSE_SEARCH) |
| | | { |
| | | int msgID = MSGID_PLUGIN_ADLIST_INVALID_PLUGIN_TYPE; |
| | | String message = getMessage(msgID, |
| | | String.valueOf(configuration.dn()), |
| | | String.valueOf(t)); |
| | | throw new ConfigException(msgID, message); |
| | | Message message = ERR_PLUGIN_ADLIST_INVALID_PLUGIN_TYPE.get( |
| | | String.valueOf(configuration.dn()), String.valueOf(t)); |
| | | throw new ConfigException(message); |
| | | } |
| | | } |
| | | } |
| | |
| | | */ |
| | | @Override() |
| | | public boolean isConfigurationAcceptable(PluginCfg configuration, |
| | | List<String> unacceptableReasons) |
| | | List<Message> unacceptableReasons) |
| | | { |
| | | return isConfigurationChangeAcceptable(configuration, unacceptableReasons); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean isConfigurationChangeAcceptable(PluginCfg configuration, |
| | | List<String> unacceptableReasons) |
| | | List<Message> unacceptableReasons) |
| | | { |
| | | boolean configAcceptable = true; |
| | | |
| | |
| | | |
| | | |
| | | default: |
| | | int msgID = MSGID_PLUGIN_ADLIST_INVALID_PLUGIN_TYPE; |
| | | String message = getMessage(msgID, |
| | | String.valueOf(configuration.dn()), |
| | | String.valueOf(pluginType)); |
| | | Message message = ERR_PLUGIN_ADLIST_INVALID_PLUGIN_TYPE.get( |
| | | String.valueOf(configuration.dn()), |
| | | String.valueOf(pluginType)); |
| | | unacceptableReasons.add(message); |
| | | configAcceptable = false; |
| | | } |