| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.plugins; |
| | | |
| | |
| | | import org.opends.server.types.operation.PreOperationModifyDNOperation; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | 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.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.PluginMessages.*; |
| | | import static org.opends.server.util.TimeThread.*; |
| | |
| | | public final class LastModPlugin |
| | | extends DirectoryServerPlugin |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.plugins.LastModPlugin"; |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | super(); |
| | | |
| | | assert debugConstructor(CLASS_NAME); |
| | | |
| | | |
| | | // Get the attribute types for the attributes that we will use. This needs |
| | |
| | | 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 PreOperationPluginResult |
| | | doPreOperation(PreOperationAddOperation addOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreOperation", |
| | | String.valueOf(addOperation)); |
| | | |
| | | |
| | | // Create the attribute list for the creatorsName attribute, if appropriate. |
| | |
| | | public final PreOperationPluginResult |
| | | doPreOperation(PreOperationModifyOperation modifyOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreOperation", |
| | | String.valueOf(modifyOperation)); |
| | | |
| | | |
| | | // Create the modifiersName attribute. |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | assert debugException(CLASS_NAME, "doPreOperation", de); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | // This should never happen. |
| | | modifyOperation.setResultCode(DirectoryConfig.getServerErrorResultCode()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | assert debugException(CLASS_NAME, "doPreOperation", de); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | // This should never happen. |
| | | modifyOperation.setResultCode(DirectoryConfig.getServerErrorResultCode()); |
| | |
| | | public final PreOperationPluginResult |
| | | doPreOperation(PreOperationModifyDNOperation modifyDNOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreOperation", |
| | | String.valueOf(modifyDNOperation)); |
| | | |
| | | |
| | | // Create the modifiersName attribute. |