| | |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCought; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.Error.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.PluginMessages.*; |
| | |
| | | public final class PasswordPolicyImportPlugin |
| | | extends DirectoryServerPlugin |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.plugins.PasswordPolicyImportPlugin"; |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | super(); |
| | | |
| | | assert debugConstructor(CLASS_NAME); |
| | | |
| | | |
| | | // Get the password policies from the Directory Server configuration. This |
| | |
| | | ConfigEntry configEntry) |
| | | throws ConfigException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializePlugin", |
| | | String.valueOf(pluginTypes), |
| | | String.valueOf(configEntry)); |
| | | |
| | | |
| | | // Make sure that the plugin has been enabled for the appropriate types. |
| | |
| | | public final LDIFPluginResult doLDIFImport(LDIFImportConfig importConfig, |
| | | Entry entry) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doLDIFImport", |
| | | String.valueOf(importConfig), String.valueOf(entry)); |
| | | |
| | | |
| | | // Create a list that we will use to hold new encoded values. |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "doLDIFImport", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_PWPIMPORT_ERROR_ENCODING_PASSWORD; |
| | | String message = getMessage(msgID, t.getNameOrOID(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "doLDIFImport", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_PWPIMPORT_ERROR_ENCODING_PASSWORD; |
| | | String message = getMessage(msgID, t.getNameOrOID(), |