| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | /** |
| | | * This class defines an interface for managing the life-cycle of an |
| | |
| | | import org.opends.server.core.CompareOperation; |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.ExtendedOperation; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.core.UnbindOperation; |
| | | import org.opends.server.types.DisconnectReason; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.SearchResultEntry; |
| | | import org.opends.server.types.SearchResultReference; |
| | | |
| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.AccountStatusNotification; |
| | | import org.opends.server.types.AccountStatusNotificationType; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.DirectoryException; |
| | | |
| | | /** |
| | | * A factory interface for decoding attribute values into objects. |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.CancelledOperationException; |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.LockManager; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.types.BackupConfig; |
| | | import org.opends.server.types.BackupDirectory; |
| | | import org.opends.server.types.CancelledOperationException; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LDIFExportConfig; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.RestoreConfig; |
| | | import org.opends.server.types.WritabilityMode; |
| | | |
| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | |
| | | import java.util.concurrent.CopyOnWriteArrayList; |
| | | |
| | | import org.opends.server.api.plugin.IntermediateResponsePluginResult; |
| | | import org.opends.server.core.CancelRequest; |
| | | import org.opends.server.core.CancelResult; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.Operation; |
| | | import org.opends.server.core.PersistentSearch; |
| | | import org.opends.server.core.PluginConfigManager; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.types.AuthenticationInfo; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.DisconnectReason; |
| | | import org.opends.server.types.IntermediateResponse; |
| | | import org.opends.server.types.SearchResultEntry; |
| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | |
| | | |
| | |
| | | import java.util.Collection; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | |
| | | import java.nio.channels.SocketChannel; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | |
| | | |
| | |
| | | import java.nio.ByteBuffer; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.DebugLogCategory; |
| | | import org.opends.server.types.DebugLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LockType; |
| | | |
| | | |
| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | |
| | | |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.ExtendedOperation; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | |
| | | |
| | | |
| | | import org.opends.server.config.ConfigAttribute; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.InvokableMethod; |
| | | |
| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.ConditionResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.Operation; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.BindOperation; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.ConditionResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.SynchronizationProviderResult; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.SearchResultEntry; |
| | | |
| | | |
| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.Operation; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | |
| | | |
| | |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.AbandonOperation; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.BindOperation; |
| | | import org.opends.server.core.CompareOperation; |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ExtendedOperation; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.core.UnbindOperation; |
| | | import org.opends.server.types.DisconnectReason; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.IntermediateResponse; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.types.LDIFExportConfig; |
| | | import org.opends.server.types.SearchResultEntry; |
| | | import org.opends.server.types.SearchResultReference; |
| | | import org.opends.server.types.operation.*; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.PluginMessages.*; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * @return The DN of the configuration entry for this plugin. |
| | | */ |
| | | public DN getPluginEntryDN() |
| | | public final DN getPluginEntryDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getPluginEntryDN"); |
| | | |
| | |
| | | * |
| | | * @return The plugin types for which this plugin is registered. |
| | | */ |
| | | public Set<PluginType> getPluginTypes() |
| | | public final Set<PluginType> getPluginTypes() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getPluginTypes"); |
| | | |
| | |
| | | * Performs any processing that should be done when the Directory |
| | | * Server is in the process of starting. This method will be called |
| | | * after virtually all other initialization has been performed but |
| | | * before other plugins have before the connection handlers are |
| | | * started. |
| | | * before the connection handlers are started. |
| | | * |
| | | * @return The result of the startup plugin processing. |
| | | */ |
| | |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doStartup"); |
| | | |
| | | // No implementation is required by default. |
| | | return new StartupPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.STARTUP.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doShutdown"); |
| | | |
| | | // No implementation is required by default. |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.SHUTDOWN.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | assert debugEnter(CLASS_NAME, "doPostConnect", |
| | | String.valueOf(clientConnection)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PostConnectPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.POST_CONNECT.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | String.valueOf(messageID), |
| | | String.valueOf(message)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PostDisconnectPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String msg = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.POST_DISCONNECT.getName()); |
| | | throw new UnsupportedOperationException(msg); |
| | | } |
| | | |
| | | |
| | |
| | | String.valueOf(importConfig), |
| | | String.valueOf(entry)); |
| | | |
| | | // No implementation is required by default. |
| | | return new LDIFPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.LDIF_IMPORT.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | String.valueOf(exportConfig), |
| | | String.valueOf(entry)); |
| | | |
| | | // No implementation is required by default. |
| | | return new LDIFPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.LDIF_EXPORT.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PreParsePluginResult doPreParse(AbandonOperation |
| | | abandonOperation) |
| | | public PreParsePluginResult |
| | | doPreParse(PreParseAbandonOperation abandonOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreParse", |
| | | String.valueOf(abandonOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PreParsePluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.PRE_PARSE_ABANDON.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PostOperationPluginResult |
| | | doPostOperation(AbandonOperation abandonOperation) |
| | | doPostOperation(PostOperationAbandonOperation abandonOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPostOperation", |
| | | String.valueOf(abandonOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PostOperationPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = |
| | | getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.POST_OPERATION_ABANDON.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PreParsePluginResult doPreParse(AddOperation addOperation) |
| | | public PreParsePluginResult |
| | | doPreParse(PreParseAddOperation addOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreParse", |
| | | String.valueOf(addOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PreParsePluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.PRE_PARSE_ADD.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PreOperationPluginResult doPreOperation(AddOperation |
| | | addOperation) |
| | | public PreOperationPluginResult |
| | | doPreOperation(PreOperationAddOperation addOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreOperation", |
| | | String.valueOf(addOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PreOperationPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.PRE_OPERATION_ADD.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PostOperationPluginResult doPostOperation(AddOperation |
| | | addOperation) |
| | | public PostOperationPluginResult |
| | | doPostOperation(PostOperationAddOperation addOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPostOperation", |
| | | String.valueOf(addOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PostOperationPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.POST_OPERATION_ADD.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PostResponsePluginResult doPostResponse(AddOperation |
| | | addOperation) |
| | | public PostResponsePluginResult |
| | | doPostResponse(PostResponseAddOperation addOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPostResponse", |
| | | String.valueOf(addOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PostResponsePluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.POST_RESPONSE_ADD.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PreParsePluginResult doPreParse(BindOperation bindOperation) |
| | | public PreParsePluginResult |
| | | doPreParse(PreParseBindOperation bindOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreParse", |
| | | String.valueOf(bindOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PreParsePluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.PRE_PARSE_BIND.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PreOperationPluginResult doPreOperation(BindOperation |
| | | bindOperation) |
| | | public PreOperationPluginResult |
| | | doPreOperation(PreOperationBindOperation bindOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreOperation", |
| | | String.valueOf(bindOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PreOperationPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.PRE_OPERATION_BIND.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PostOperationPluginResult doPostOperation(BindOperation |
| | | bindOperation) |
| | | public PostOperationPluginResult |
| | | doPostOperation(PostOperationBindOperation bindOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPostOperation", |
| | | String.valueOf(bindOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PostOperationPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.POST_OPERATION_BIND.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PostResponsePluginResult doPostResponse(BindOperation |
| | | bindOperation) |
| | | public PostResponsePluginResult |
| | | doPostResponse(PostResponseBindOperation bindOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPostResponse", |
| | | String.valueOf(bindOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PostResponsePluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.POST_RESPONSE_BIND.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PreParsePluginResult doPreParse(CompareOperation |
| | | compareOperation) |
| | | public PreParsePluginResult |
| | | doPreParse(PreParseCompareOperation compareOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreParse", |
| | | String.valueOf(compareOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PreParsePluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.PRE_PARSE_COMPARE.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PreOperationPluginResult |
| | | doPreOperation(CompareOperation compareOperation) |
| | | doPreOperation(PreOperationCompareOperation compareOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreOperation", |
| | | String.valueOf(compareOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PreOperationPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.PRE_OPERATION_COMPARE.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PostOperationPluginResult |
| | | doPostOperation(CompareOperation compareOperation) |
| | | doPostOperation(PostOperationCompareOperation compareOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPostOperation", |
| | | String.valueOf(compareOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PostOperationPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = |
| | | getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.POST_OPERATION_COMPARE.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PostResponsePluginResult |
| | | doPostResponse(CompareOperation compareOperation) |
| | | doPostResponse(PostResponseCompareOperation compareOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPostResponse", |
| | | String.valueOf(compareOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PostResponsePluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.POST_RESPONSE_COMPARE.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PreParsePluginResult doPreParse(DeleteOperation |
| | | deleteOperation) |
| | | public PreParsePluginResult |
| | | doPreParse(PreParseDeleteOperation deleteOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreParse", |
| | | String.valueOf(deleteOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PreParsePluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.PRE_PARSE_DELETE.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PreOperationPluginResult doPreOperation(DeleteOperation |
| | | deleteOperation) |
| | | public PreOperationPluginResult |
| | | doPreOperation(PreOperationDeleteOperation deleteOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreOperation", |
| | | String.valueOf(deleteOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PreOperationPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.PRE_OPERATION_DELETE.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PostOperationPluginResult |
| | | doPostOperation(DeleteOperation deleteOperation) |
| | | doPostOperation(PostOperationDeleteOperation deleteOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPostOperation", |
| | | String.valueOf(deleteOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PostOperationPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.POST_OPERATION_DELETE.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PostResponsePluginResult doPostResponse(DeleteOperation |
| | | deleteOperation) |
| | | public PostResponsePluginResult |
| | | doPostResponse(PostResponseDeleteOperation deleteOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPostResponse", |
| | | String.valueOf(deleteOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PostResponsePluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.POST_RESPONSE_DELETE.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PreParsePluginResult doPreParse(ExtendedOperation |
| | | extendedOperation) |
| | | public PreParsePluginResult |
| | | doPreParse(PreParseExtendedOperation extendedOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreParse", |
| | | String.valueOf(extendedOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PreParsePluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.PRE_PARSE_EXTENDED.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PreOperationPluginResult |
| | | doPreOperation(ExtendedOperation extendedOperation) |
| | | doPreOperation(PreOperationExtendedOperation extendedOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreOperation", |
| | | String.valueOf(extendedOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PreOperationPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = |
| | | getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.PRE_OPERATION_EXTENDED.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PostOperationPluginResult |
| | | doPostOperation(ExtendedOperation extendedOperation) |
| | | doPostOperation(PostOperationExtendedOperation |
| | | extendedOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPostOperation", |
| | | String.valueOf(extendedOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PostOperationPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = |
| | | getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.POST_OPERATION_EXTENDED.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PostResponsePluginResult |
| | | doPostResponse(ExtendedOperation extendedOperation) |
| | | doPostResponse(PostResponseExtendedOperation extendedOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPostResponse", |
| | | String.valueOf(extendedOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PostResponsePluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = |
| | | getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.POST_RESPONSE_EXTENDED.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PreParsePluginResult doPreParse(ModifyOperation |
| | | modifyOperation) |
| | | public PreParsePluginResult |
| | | doPreParse(PreParseModifyOperation modifyOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreParse", |
| | | String.valueOf(modifyOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PreParsePluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.PRE_PARSE_MODIFY.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PreOperationPluginResult doPreOperation(ModifyOperation |
| | | modifyOperation) |
| | | public PreOperationPluginResult |
| | | doPreOperation(PreOperationModifyOperation modifyOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreOperation", |
| | | String.valueOf(modifyOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PreOperationPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.PRE_OPERATION_MODIFY.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PostOperationPluginResult |
| | | doPostOperation(ModifyOperation modifyOperation) |
| | | doPostOperation(PostOperationModifyOperation modifyOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPostOperation", |
| | | String.valueOf(modifyOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PostOperationPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.POST_OPERATION_MODIFY.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PostResponsePluginResult doPostResponse(ModifyOperation |
| | | modifyOperation) |
| | | public PostResponsePluginResult |
| | | doPostResponse(PostResponseModifyOperation modifyOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPostResponse", |
| | | String.valueOf(modifyOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PostResponsePluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.POST_RESPONSE_MODIFY.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PreParsePluginResult doPreParse(ModifyDNOperation |
| | | modifyDNOperation) |
| | | public PreParsePluginResult |
| | | doPreParse(PreParseModifyDNOperation modifyDNOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreParse", |
| | | String.valueOf(modifyDNOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PreParsePluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.PRE_PARSE_MODIFY_DN.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PreOperationPluginResult |
| | | doPreOperation(ModifyDNOperation modifyDNOperation) |
| | | doPreOperation(PreOperationModifyDNOperation modifyDNOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreOperation", |
| | | String.valueOf(modifyDNOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PreOperationPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = |
| | | getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.PRE_OPERATION_MODIFY_DN.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PostOperationPluginResult |
| | | doPostOperation(ModifyDNOperation modifyDNOperation) |
| | | doPostOperation(PostOperationModifyDNOperation |
| | | modifyDNOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPostOperation", |
| | | String.valueOf(modifyDNOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PostOperationPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = |
| | | getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.POST_OPERATION_MODIFY_DN.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PostResponsePluginResult |
| | | doPostResponse(ModifyDNOperation modifyDNOperation) |
| | | doPostResponse(PostResponseModifyDNOperation modifyDNOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPostResponse", |
| | | String.valueOf(modifyDNOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PostResponsePluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = |
| | | getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.POST_RESPONSE_MODIFY_DN.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PreParsePluginResult doPreParse(SearchOperation |
| | | searchOperation) |
| | | public PreParsePluginResult |
| | | doPreParse(PreParseSearchOperation searchOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreParse", |
| | | String.valueOf(searchOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PreParsePluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.PRE_PARSE_SEARCH.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PreOperationPluginResult doPreOperation(SearchOperation |
| | | searchOperation) |
| | | public PreOperationPluginResult |
| | | doPreOperation(PreOperationSearchOperation searchOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreOperation", |
| | | String.valueOf(searchOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PreOperationPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.PRE_OPERATION_SEARCH.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public SearchEntryPluginResult processSearchEntry( |
| | | SearchOperation searchOperation, |
| | | SearchResultEntry searchEntry) |
| | | public SearchEntryPluginResult |
| | | processSearchEntry(SearchEntrySearchOperation searchOperation, |
| | | SearchResultEntry searchEntry) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "processSearchEntry", |
| | | String.valueOf(searchOperation), |
| | | String.valueOf(searchEntry)); |
| | | |
| | | // No implementation is required by default. |
| | | return new SearchEntryPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.SEARCH_RESULT_ENTRY.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public SearchReferencePluginResult |
| | | processSearchReference(SearchOperation searchOperation, |
| | | SearchResultReference searchReference) |
| | | processSearchReference(SearchReferenceSearchOperation |
| | | searchOperation, |
| | | SearchResultReference searchReference) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "processSearchReference", |
| | | String.valueOf(searchOperation), |
| | | String.valueOf(searchReference)); |
| | | |
| | | // No implementation is required by default. |
| | | return new SearchReferencePluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = |
| | | getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.SEARCH_RESULT_REFERENCE.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PostOperationPluginResult |
| | | doPostOperation(SearchOperation searchOperation) |
| | | doPostOperation(PostOperationSearchOperation searchOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPostOperation", |
| | | String.valueOf(searchOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PostOperationPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.POST_OPERATION_SEARCH.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PostResponsePluginResult doPostResponse(SearchOperation |
| | | searchOperation) |
| | | public PostResponsePluginResult |
| | | doPostResponse(PostResponseSearchOperation searchOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPostResponse", |
| | | String.valueOf(searchOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PostResponsePluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.POST_RESPONSE_SEARCH.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PreParsePluginResult doPreParse(UnbindOperation |
| | | unbindOperation) |
| | | public PreParsePluginResult |
| | | doPreParse(PreParseUnbindOperation unbindOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreParse", |
| | | String.valueOf(unbindOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PreParsePluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.PRE_PARSE_UNBIND.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | * @return Information about the result of the plugin processing. |
| | | */ |
| | | public PostOperationPluginResult |
| | | doPostOperation(UnbindOperation unbindOperation) |
| | | doPostOperation(PostOperationUnbindOperation unbindOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPostOperation", |
| | | String.valueOf(unbindOperation)); |
| | | |
| | | // No implementation is required by default. |
| | | return new PostOperationPluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.POST_OPERATION_UNBIND.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | |
| | | |
| | |
| | | assert debugEnter(CLASS_NAME, "processIntermediateResponse", |
| | | String.valueOf(intermediateResponse)); |
| | | |
| | | // No implementation is required by default. |
| | | return new IntermediateResponsePluginResult(); |
| | | int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED; |
| | | String message = getMessage(msgID, String.valueOf(pluginDN), |
| | | PluginType.INTERMEDIATE_RESPONSE.getName()); |
| | | throw new UnsupportedOperationException(message); |
| | | } |
| | | } |
| | | |
| | |
| | | import org.opends.server.api.AccessControlProvider; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | /** |
| | | * This class implements an access control handler for the Directory |
| | |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.SearchOperation; |
| | |
| | | import org.opends.server.types.BackupDirectory; |
| | | import org.opends.server.types.BackupInfo; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.types.LDIFExportConfig; |
| | | import org.opends.server.types.ObjectClass; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | |
| | | import org.opends.server.types.BackupConfig; |
| | | import org.opends.server.types.BackupDirectory; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.LDIFExportConfig; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.SearchOperation; |
| | |
| | | import org.opends.server.types.BackupConfig; |
| | | import org.opends.server.types.BackupDirectory; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LDIFExportConfig; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.types.ObjectClass; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.config.DNConfigAttribute; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.CancelledOperationException; |
| | | import org.opends.server.core.CancelRequest; |
| | | import org.opends.server.core.CancelResult; |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.SearchOperation; |
| | |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.BackupConfig; |
| | | import org.opends.server.types.BackupDirectory; |
| | | import org.opends.server.types.CancelledOperationException; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LDIFExportConfig; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.types.ObjectClass; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.config.DNConfigAttribute; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.CryptoManager; |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.SearchOperation; |
| | |
| | | import org.opends.server.types.BackupDirectory; |
| | | import org.opends.server.types.BackupInfo; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.CryptoManager; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.types.LDIFExportConfig; |
| | | import org.opends.server.types.ObjectClass; |
| | |
| | | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.Modification; |
| | | import org.opends.server.types.SearchFilter; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.config.DNConfigAttribute; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.CancelledOperationException; |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.types.BackupConfig; |
| | | import org.opends.server.types.BackupDirectory; |
| | | import org.opends.server.types.CancelledOperationException; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DebugLogCategory; |
| | | import org.opends.server.types.DebugLogSeverity; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.types.LDIFExportConfig; |
| | | import org.opends.server.types.RestoreConfig; |
| | |
| | | * @param modifyDNOperation The modify DN operation with which this action is |
| | | * associated. This may be <CODE>null</CODE> for |
| | | * modify DN operations performed internally. |
| | | * @throws org.opends.server.core.DirectoryException |
| | | * @throws org.opends.server.types.DirectoryException |
| | | * If a problem occurs while trying to perform the rename. |
| | | * @throws org.opends.server.core.CancelledOperationException |
| | | * @throws org.opends.server.types.CancelledOperationException |
| | | * If this backend noticed and reacted to a request to cancel or |
| | | * abandon the modify DN operation. |
| | | */ |
| | |
| | | * <CODE>SearchOperation.returnEntry</CODE> method. |
| | | * |
| | | * @param searchOperation The search operation to be processed. |
| | | * @throws org.opends.server.core.DirectoryException |
| | | * @throws org.opends.server.types.DirectoryException |
| | | * If a problem occurs while processing the search. |
| | | */ |
| | | public void search(SearchOperation searchOperation) |
| | |
| | | * @param configEntry The configuration entry for this backend. |
| | | * @param baseDNs The set of base DNs configured for this backend. |
| | | * @param exportConfig The configuration to use when performing the export. |
| | | * @throws org.opends.server.core.DirectoryException |
| | | * @throws org.opends.server.types.DirectoryException |
| | | * If a problem occurs while performing the LDIF export. |
| | | */ |
| | | public void exportLDIF(ConfigEntry configEntry, DN[] baseDNs, |
| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.CryptoManager; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.util.DynamicConstants; |
| | | import org.opends.server.types.BackupConfig; |
| | | import org.opends.server.types.BackupDirectory; |
| | | import org.opends.server.types.BackupInfo; |
| | | import org.opends.server.types.CryptoManager; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.RestoreConfig; |
| | |
| | | import org.opends.server.config.IntegerWithUnitConfigAttribute; |
| | | import org.opends.server.config.MultiChoiceConfigAttribute; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | |
| | | import com.sleepycat.je.OperationStatus; |
| | | import com.sleepycat.je.Transaction; |
| | | |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.LDAPURL; |
| | |
| | | import org.opends.server.api.Backend; |
| | | import org.opends.server.api.EntryCache; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.CancelledOperationException; |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.CancelledOperationException; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.LockType; |
| | |
| | | * <CODE>SearchOperation.returnEntry</CODE> method. |
| | | * |
| | | * @param searchOperation The search operation to be processed. |
| | | * @throws org.opends.server.core.DirectoryException |
| | | * @throws org.opends.server.types.DirectoryException |
| | | * If a problem occurs while processing the |
| | | * search. |
| | | * @throws DatabaseException If an error occurs in the JE database. |
| | |
| | | * @param modifyDNOperation The modify DN operation with which this action |
| | | * is associated. This may be <CODE>null</CODE> |
| | | * for modify DN operations performed internally. |
| | | * @throws org.opends.server.core.DirectoryException |
| | | * @throws org.opends.server.types.DirectoryException |
| | | * If a problem occurs while trying to perform |
| | | * the rename. |
| | | * @throws org.opends.server.core.CancelledOperationException |
| | | * @throws org.opends.server.types.CancelledOperationException |
| | | * If this backend noticed and reacted |
| | | * to a request to cancel or abandon the |
| | | * modify DN operation. |
| | |
| | | import com.sleepycat.je.Transaction; |
| | | import com.sleepycat.je.DatabaseException; |
| | | |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.Modification; |
| | | |
| | |
| | | import com.sleepycat.je.Transaction; |
| | | |
| | | import org.opends.server.api.Backend; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.loggers.Debug; |
| | | import org.opends.server.messages.JebMessages; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.DebugLogCategory; |
| | | import org.opends.server.types.DebugLogSeverity; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | |
| | | import com.sleepycat.je.OperationStatus; |
| | | import com.sleepycat.je.Transaction; |
| | | |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ConditionResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.Modification; |
| | | |
| | |
| | | |
| | | import static org.opends.server.loggers.Debug.debugEnter; |
| | | |
| | | import org.opends.server.core.CryptoManager; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.protocols.asn1.ASN1Element; |
| | | import org.opends.server.protocols.asn1.ASN1Exception; |
| | |
| | | import org.opends.server.protocols.ldap.LDAPException; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.CryptoManager; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ObjectClass; |
| | |
| | | import static org.opends.server.loggers.Debug.debugException; |
| | | |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.Modification; |
| | | |
| | |
| | | |
| | | import static org.opends.server.loggers.Debug.debugException; |
| | | import com.sleepycat.je.Transaction; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.Modification; |
| | | |
| | |
| | | |
| | | import org.opends.server.api.Backend; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.Debug; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | |
| | | import org.opends.server.types.ConditionResult; |
| | | import org.opends.server.types.DebugLogCategory; |
| | | import org.opends.server.types.DebugLogSeverity; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | |
| | | import java.util.LinkedHashSet; |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import java.util.TimeZone; |
| | | import java.util.UUID; |
| | | |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.util.TimeThread; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.config.IntegerWithUnitConfigAttribute; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.CancelledOperationException; |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.SearchOperation; |
| | |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.BackupConfig; |
| | | import org.opends.server.types.BackupDirectory; |
| | | import org.opends.server.types.CancelledOperationException; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LDIFExportConfig; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.types.RestoreConfig; |
| | |
| | | |
| | | import org.opends.server.api.AlertGenerator; |
| | | import org.opends.server.api.DirectoryThread; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.ExistingFileBehavior; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.types.LDIFExportConfig; |
| | | import org.opends.server.types.ResultCode; |
| | |
| | | import java.io.File; |
| | | import java.io.UnsupportedEncodingException; |
| | | |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.synchronization.ChangeNumber; |
| | | import org.opends.server.synchronization.UpdateMessage; |
| | | |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.util.TimeThread; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.synchronization.ChangeNumber; |
| | | import org.opends.server.synchronization.UpdateMessage; |
| | | |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.synchronization.AckMessage; |
| | | import org.opends.server.synchronization.ChangeNumber; |
| | | import org.opends.server.synchronization.ChangelogStartMessage; |
| | |
| | | import org.opends.server.api.ConfigHandler; |
| | | import org.opends.server.api.ConfigurableComponent; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.CryptoManager; |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.SearchOperation; |
| | |
| | | import org.opends.server.types.BackupDirectory; |
| | | import org.opends.server.types.BackupInfo; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.CryptoManager; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.ExistingFileBehavior; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.types.LDIFExportConfig; |
| | | import org.opends.server.types.ResultCode; |
| | |
| | | import org.opends.server.api.DirectoryServerMBean; |
| | | import org.opends.server.api.InvokableComponent; |
| | | import org.opends.server.api.MonitorProvider; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.protocols.jmx.Credential; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.concurrent.locks.Lock; |
| | | |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.LockManager; |
| | | import org.opends.server.core.PasswordPolicyState; |
| | | import org.opends.server.protocols.asn1.ASN1Element; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | |
| | | import org.opends.server.protocols.ldap.LDAPException; |
| | | import org.opends.server.protocols.ldap.LDAPResultCode; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import java.util.concurrent.locks.Lock; |
| | | |
| | | import org.opends.server.api.IdentityMapper; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.LockManager; |
| | | import org.opends.server.core.PasswordPolicyState; |
| | | import org.opends.server.protocols.asn1.ASN1Exception; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.protocols.ldap.LDAPException; |
| | | import org.opends.server.protocols.ldap.LDAPResultCode; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.api.plugin.PreParsePluginResult; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.OperationType; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.operation.PostOperationAbandonOperation; |
| | | import org.opends.server.types.operation.PreParseAbandonOperation; |
| | | |
| | | import static org.opends.server.core.CoreConstants.*; |
| | | import static org.opends.server.loggers.Access.*; |
| | |
| | | */ |
| | | public class AbandonOperation |
| | | extends Operation |
| | | implements PreParseAbandonOperation, PostOperationAbandonOperation |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | |
| | | |
| | | |
| | | // The message ID of the operation that should be abandoned. |
| | | private int idToAbandon; |
| | | private final int idToAbandon; |
| | | |
| | | // The time that processing started on this operation. |
| | | private long processingStartTime; |
| | |
| | | * |
| | | * @return The message ID of the operation that should be abandoned. |
| | | */ |
| | | public int getIDToAbandon() |
| | | public final int getIDToAbandon() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getIDToAbandon"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing started for this operation. |
| | | * |
| | | * @return The time that processing started for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingStartTime() |
| | | @Override() |
| | | public final long getProcessingStartTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingStartTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing stopped for this operation. This will |
| | | * actually hold a time immediately before the result was logged. |
| | | * |
| | | * @return The time that processing stopped for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingStopTime() |
| | | @Override() |
| | | public final long getProcessingStopTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingStopTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the length of time in milliseconds that the server spent |
| | | * processing this operation. This should not be called until after the |
| | | * server has sent the response to the client. |
| | | * |
| | | * @return The length of time in milliseconds that the server spent |
| | | * processing this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingTime() |
| | | @Override() |
| | | public final long getProcessingTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the operation type for this operation. |
| | | * |
| | | * @return The operation type for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public OperationType getOperationType() |
| | | @Override() |
| | | public final OperationType getOperationType() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getOperationType"); |
| | | |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a standard set of elements that should be logged in requests for |
| | | * this type of operation. Each element in the array will itself be a |
| | | * two-element array in which the first element is the name of the field and |
| | | * the second is a string representation of the value, or <CODE>null</CODE> if |
| | | * there is no value for that field. |
| | | * |
| | | * @return A standard set of elements that should be logged in requests for |
| | | * this type of operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public String[][] getRequestLogElements() |
| | | @Override() |
| | | public final String[][] getRequestLogElements() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRequestLogElements"); |
| | | |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a standard set of elements that should be logged in responses for |
| | | * this type of operation. Each element in the array will itself be a |
| | | * two-element array in which the first element is the name of the field and |
| | | * the second is a string representation of the value, or <CODE>null</CODE> if |
| | | * there is no value for that field. |
| | | * |
| | | * @return A standard set of elements that should be logged in responses for |
| | | * this type of operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public String[][] getResponseLogElements() |
| | | @Override() |
| | | public final String[][] getResponseLogElements() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of controls to include in the response to the client. |
| | | * Note that the contents of this list should not be altered after |
| | | * post-operation plugins have been called. Note that abandon operations |
| | | * must never have an associated response, so this method will not be used for |
| | | * this type of operation. |
| | | * |
| | | * @return The set of controls to include in the response to the client. |
| | | * {@inheritDoc} |
| | | */ |
| | | public List<Control> getResponseControls() |
| | | @Override() |
| | | public final List<Control> getResponseControls() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getResponseControls"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Performs the work of actually processing this operation. This should |
| | | * include all processing for the operation, including invoking plugins, |
| | | * logging messages, performing access control, managing synchronization, and |
| | | * any other work that might need to be done in the course of processing. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void run() |
| | | @Override() |
| | | public final void addResponseControl(Control control) |
| | | { |
| | | // An abandon operation can never have a response, so just ignore this. |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public final void removeResponseControl(Control control) |
| | | { |
| | | // An abandon operation can never have a response, so just ignore this. |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public final void run() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "run"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Attempts to cancel this operation before processing has completed. Note |
| | | * that an abandon operation may not be canceled, so this should never do |
| | | * anything. |
| | | * |
| | | * @param cancelRequest Information about the way in which the operation |
| | | * should be canceled. |
| | | * |
| | | * @return A code providing information on the result of the cancellation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public CancelResult cancel(CancelRequest cancelRequest) |
| | | @Override() |
| | | public final CancelResult cancel(CancelRequest cancelRequest) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "cancel", String.valueOf(cancelRequest)); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the cancel request that has been issued for this operation, if |
| | | * there is one. Note that an abandon operation may not be canceled, so this |
| | | * will always return <CODE>null</CODE>. |
| | | * |
| | | * @return The cancel request that has been issued for this operation, or |
| | | * <CODE>null</CODE> if there has not been any request to cancel. |
| | | * {@inheritDoc} |
| | | */ |
| | | public CancelRequest getCancelRequest() |
| | | @Override() |
| | | public final CancelRequest getCancelRequest() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCancelRequest"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Appends a string representation of this operation to the provided buffer. |
| | | * |
| | | * @param buffer The buffer into which a string representation of this |
| | | * operation should be appended. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void toString(StringBuilder buffer) |
| | | @Override() |
| | | public final void toString(StringBuilder buffer) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder"); |
| | | |
| | |
| | | import java.util.InputMismatchException; |
| | | import java.util.NoSuchElementException; |
| | | |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ResultCode; |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | /** |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.CancelledOperationException; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.ObjectClass; |
| | | import org.opends.server.types.OperationType; |
| | | import org.opends.server.types.RDN; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.SearchFilter; |
| | | import org.opends.server.types.SearchResultEntry; |
| | | import org.opends.server.types.SynchronizationProviderResult; |
| | | import org.opends.server.types.operation.PostOperationAddOperation; |
| | | import org.opends.server.types.operation.PostResponseAddOperation; |
| | | import org.opends.server.types.operation.PreOperationAddOperation; |
| | | import org.opends.server.types.operation.PreParseAddOperation; |
| | | import org.opends.server.util.TimeThread; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | */ |
| | | public class AddOperation |
| | | extends Operation |
| | | implements PreParseAddOperation, PreOperationAddOperation, |
| | | PostOperationAddOperation, PostResponseAddOperation |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | |
| | | * |
| | | * @return The DN of the entry in a raw, unparsed form. |
| | | */ |
| | | public ByteString getRawEntryDN() |
| | | public final ByteString getRawEntryDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRawEntryDN"); |
| | | |
| | |
| | | * |
| | | * @param rawEntryDN The raw entry DN for the entry to add. |
| | | */ |
| | | public void setRawEntryDN(ByteString rawEntryDN) |
| | | public final void setRawEntryDN(ByteString rawEntryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setRawEntryDN", String.valueOf(rawEntryDN)); |
| | | |
| | |
| | | * @return The DN of the entry to add, or <CODE>null</CODE> if it has not yet |
| | | * been parsed from the raw DN. |
| | | */ |
| | | public DN getEntryDN() |
| | | public final DN getEntryDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getEntryDN"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the DN of the entry to add. This method should not be called by |
| | | * pre-parse plugins, in which case the <CODE>setRawEntryDN</CODE> method |
| | | * should be used instead. |
| | | * |
| | | * @param entryDN The DN of the entry to add. |
| | | */ |
| | | public void setEntryDN(DN entryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setEntryDN", String.valueOf(entryDN)); |
| | | |
| | | this.entryDN = entryDN; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of attributes in their raw, unparsed form as read from |
| | | * the client request. Some of these attributes may be invalid as no |
| | | * validation will have been performed on them. The returned list must not be |
| | |
| | | * @return The set of attributes in their raw, unparsed form as read from the |
| | | * client request. |
| | | */ |
| | | public List<LDAPAttribute> getRawAttributes() |
| | | public final List<LDAPAttribute> getRawAttributes() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRawAttributes"); |
| | | |
| | |
| | | * @param rawAttribute The attribute to add to the set of raw attributes for |
| | | * this add operation. |
| | | */ |
| | | public void addRawAttribute(LDAPAttribute rawAttribute) |
| | | public final void addRawAttribute(LDAPAttribute rawAttribute) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "addRawAttribute", |
| | | String.valueOf(rawAttribute)); |
| | |
| | | * |
| | | * @param rawAttributes The set of raw attributes for this add operation. |
| | | */ |
| | | public void setRawAttributes(List<LDAPAttribute> rawAttributes) |
| | | public final void setRawAttributes(List<LDAPAttribute> rawAttributes) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setRawAttributes", |
| | | String.valueOf(rawAttributes)); |
| | |
| | | /** |
| | | * Retrieves the set of processed objectclasses for the entry to add. This |
| | | * should not be called by pre-parse plugins because this information will not |
| | | * yet be available. The contents of the returned map may be altered by the |
| | | * caller. |
| | | * yet be available. The contents of the returned map may not be altered by |
| | | * the caller. |
| | | * |
| | | * @return The set of processed objectclasses for the entry to add, or |
| | | * <CODE>null</CODE> if that information is not yet available. |
| | | */ |
| | | public Map<ObjectClass,String> getObjectClasses() |
| | | public final Map<ObjectClass,String> getObjectClasses() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getObjectClasses"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Adds the provided objectclass to the entry to add. This should only be |
| | | * called from pre-operation plugins. Note that pre-operation plugin |
| | | * processing is invoked after access control and schema validation, so |
| | | * plugins should be careful to only make changes that will not violate either |
| | | * schema or access control rules. |
| | | * |
| | | * @param objectClass The objectclass to add to the entry. |
| | | * @param name The name to use for the objectclass. |
| | | */ |
| | | public final void addObjectClass(ObjectClass objectClass, String name) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "addObjectClass", String.valueOf(objectClass), |
| | | String.valueOf(name)); |
| | | |
| | | objectClasses.put(objectClass, name); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Removes the provided objectclass from the entry to add. This should only |
| | | * be called from pre-operation plugins. Note that pre-operation plugin |
| | | * processing is invoked after access control and schema validation, so |
| | | * plugins should be careful to only make changes that will not violate either |
| | | * schema or access control rules. |
| | | * |
| | | * @param objectClass The objectclass to remove from the entry. |
| | | */ |
| | | public final void removeObjectClass(ObjectClass objectClass) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "removeObjectClass", |
| | | String.valueOf(objectClass)); |
| | | |
| | | objectClasses.remove(objectClass); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of processed user attributes for the entry to add. This |
| | | * should not be called by pre-parse plugins because this information will not |
| | | * yet be available. The contents of the returned map may be altered by the |
| | |
| | | * @return The set of processed user attributes for the entry to add, or |
| | | * <CODE>null</CODE> if that information is not yet available. |
| | | */ |
| | | public Map<AttributeType,List<Attribute>> getUserAttributes() |
| | | public final Map<AttributeType,List<Attribute>> getUserAttributes() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getUserAttributes"); |
| | | |
| | |
| | | * @return The set of processed operational attributes for the entry to add, |
| | | * or <CODE>null</CODE> if that information is not yet available. |
| | | */ |
| | | public Map<AttributeType,List<Attribute>> getOperationalAttributes() |
| | | public final Map<AttributeType,List<Attribute>> getOperationalAttributes() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getOperationalAttributes"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Sets the specified attribute in the entry to add, overwriting any existing |
| | | * attribute of the specified type if necessary. This should only be called |
| | | * from pre-operation plugins. Note that pre-operation plugin processing is |
| | | * invoked after access control and schema validation, so plugins should be |
| | | * careful to only make changes that will not violate either schema or access |
| | | * control rules. |
| | | * |
| | | * @param attributeType The attribute type for the attribute. |
| | | * @param attributeList The attribute list for the provided attribute type. |
| | | */ |
| | | public final void setAttribute(AttributeType attributeType, |
| | | List<Attribute> attributeList) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setAttribute", String.valueOf(attributeType), |
| | | String.valueOf(attributeList)); |
| | | |
| | | if (attributeType.isOperational()) |
| | | { |
| | | if ((attributeList == null) || (attributeList.isEmpty())) |
| | | { |
| | | operationalAttributes.remove(attributeType); |
| | | } |
| | | else |
| | | { |
| | | operationalAttributes.put(attributeType, attributeList); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if ((attributeList == null) || (attributeList.isEmpty())) |
| | | { |
| | | userAttributes.remove(attributeType); |
| | | } |
| | | else |
| | | { |
| | | userAttributes.put(attributeType, attributeList); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Removes the specified attribute from the entry to add. This should only be |
| | | * called from pre-operation plugins. Note that pre-operation processing is |
| | | * invoked after access control and schema validation, so plugins should be |
| | | * careful to only make changes that will not violate either schema or access |
| | | * control rules. |
| | | * |
| | | * @param attributeType The attribute tyep for the attribute to remove. |
| | | */ |
| | | public final void removeAttribute(AttributeType attributeType) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "removeAttribute", |
| | | String.valueOf(attributeType)); |
| | | |
| | | if (attributeType.isOperational()) |
| | | { |
| | | operationalAttributes.remove(attributeType); |
| | | } |
| | | else |
| | | { |
| | | userAttributes.remove(attributeType); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the entry to be added to the server. Note that this will not be |
| | | * available to pre-parse plugins or during the conflict resolution portion of |
| | | * the synchronization processing. |
| | |
| | | * @return The entry to be added to the server, or <CODE>null</CODE> if it is |
| | | * not yet available. |
| | | */ |
| | | public Entry getEntryToAdd() |
| | | public final Entry getEntryToAdd() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getEntryToAdd"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing started for this operation. |
| | | * |
| | | * @return The time that processing started for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingStartTime() |
| | | @Override() |
| | | public final long getProcessingStartTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingStartTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing stopped for this operation. This will |
| | | * actually hold a time immediately before the response was sent to the |
| | | * client. |
| | | * |
| | | * @return The time that processing stopped for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingStopTime() |
| | | @Override() |
| | | public final long getProcessingStopTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingStopTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the length of time in milliseconds that the server spent |
| | | * processing this operation. This should not be called until after the |
| | | * server has sent the response to the client. |
| | | * |
| | | * @return The length of time in milliseconds that the server spent |
| | | * processing this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingTime() |
| | | @Override() |
| | | public final long getProcessingTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingTime"); |
| | | |
| | |
| | | * if none has been assigned yet or if there is no applicable |
| | | * synchronization mechanism in place that uses change numbers. |
| | | */ |
| | | public long getChangeNumber() |
| | | public final long getChangeNumber() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getChangeNumber"); |
| | | |
| | |
| | | * @param changeNumber The change number that has been assigned to this |
| | | * operation by the synchronization mechanism. |
| | | */ |
| | | public void setChangeNumber(long changeNumber) |
| | | public final void setChangeNumber(long changeNumber) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setChangeNumber", |
| | | String.valueOf(changeNumber)); |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the operation type for this operation. |
| | | * |
| | | * @return The operation type for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public OperationType getOperationType() |
| | | @Override() |
| | | public final OperationType getOperationType() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a standard set of elements that should be logged in requests for |
| | | * this type of operation. Each element in the array will itself be a |
| | | * two-element array in which the first element is the name of the field and |
| | | * the second is a string representation of the value, or <CODE>null</CODE> if |
| | | * there is no value for that field. |
| | | * |
| | | * @return A standard set of elements that should be logged in requests for |
| | | * this type of operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public String[][] getRequestLogElements() |
| | | @Override() |
| | | public final String[][] getRequestLogElements() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a standard set of elements that should be logged in responses for |
| | | * this type of operation. Each element in the array will itself be a |
| | | * two-element array in which the first element is the name of the field and |
| | | * the second is a string representation of the value, or <CODE>null</CODE> if |
| | | * there is no value for that field. |
| | | * |
| | | * @return A standard set of elements that should be logged in responses for |
| | | * this type of operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public String[][] getResponseLogElements() |
| | | @Override() |
| | | public final String[][] getResponseLogElements() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of controls to include in the response to the client. |
| | | * Note that the contents of this list should not be altered after |
| | | * post-operation plugins have been called. |
| | | * |
| | | * @return The set of controls to include in the response to the client. |
| | | * {@inheritDoc} |
| | | */ |
| | | public ArrayList<Control> getResponseControls() |
| | | @Override() |
| | | public final ArrayList<Control> getResponseControls() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getResponseControls"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Performs the work of actually processing this operation. This should |
| | | * include all processing for the operation, including invoking plugins, |
| | | * logging messages, performing access control, managing synchronization, and |
| | | * any other work that might need to be done in the course of processing. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void run() |
| | | @Override() |
| | | public final void addResponseControl(Control control) |
| | | { |
| | | responseControls.add(control); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public final void removeResponseControl(Control control) |
| | | { |
| | | responseControls.remove(control); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public final void run() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "run"); |
| | | |
| | |
| | | * |
| | | * @param objectClass The objectclass to add to the entry. |
| | | */ |
| | | private void addObjectClassChain(ObjectClass objectClass) |
| | | private final void addObjectClassChain(ObjectClass objectClass) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "addObjectClassChain", |
| | | String.valueOf(objectClass)); |
| | |
| | | * @throws DirectoryException If a problem occurs while performing password |
| | | * policy processing for the add operation. |
| | | */ |
| | | private void handlePasswordPolicy(PasswordPolicy passwordPolicy, |
| | | Entry userEntry) |
| | | private final void handlePasswordPolicy(PasswordPolicy passwordPolicy, |
| | | Entry userEntry) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "handlePasswordPolicy", |
| | |
| | | |
| | | |
| | | /** |
| | | * Attempts to cancel this operation before processing has completed. |
| | | * |
| | | * @param cancelRequest Information about the way in which the operation |
| | | * should be canceled. |
| | | * |
| | | * @return A code providing information on the result of the cancellation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public CancelResult cancel(CancelRequest cancelRequest) |
| | | @Override() |
| | | public final CancelResult cancel(CancelRequest cancelRequest) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "cancel", String.valueOf(cancelRequest)); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the cancel request that has been issued for this operation, if |
| | | * there is one. |
| | | * |
| | | * @return The cancel request that has been issued for this operation, or |
| | | * <CODE>null</CODE> if there has not been any request to cancel. |
| | | * {@inheritDoc} |
| | | */ |
| | | public CancelRequest getCancelRequest() |
| | | @Override() |
| | | public final CancelRequest getCancelRequest() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCancelRequest"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Appends a string representation of this operation to the provided buffer. |
| | | * |
| | | * @param buffer The buffer into which a string representation of this |
| | | * operation should be appended. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void toString(StringBuilder buffer) |
| | | @Override() |
| | | public final void toString(StringBuilder buffer) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder"); |
| | | |
| | |
| | | buffer.append(rawEntryDN); |
| | | buffer.append(")"); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.SearchFilter; |
| | | import org.opends.server.types.WritabilityMode; |
| | |
| | | import org.opends.server.types.AuthenticationInfo; |
| | | import org.opends.server.types.AuthenticationType; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.OperationType; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.operation.PostOperationBindOperation; |
| | | import org.opends.server.types.operation.PostResponseBindOperation; |
| | | import org.opends.server.types.operation.PreOperationBindOperation; |
| | | import org.opends.server.types.operation.PreParseBindOperation; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.core.CoreConstants.*; |
| | |
| | | */ |
| | | public class BindOperation |
| | | extends Operation |
| | | implements PreParseBindOperation, PreOperationBindOperation, |
| | | PostOperationBindOperation, PostResponseBindOperation |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | |
| | | * |
| | | * @return The authentication type for this bind operation. |
| | | */ |
| | | public AuthenticationType getAuthenticationType() |
| | | public final AuthenticationType getAuthenticationType() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAuthenticationType"); |
| | | |
| | |
| | | * @return The raw, unprocessed bind DN for this bind operation as contained |
| | | * in the client request. |
| | | */ |
| | | public ByteString getRawBindDN() |
| | | public final ByteString getRawBindDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRawBindDN"); |
| | | |
| | |
| | | |
| | | /** |
| | | * Specifies the raw, unprocessed bind DN for this bind operation. This |
| | | * should only be called by pre-parse plugins; all other code that wishes to |
| | | * alter the bind DN should use the <CODE>getBindDN</CODE> and |
| | | * <CODE>setBindDN</CODE> methods. |
| | | * should only be called by pre-parse plugins. |
| | | * |
| | | * @param rawBindDN The raw, unprocessed bind DN for this bind operation. |
| | | */ |
| | | public void setRawBindDN(ByteString rawBindDN) |
| | | public final void setRawBindDN(ByteString rawBindDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setRawBindDN", String.valueOf(rawBindDN)); |
| | | |
| | |
| | | * @return The bind DN for this bind operation, or <CODE>null</CODE> if the |
| | | * raw DN has not yet been processed. |
| | | */ |
| | | public DN getBindDN() |
| | | public final DN getBindDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getBindDN"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the bind DN for this bind operation. This method should not be |
| | | * called by pre-parse plugins, which should use <CODE>setRawBindDN</CODE> |
| | | * instead. |
| | | * |
| | | * @param bindDN The bind DN for this bind operation. |
| | | */ |
| | | public void setBindDN(DN bindDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setBindDN", String.valueOf(bindDN)); |
| | | |
| | | this.bindDN = bindDN; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the simple authentication password for this bind operation. |
| | | * |
| | | * @return The simple authentication password for this bind operation. |
| | | */ |
| | | public ByteString getSimplePassword() |
| | | public final ByteString getSimplePassword() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSimplePassword"); |
| | | |
| | |
| | | * @param simplePassword The simple authentication password for this bind |
| | | * operation. |
| | | */ |
| | | public void setSimplePassword(ByteString simplePassword) |
| | | public final void setSimplePassword(ByteString simplePassword) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setSimplePassword", |
| | | String.valueOf(simplePassword)); |
| | |
| | | * @return The SASL mechanism for this bind operation, or <CODE>null</CODE> |
| | | * if the bind does not use SASL authentication. |
| | | */ |
| | | public String getSASLMechanism() |
| | | public final String getSASLMechanism() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSASLMechanism"); |
| | | |
| | |
| | | * @return The SASL credentials for this bind operation, or <CODE>null</CODE> |
| | | * if there are none or if the bind does not use SASL authentication. |
| | | */ |
| | | public ASN1OctetString getSASLCredentials() |
| | | public final ASN1OctetString getSASLCredentials() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSASLCredentials"); |
| | | |
| | |
| | | * @param saslCredentials The SASL credentials for this bind operation, or |
| | | * <CODE>null</CODE> if there are none. |
| | | */ |
| | | public void setSASLCredentials(String saslMechanism, |
| | | ASN1OctetString saslCredentials) |
| | | public final void setSASLCredentials(String saslMechanism, |
| | | ASN1OctetString saslCredentials) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setSASLCredentials", |
| | | String.valueOf(saslCredentials)); |
| | |
| | | * @return The set of server SASL credentials to include in the bind |
| | | * response, or <CODE>null</CODE> if there are none. |
| | | */ |
| | | public ASN1OctetString getServerSASLCredentials() |
| | | public final ASN1OctetString getServerSASLCredentials() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getServerSASLCredentials"); |
| | | |
| | |
| | | * @param serverSASLCredentials The set of server SASL credentials to |
| | | * include in the bind response. |
| | | */ |
| | | public void setServerSASLCredentials(ASN1OctetString serverSASLCredentials) |
| | | public final void setServerSASLCredentials(ASN1OctetString |
| | | serverSASLCredentials) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setServerSASLCredentials", |
| | | String.valueOf(serverSASLCredentials)); |
| | |
| | | * <CODE>null</CODE> if it was not a SASL authentication or the SASL |
| | | * processing was not able to map the request to a user. |
| | | */ |
| | | public Entry getSASLAuthUserEntry() |
| | | public final Entry getSASLAuthUserEntry() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSASLAuthUserEntry"); |
| | | |
| | |
| | | * @param saslAuthUserEntry The user entry associated with the SASL |
| | | * authentication attempt. |
| | | */ |
| | | public void setSASLAuthUserEntry(Entry saslAuthUserEntry) |
| | | public final void setSASLAuthUserEntry(Entry saslAuthUserEntry) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setSASLAuthUserEntry", |
| | | String.valueOf(saslAuthUserEntry)); |
| | |
| | | * @return A human-readable message providing the reason that the |
| | | * authentication failed, or <CODE>null</CODE> if none is available. |
| | | */ |
| | | public String getAuthFailureReason() |
| | | public final String getAuthFailureReason() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAuthFailureReason"); |
| | | |
| | |
| | | * @return The unique identifier for the authentication failure reason, or |
| | | * zero if none is available. |
| | | */ |
| | | public int getAuthFailureID() |
| | | public final int getAuthFailureID() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAuthFailureID"); |
| | | |
| | |
| | | * @param reason A human-readable message providing the reason that the |
| | | * authentication failed. |
| | | */ |
| | | public void setAuthFailureReason(int id, String reason) |
| | | public final void setAuthFailureReason(int id, String reason) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setAuthFailureReason", |
| | | String.valueOf(id), String.valueOf(reason)); |
| | |
| | | /** |
| | | * Retrieves the user entry DN for this bind operation. It will only be |
| | | * available if the bind processing has proceeded far enough to identify the |
| | | * user attempting to authenticate or if the user DN could not be determined. |
| | | * user attempting to authenticate. |
| | | * |
| | | * @return The user entry DN for this bind operation, or <CODE>null</CODE> if |
| | | * the bind processing has not progressed far enough to identify the |
| | | * user or if the user DN could not be determined. |
| | | */ |
| | | public DN getUserEntryDN() |
| | | public final DN getUserEntryDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getUserEntryDN"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing started for this operation. |
| | | * |
| | | * @return The time that processing started for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingStartTime() |
| | | @Override() |
| | | public final long getProcessingStartTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingStartTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing stopped for this operation. This will |
| | | * actually hold a time immediately before the response was sent to the |
| | | * client. |
| | | * |
| | | * @return The time that processing stopped for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingStopTime() |
| | | @Override() |
| | | public final long getProcessingStopTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingStopTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the length of time in milliseconds that the server spent |
| | | * processing this operation. This should not be called until after the |
| | | * server has sent the response to the client. |
| | | * |
| | | * @return The length of time in milliseconds that the server spent |
| | | * processing this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingTime() |
| | | @Override() |
| | | public final long getProcessingTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the operation type for this operation. |
| | | * |
| | | * @return The operation type for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public OperationType getOperationType() |
| | | @Override() |
| | | public final OperationType getOperationType() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a standard set of elements that should be logged in requests for |
| | | * this type of operation. Each element in the array will itself be a |
| | | * two-element array in which the first element is the name of the field and |
| | | * the second is a string representation of the value, or <CODE>null</CODE> if |
| | | * there is no value for that field. |
| | | * |
| | | * @return A standard set of elements that should be logged in requests for |
| | | * this type of operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public String[][] getRequestLogElements() |
| | | @Override() |
| | | public final String[][] getRequestLogElements() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a standard set of elements that should be logged in responses for |
| | | * this type of operation. Each element in the array will itself be a |
| | | * two-element array in which the first element is the name of the field and |
| | | * the second is a string representation of the value, or <CODE>null</CODE> if |
| | | * there is no value for that field. |
| | | * |
| | | * @return A standard set of elements that should be logged in responses for |
| | | * this type of operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public String[][] getResponseLogElements() |
| | | @Override() |
| | | public final String[][] getResponseLogElements() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of controls to include in the response to the client. |
| | | * Note that the contents of this list should not be altered after |
| | | * post-operation plugins have been called. |
| | | * |
| | | * @return The set of controls to include in the response to the client. |
| | | * {@inheritDoc} |
| | | */ |
| | | public List<Control> getResponseControls() |
| | | @Override() |
| | | public final List<Control> getResponseControls() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getResponseControls"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Adds the provided control to the set of controls to include in the response |
| | | * to the client. |
| | | * |
| | | * @param control The control to add to the set of controls to include in |
| | | * the response to the client. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void addResponseControl(Control control) |
| | | @Override() |
| | | public final void addResponseControl(Control control) |
| | | { |
| | | responseControls.add(control); |
| | | } |
| | |
| | | |
| | | |
| | | /** |
| | | * Removes the provided control from the set of controls to include in the |
| | | * response to the client. |
| | | * |
| | | * @param control The control to remove from the set of controls to include |
| | | * in the response to the client. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void removeResponseControl(Control control) |
| | | @Override() |
| | | public final void removeResponseControl(Control control) |
| | | { |
| | | responseControls.remove(control); |
| | | } |
| | |
| | | |
| | | |
| | | /** |
| | | * Performs the work of actually processing this operation. This should |
| | | * include all processing for the operation, including invoking plugins, |
| | | * logging messages, performing access control, managing synchronization, and |
| | | * any other work that might need to be done in the course of processing. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void run() |
| | | @Override() |
| | | public final void run() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "run"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Attempts to cancel this operation before processing has completed. Note |
| | | * that a bind operation may not be canceled, so this should never do |
| | | * anything. |
| | | * |
| | | * @param cancelRequest Information about the way in which the operation |
| | | * should be canceled. |
| | | * |
| | | * @return A code providing information on the result of the cancellation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public CancelResult cancel(CancelRequest cancelRequest) |
| | | @Override() |
| | | public final CancelResult cancel(CancelRequest cancelRequest) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "cancel", String.valueOf(cancelRequest)); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the cancel request that has been issued for this operation, if |
| | | * there is one. Note that a bind operation may not be canceled, so this will |
| | | * always return <CODE>null</CODE>. |
| | | * |
| | | * @return The cancel request that has been issued for this operation, or |
| | | * <CODE>null</CODE> if there has not been any request to cancel. |
| | | * {@inheritDoc} |
| | | */ |
| | | public CancelRequest getCancelRequest() |
| | | @Override() |
| | | public final CancelRequest getCancelRequest() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCancelRequest"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Appends a string representation of this operation to the provided buffer. |
| | | * |
| | | * @param buffer The buffer into which a string representation of this |
| | | * operation should be appended. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void toString(StringBuilder buffer) |
| | | @Override() |
| | | public final void toString(StringBuilder buffer) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder"); |
| | | |
| | |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.extensions.SubjectEqualsDNCertificateMapper; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.OperationType; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.SearchFilter; |
| | | import org.opends.server.types.operation.PostOperationCompareOperation; |
| | | import org.opends.server.types.operation.PostResponseCompareOperation; |
| | | import org.opends.server.types.operation.PreOperationCompareOperation; |
| | | import org.opends.server.types.operation.PreParseCompareOperation; |
| | | |
| | | import static org.opends.server.core.CoreConstants.*; |
| | | import static org.opends.server.loggers.Access.*; |
| | |
| | | */ |
| | | public class CompareOperation |
| | | extends Operation |
| | | implements PreParseCompareOperation, PreOperationCompareOperation, |
| | | PostOperationCompareOperation, PostResponseCompareOperation |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | |
| | | * |
| | | * @return The raw, unprocessed entry DN as included in the client request. |
| | | */ |
| | | public ByteString getRawEntryDN() |
| | | public final ByteString getRawEntryDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRawEntryDN"); |
| | | |
| | |
| | | |
| | | /** |
| | | * Specifies the raw, unprocessed entry DN as included in the client request. |
| | | * This should only be called by pre-parse plugins. All other code that needs |
| | | * to set the entry DN should use the <CODE>setEntryDN</CODE> method. |
| | | * This should only be called by pre-parse plugins. |
| | | * |
| | | * @param rawEntryDN The raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | */ |
| | | public void setRawEntryDN(ByteString rawEntryDN) |
| | | public final void setRawEntryDN(ByteString rawEntryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setRawEntryDN"); |
| | | |
| | |
| | | * @return The DN of the entry to compare, or <CODE>null</CODE> if the raw |
| | | * entry DN has not yet been processed. |
| | | */ |
| | | public DN getEntryDN() |
| | | public final DN getEntryDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getEntryDN"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the DN of the entry to compare. This should not be called by |
| | | * pre-parse plugins, since they should use <CODE>setRawEntryDN</CODE> |
| | | * instead. |
| | | * |
| | | * @param entryDN The DN of the entry to compare. |
| | | */ |
| | | public void setEntryDN(DN entryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setEntryDN", String.valueOf(entryDN)); |
| | | |
| | | this.entryDN = entryDN; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the raw attribute type for this compare operation. |
| | | * |
| | | * @return The raw attribute type for this compare operation. |
| | | */ |
| | | public String getRawAttributeType() |
| | | public final String getRawAttributeType() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRawAttributeType"); |
| | | |
| | |
| | | * @param rawAttributeType The raw attribute type for this compare |
| | | * operation. |
| | | */ |
| | | public void setRawAttributeType(String rawAttributeType) |
| | | public final void setRawAttributeType(String rawAttributeType) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setRawAttributeType", |
| | | String.valueOf(rawAttributeType)); |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the attribute type for this compare operation. |
| | | * Retrieves the attribute type for this compare operation. This should not |
| | | * be called by pre-parse plugins because the processed attribute type will |
| | | * not be available yet. |
| | | * |
| | | * @return The attribute type for this compare operation. |
| | | */ |
| | | public AttributeType getAttributeType() |
| | | public final AttributeType getAttributeType() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAttributeType"); |
| | | |
| | |
| | | * |
| | | * @return The assertion value for this compare operation. |
| | | */ |
| | | public ByteString getAssertionValue() |
| | | public final ByteString getAssertionValue() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAssertionValue"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the assertion value for this compare operation. |
| | | * Specifies the assertion value for this compare operation. This should only |
| | | * be called by pre-parse and pre-operation plugins. |
| | | * |
| | | * @param assertionValue The assertion value for this compare operation. |
| | | */ |
| | | public void setAssertionValue(ByteString assertionValue) |
| | | public final void setAssertionValue(ByteString assertionValue) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setAssertionValue", |
| | | String.valueOf(assertionValue)); |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the entry to target with the compare operation. It will not be |
| | | * available to pre-parse plugins. |
| | | * Retrieves the entry to target with the compare operation. This should not |
| | | * be called by pre-parse plugins. |
| | | * |
| | | * @return The entry to target with the compare operation, or |
| | | * <CODE>null</CODE> if the entry is not yet available. |
| | | */ |
| | | public Entry getEntryToCompare() |
| | | public final Entry getEntryToCompare() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getEntryToCompare"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing started for this operation. |
| | | * |
| | | * @return The time that processing started for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingStartTime() |
| | | @Override() |
| | | public final long getProcessingStartTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingStartTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing stopped for this operation. This will |
| | | * actually hold a time immediately before the response was sent to the |
| | | * client. |
| | | * |
| | | * @return The time that processing stopped for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingStopTime() |
| | | @Override() |
| | | public final long getProcessingStopTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingStopTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the length of time in milliseconds that the server spent |
| | | * processing this operation. This should not be called until after the |
| | | * server has sent the response to the client. |
| | | * |
| | | * @return The length of time in milliseconds that the server spent |
| | | * processing this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingTime() |
| | | @Override() |
| | | public final long getProcessingTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the operation type for this operation. |
| | | * |
| | | * @return The operation type for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public OperationType getOperationType() |
| | | @Override() |
| | | public final OperationType getOperationType() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a standard set of elements that should be logged in requests for |
| | | * this type of operation. Each element in the array will itself be a |
| | | * two-element array in which the first element is the name of the field and |
| | | * the second is a string representation of the value, or <CODE>null</CODE> if |
| | | * there is no value for that field. |
| | | * |
| | | * @return A standard set of elements that should be logged in requests for |
| | | * this type of operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public String[][] getRequestLogElements() |
| | | @Override() |
| | | public final String[][] getRequestLogElements() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a standard set of elements that should be logged in responses for |
| | | * this type of operation. Each element in the array will itself be a |
| | | * two-element array in which the first element is the name of the field and |
| | | * the second is a string representation of the value, or <CODE>null</CODE> if |
| | | * there is no value for that field. |
| | | * |
| | | * @return A standard set of elements that should be logged in responses for |
| | | * this type of operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public String[][] getResponseLogElements() |
| | | @Override() |
| | | public final String[][] getResponseLogElements() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of controls to include in the response to the client. |
| | | * Note that the contents of this list should not be altered after |
| | | * post-operation plugins have been called. |
| | | * |
| | | * @return The set of controls to include in the response to the client. |
| | | * {@inheritDoc} |
| | | */ |
| | | public List<Control> getResponseControls() |
| | | @Override() |
| | | public final List<Control> getResponseControls() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getResponseControls"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Performs the work of actually processing this operation. This should |
| | | * include all processing for the operation, including invoking plugins, |
| | | * logging messages, performing access control, managing synchronization, and |
| | | * any other work that might need to be done in the course of processing. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void run() |
| | | @Override() |
| | | public final void addResponseControl(Control control) |
| | | { |
| | | responseControls.add(control); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public final void removeResponseControl(Control control) |
| | | { |
| | | responseControls.remove(control); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public final void run() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "run"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Attempts to cancel this operation before processing has completed. |
| | | * |
| | | * @param cancelRequest Information about the way in which the operation |
| | | * should be canceled. |
| | | * |
| | | * @return A code providing information on the result of the cancellation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public CancelResult cancel(CancelRequest cancelRequest) |
| | | @Override() |
| | | public final CancelResult cancel(CancelRequest cancelRequest) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "cancel", String.valueOf(cancelRequest)); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the cancel request that has been issued for this operation, if |
| | | * there is one. |
| | | * |
| | | * @return The cancel request that has been issued for this operation, or |
| | | * <CODE>null</CODE> if there has not been any request to cancel. |
| | | * {@inheritDoc} |
| | | */ |
| | | public CancelRequest getCancelRequest() |
| | | @Override() |
| | | public final CancelRequest getCancelRequest() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCancelRequest"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Appends a string representation of this operation to the provided buffer. |
| | | * |
| | | * @param buffer The buffer into which a string representation of this |
| | | * operation should be appended. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void toString(StringBuilder buffer) |
| | | @Override() |
| | | public final void toString(StringBuilder buffer) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder"); |
| | | |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.SearchFilter; |
| | | |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.WritabilityMode; |
| | | |
| | |
| | | import org.opends.server.api.AccessControlProvider; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.SearchResultEntry; |
| | | import org.opends.server.types.SearchResultReference; |
| | | |
| | |
| | | import org.opends.server.protocols.ldap.LDAPException; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.CancelledOperationException; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.OperationType; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.SearchFilter; |
| | | import org.opends.server.types.SearchResultEntry; |
| | | import org.opends.server.types.SynchronizationProviderResult; |
| | | import org.opends.server.types.operation.PostOperationDeleteOperation; |
| | | import org.opends.server.types.operation.PostResponseDeleteOperation; |
| | | import org.opends.server.types.operation.PreOperationDeleteOperation; |
| | | import org.opends.server.types.operation.PreParseDeleteOperation; |
| | | |
| | | import static org.opends.server.core.CoreConstants.*; |
| | | import static org.opends.server.loggers.Access.*; |
| | |
| | | */ |
| | | public class DeleteOperation |
| | | extends Operation |
| | | implements PreParseDeleteOperation, PreOperationDeleteOperation, |
| | | PostOperationDeleteOperation, PostResponseDeleteOperation |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | |
| | | * |
| | | * @return The raw, unprocessed entry DN as included in the client request. |
| | | */ |
| | | public ByteString getRawEntryDN() |
| | | public final ByteString getRawEntryDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRawEntryDN"); |
| | | |
| | |
| | | * @param rawEntryDN The raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | */ |
| | | public void setRawEntryDN(ByteString rawEntryDN) |
| | | public final void setRawEntryDN(ByteString rawEntryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setRawEntryDN"); |
| | | |
| | |
| | | * @return The DN of the entry to delete, or <CODE>null</CODE> if the raw |
| | | * entry DN has not yet been processed. |
| | | */ |
| | | public DN getEntryDN() |
| | | public final DN getEntryDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getEntryDN"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the DN of the entry to delete. This should not be called by |
| | | * pre-parse plugins, since they should use <CODE>setRawEntryDN</CODE> |
| | | * instead. |
| | | * |
| | | * @param entryDN The DN of the entry to delete. |
| | | */ |
| | | public void setEntryDN(DN entryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setEntryDN", String.valueOf(entryDN)); |
| | | |
| | | this.entryDN = entryDN; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the entry to be deleted. This will not be available to pre-parse |
| | | * plugins. |
| | | * |
| | | * @return The entry to be deleted, or <CODE>null</CODE> if the entry is not |
| | | * yet available. |
| | | */ |
| | | public Entry getEntryToDelete() |
| | | public final Entry getEntryToDelete() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getEntryToDelete"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing started for this operation. |
| | | * |
| | | * @return The time that processing started for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingStartTime() |
| | | @Override() |
| | | public final long getProcessingStartTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingStartTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing stopped for this operation. This will |
| | | * actually hold a time immediately before the response was sent to the |
| | | * client. |
| | | * |
| | | * @return The time that processing stopped for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingStopTime() |
| | | @Override() |
| | | public final long getProcessingStopTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingStopTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the length of time in milliseconds that the server spent |
| | | * processing this operation. This should not be called until after the |
| | | * server has sent the response to the client. |
| | | * |
| | | * @return The length of time in milliseconds that the server spent |
| | | * processing this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingTime() |
| | | @Override() |
| | | public final long getProcessingTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingTime"); |
| | | |
| | |
| | | * if none has been assigned yet or if there is no applicable |
| | | * synchronization mechanism in place that uses change numbers. |
| | | */ |
| | | public long getChangeNumber() |
| | | public final long getChangeNumber() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getChangeNumber"); |
| | | |
| | |
| | | * @param changeNumber The change number that has been assigned to this |
| | | * operation by the synchronization mechanism. |
| | | */ |
| | | public void setChangeNumber(long changeNumber) |
| | | public final void setChangeNumber(long changeNumber) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setChangeNumber", |
| | | String.valueOf(changeNumber)); |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the operation type for this operation. |
| | | * |
| | | * @return The operation type for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public OperationType getOperationType() |
| | | @Override() |
| | | public final OperationType getOperationType() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a standard set of elements that should be logged in requests for |
| | | * this type of operation. Each element in the array will itself be a |
| | | * two-element array in which the first element is the name of the field and |
| | | * the second is a string representation of the value, or <CODE>null</CODE> if |
| | | * there is no value for that field. |
| | | * |
| | | * @return A standard set of elements that should be logged in requests for |
| | | * this type of operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public String[][] getRequestLogElements() |
| | | @Override() |
| | | public final String[][] getRequestLogElements() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a standard set of elements that should be logged in responses for |
| | | * this type of operation. Each element in the array will itself be a |
| | | * two-element array in which the first element is the name of the field and |
| | | * the second is a string representation of the value, or <CODE>null</CODE> if |
| | | * there is no value for that field. |
| | | * |
| | | * @return A standard set of elements that should be logged in responses for |
| | | * this type of operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public String[][] getResponseLogElements() |
| | | @Override() |
| | | public final String[][] getResponseLogElements() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of controls to include in the response to the client. |
| | | * Note that the contents of this list should not be altered after |
| | | * post-operation plugins have been called. |
| | | * |
| | | * @return The set of controls to include in the response to the client. |
| | | * {@inheritDoc} |
| | | */ |
| | | public List<Control> getResponseControls() |
| | | @Override() |
| | | public final List<Control> getResponseControls() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getResponseControls"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Performs the work of actually processing this operation. This should |
| | | * include all processing for the operation, including invoking plugins, |
| | | * logging messages, performing access control, managing synchronization, and |
| | | * any other work that might need to be done in the course of processing. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void run() |
| | | @Override() |
| | | public final void addResponseControl(Control control) |
| | | { |
| | | responseControls.add(control); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public final void removeResponseControl(Control control) |
| | | { |
| | | responseControls.remove(control); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public final void run() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "run"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Attempts to cancel this operation before processing has completed. |
| | | * |
| | | * @param cancelRequest Information about the way in which the operation |
| | | * should be canceled. |
| | | * |
| | | * @return A code providing information on the result of the cancellation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public CancelResult cancel(CancelRequest cancelRequest) |
| | | @Override() |
| | | public final CancelResult cancel(CancelRequest cancelRequest) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "cancel", String.valueOf(cancelRequest)); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the cancel request that has been issued for this operation, if |
| | | * there is one. |
| | | * |
| | | * @return The cancel request that has been issued for this operation, or |
| | | * <CODE>null</CODE> if there has not been any request to cancel. |
| | | * {@inheritDoc} |
| | | */ |
| | | public CancelRequest getCancelRequest() |
| | | @Override() |
| | | public final CancelRequest getCancelRequest() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCancelRequest"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Appends a string representation of this operation to the provided buffer. |
| | | * |
| | | * @param buffer The buffer into which a string representation of this |
| | | * operation should be appended. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void toString(StringBuilder buffer) |
| | | @Override() |
| | | public final void toString(StringBuilder buffer) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder"); |
| | | |
| | |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeUsage; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.CryptoManager; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DITContentRule; |
| | | import org.opends.server.types.DITStructureRule; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.MatchingRuleUse; |
| | | import org.opends.server.types.NameForm; |
| | | import org.opends.server.types.ObjectClass; |
| | | import org.opends.server.types.ObjectClassType; |
| | | import org.opends.server.types.OperatingSystem; |
| | | import org.opends.server.types.OperationType; |
| | | import org.opends.server.types.RDN; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.Schema; |
| | | import org.opends.server.types.WritabilityMode; |
| | | import org.opends.server.util.TimeThread; |
| | | import org.opends.server.util.args.ArgumentException; |
| | |
| | | synchronizationProviderConfigManager.initializeSynchronizationProviders(); |
| | | |
| | | |
| | | // Create and initialize the work queue. |
| | | initializeWorkQueue(); |
| | | |
| | | |
| | | StartupPluginResult startupPluginResult = |
| | | pluginConfigManager.invokeStartupPlugins(); |
| | | if (! startupPluginResult.continueStartup()) |
| | |
| | | } |
| | | |
| | | |
| | | // Create and initialize the work queue. |
| | | initializeWorkQueue(); |
| | | |
| | | |
| | | // At this point, we should be ready to go. Start all the connection |
| | | // handlers. |
| | | for (ConnectionHandler c : connectionHandlers) |
| | |
| | | } |
| | | directoryServer.connectionHandlers.clear(); |
| | | |
| | | |
| | | |
| | | // Call the shutdown plugins, and then finalize all the plugins defined in |
| | | // the server. |
| | | if (directoryServer.pluginConfigManager != null) |
| | | { |
| | | directoryServer.pluginConfigManager.invokeShutdownPlugins(); |
| | | directoryServer.pluginConfigManager.finalizePlugins(); |
| | | } |
| | | |
| | | |
| | | // shutdown the Synchronization Providers |
| | | for (SynchronizationProvider provider : |
| | | directoryServer.synchronizationProviders) |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | // Call the shutdown plugins, and then finalize all the plugins defined in |
| | | // the server. |
| | | if (directoryServer.pluginConfigManager != null) |
| | | { |
| | | directoryServer.pluginConfigManager.invokeShutdownPlugins(); |
| | | directoryServer.pluginConfigManager.finalizePlugins(); |
| | | } |
| | | |
| | | |
| | | // Shut down all of the alert handlers. |
| | | for (AlertHandler alertHandler : directoryServer.alertHandlers) |
| | | { |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.api.plugin.PreOperationPluginResult; |
| | | import org.opends.server.api.plugin.PreParsePluginResult; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.OperationType; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.operation.PostOperationExtendedOperation; |
| | | import org.opends.server.types.operation.PostResponseExtendedOperation; |
| | | import org.opends.server.types.operation.PreOperationExtendedOperation; |
| | | import org.opends.server.types.operation.PreParseExtendedOperation; |
| | | |
| | | import static org.opends.server.core.CoreConstants.*; |
| | | import static org.opends.server.loggers.Access.*; |
| | |
| | | */ |
| | | public class ExtendedOperation |
| | | extends Operation |
| | | implements PreParseExtendedOperation, PreOperationExtendedOperation, |
| | | PostOperationExtendedOperation, PostResponseExtendedOperation |
| | | { |
| | | /*** The fully-qualified name of this class for debugging purposes. |
| | | */ |
| | |
| | | * |
| | | * @return The OID for the request associated with this extended operation. |
| | | */ |
| | | public String getRequestOID() |
| | | public final String getRequestOID() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRequestOID"); |
| | | |
| | |
| | | |
| | | /** |
| | | * Specifies the OID for the request associated with this extended operation. |
| | | * This should only be called by pre-parse plugins. |
| | | * |
| | | * @param requestOID The OID for the request associated with this extended |
| | | * operation. |
| | | */ |
| | | public void setRequestOID(String requestOID) |
| | | public final void setRequestOID(String requestOID) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setRequestOID", String.valueOf(requestOID)); |
| | | |
| | |
| | | * |
| | | * @return The value for the request associated with this extended operation. |
| | | */ |
| | | public ASN1OctetString getRequestValue() |
| | | public final ASN1OctetString getRequestValue() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRequestValue"); |
| | | |
| | |
| | | |
| | | /** |
| | | * Specifies the value for the request associated with this extended |
| | | * operation. |
| | | * operation. This should only be called by pre-parse plugins. |
| | | * |
| | | * @param requestValue The value for the request associated with this |
| | | * extended operation. |
| | | */ |
| | | public void setRequestValue(ASN1OctetString requestValue) |
| | | public final void setRequestValue(ASN1OctetString requestValue) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setRequestValue", |
| | | String.valueOf(requestValue)); |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID to include in the response to the client. |
| | | * Retrieves the OID to include in the response to the client. This should |
| | | * not be called by pre-parse or pre-operation plugins. |
| | | * |
| | | * @return The OID to include in the response to the client. |
| | | */ |
| | | public String getResponseOID() |
| | | public final String getResponseOID() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getResponseOID"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the OID to include in the response to the client. |
| | | * Specifies the OID to include in the response to the client. This should |
| | | * not be called by post-response plugins. |
| | | * |
| | | * @param responseOID The OID to include in the response to the client. |
| | | */ |
| | | public void setResponseOID(String responseOID) |
| | | public final void setResponseOID(String responseOID) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setResponseOID", |
| | | String.valueOf(responseOID)); |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the value to include in the response to the client. |
| | | * Retrieves the value to include in the response to the client. This should |
| | | * not be called by pre-parse or pre-operation plugins. |
| | | * |
| | | * @return The value to include in the response to the client. |
| | | */ |
| | | public ASN1OctetString getResponseValue() |
| | | public final ASN1OctetString getResponseValue() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getResponseValue"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the value to include in the response to the client. |
| | | * Specifies the value to include in the response to the client. This should |
| | | * not be called by post-response plugins. |
| | | * |
| | | * @param responseValue The value to include in the response to the client. |
| | | */ |
| | | public void setResponseValue(ASN1OctetString responseValue) |
| | | public final void setResponseValue(ASN1OctetString responseValue) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setResponseValue", |
| | | String.valueOf(responseValue)); |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing started for this operation. |
| | | * |
| | | * @return The time that processing started for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingStartTime() |
| | | @Override() |
| | | public final long getProcessingStartTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingStartTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing stopped for this operation. This will |
| | | * actually hold a time immediately before the response was sent to the |
| | | * client. |
| | | * |
| | | * @return The time that processing stopped for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingStopTime() |
| | | @Override() |
| | | public final long getProcessingStopTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingStopTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the length of time in milliseconds that the server spent |
| | | * processing this operation. This should not be called until after the |
| | | * server has sent the response to the client. |
| | | * |
| | | * @return The length of time in milliseconds that the server spent |
| | | * processing this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingTime() |
| | | @Override() |
| | | public final long getProcessingTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the operation type for this operation. |
| | | * |
| | | * @return The operation type for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public OperationType getOperationType() |
| | | @Override() |
| | | public final OperationType getOperationType() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a standard set of elements that should be logged in requests for |
| | | * this type of operation. Each element in the array will itself be a |
| | | * two-element array in which the first element is the name of the field and |
| | | * the second is a string representation of the value, or <CODE>null</CODE> if |
| | | * there is no value for that field. |
| | | * |
| | | * @return A standard set of elements that should be logged in requests for |
| | | * this type of operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public String[][] getRequestLogElements() |
| | | @Override() |
| | | public final String[][] getRequestLogElements() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a standard set of elements that should be logged in responses for |
| | | * this type of operation. Each element in the array will itself be a |
| | | * two-element array in which the first element is the name of the field and |
| | | * the second is a string representation of the value, or <CODE>null</CODE> if |
| | | * there is no value for that field. |
| | | * |
| | | * @return A standard set of elements that should be logged in responses for |
| | | * this type of operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public String[][] getResponseLogElements() |
| | | @Override() |
| | | public final String[][] getResponseLogElements() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of controls to include in the response to the client. |
| | | * Note that the contents of this list should not be altered after |
| | | * post-operation plugins have been called. |
| | | * |
| | | * @return The set of controls to include in the response to the client. |
| | | * {@inheritDoc} |
| | | */ |
| | | public List<Control> getResponseControls() |
| | | @Override() |
| | | public final List<Control> getResponseControls() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getResponseControls"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Performs the work of actually processing this operation. This should |
| | | * include all processing for the operation, including invoking plugins, |
| | | * logging messages, performing access control, managing synchronization, and |
| | | * any other work that might need to be done in the course of processing. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void run() |
| | | @Override() |
| | | public final void addResponseControl(Control control) |
| | | { |
| | | responseControls.add(control); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public final void removeResponseControl(Control control) |
| | | { |
| | | responseControls.remove(control); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public final void run() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "run"); |
| | | |
| | |
| | | * operation in which the response must be sent in the clear before actually |
| | | * enabling TLS protection). |
| | | */ |
| | | public void sendExtendedResponse() |
| | | public final void sendExtendedResponse() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "sendExtendedResponse"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the response for this extended operation has been sent |
| | | * from somewhere outside of this class. This should only be used by the |
| | | * StartTLS extended operation for the case in which it needs to send a |
| | | * response in the clear after TLS negotiation has already started on the |
| | | * connection. |
| | | * Indicates that the response for this extended operation has been sent from |
| | | * somewhere outside of this class. This should only be used by the StartTLS |
| | | * extended operation for the case in which it needs to send a response in the |
| | | * clear after TLS negotiation has already started on the connection. |
| | | */ |
| | | public void setResponseSent() |
| | | public final void setResponseSent() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setResponseSent", |
| | | String.valueOf(responseSent)); |
| | |
| | | |
| | | |
| | | /** |
| | | * Attempts to cancel this operation before processing has completed. |
| | | * |
| | | * @param cancelRequest Information about the way in which the operation |
| | | * should be canceled. |
| | | * |
| | | * @return A code providing information on the result of the cancellation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public CancelResult cancel(CancelRequest cancelRequest) |
| | | @Override() |
| | | public final CancelResult cancel(CancelRequest cancelRequest) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "cancel", String.valueOf(cancelRequest)); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the cancel request that has been issued for this operation, if |
| | | * there is one. |
| | | * |
| | | * @return The cancel request that has been issued for this operation, or |
| | | * <CODE>null</CODE> if there has not been any request to cancel. |
| | | * {@inheritDoc} |
| | | */ |
| | | public CancelRequest getCancelRequest() |
| | | @Override() |
| | | public final CancelRequest getCancelRequest() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCancelRequest"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Appends a string representation of this operation to the provided buffer. |
| | | * |
| | | * @param buffer The buffer into which a string representation of this |
| | | * operation should be appended. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void toString(StringBuilder buffer) |
| | | @Override() |
| | | public final void toString(StringBuilder buffer) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder"); |
| | | |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.extensions.NullKeyManagerProvider; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.CancelledOperationException; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.Modification; |
| | | import org.opends.server.types.ModificationType; |
| | | import org.opends.server.types.OperationType; |
| | | import org.opends.server.types.RDN; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.SearchFilter; |
| | | import org.opends.server.types.SearchResultEntry; |
| | | import org.opends.server.types.SynchronizationProviderResult; |
| | | import org.opends.server.types.operation.PostOperationModifyDNOperation; |
| | | import org.opends.server.types.operation.PostResponseModifyDNOperation; |
| | | import org.opends.server.types.operation.PreOperationModifyDNOperation; |
| | | import org.opends.server.types.operation.PreParseModifyDNOperation; |
| | | |
| | | import static org.opends.server.core.CoreConstants.*; |
| | | import static org.opends.server.loggers.Access.*; |
| | |
| | | */ |
| | | public class ModifyDNOperation |
| | | extends Operation |
| | | implements PreParseModifyDNOperation, PreOperationModifyDNOperation, |
| | | PostOperationModifyDNOperation, PostResponseModifyDNOperation |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | |
| | | * |
| | | * @return The raw, unprocessed entry DN as included in the client request. |
| | | */ |
| | | public ByteString getRawEntryDN() |
| | | public final ByteString getRawEntryDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRawEntryDN"); |
| | | |
| | |
| | | |
| | | /** |
| | | * Specifies the raw, unprocessed entry DN as included in the client request. |
| | | * This should only be called by pre-parse plugins. All other code that needs |
| | | * to set the entry DN should use the <CODE>setEntryDN</CODE> method. |
| | | * This should only be called by pre-parse plugins. |
| | | * |
| | | * @param rawEntryDN The raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | */ |
| | | public void setRawEntryDN(ByteString rawEntryDN) |
| | | public final void setRawEntryDN(ByteString rawEntryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setRawEntryDN"); |
| | | |
| | |
| | | * @return The DN of the entry to rename, or <CODE>null</CODE> if the raw |
| | | * entry DN has not yet been processed. |
| | | */ |
| | | public DN getEntryDN() |
| | | public final DN getEntryDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getEntryDN"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the DN of the entry to rename. This should not be called by |
| | | * pre-parse plugins, since they should use <CODE>setRawEntryDN</CODE> |
| | | * instead. |
| | | * |
| | | * @param entryDN The DN of the entry to compare. |
| | | */ |
| | | public void setEntryDN(DN entryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setEntryDN", String.valueOf(entryDN)); |
| | | |
| | | this.entryDN = entryDN; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the raw, unprocessed newRDN as included in the request from the |
| | | * client. This may or may not contain a valid RDN, as no validation will |
| | | * have been performed on it. |
| | |
| | | * @return The raw, unprocessed newRDN as included in the request from the |
| | | * client. |
| | | */ |
| | | public ByteString getRawNewRDN() |
| | | public final ByteString getRawNewRDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRawNewRDN"); |
| | | |
| | |
| | | /** |
| | | * Specifies the raw, unprocessed newRDN as included in the request from the |
| | | * client. This should only be called by pre-parse plugins and should not be |
| | | * used in later stages of processing where the <CODE>getNewRDN</CODE> and |
| | | * <CODE>setNewRDN</CODE> methods should be used instead. |
| | | * used in later stages of processing. |
| | | * |
| | | * @param rawNewRDN The raw, unprocessed newRDN as included in the request |
| | | * from the client. |
| | | */ |
| | | public void setRawNewRDN(ByteString rawNewRDN) |
| | | public final void setRawNewRDN(ByteString rawNewRDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setRawNewRDN", String.valueOf(rawNewRDN)); |
| | | |
| | |
| | | * @return The new RDN to use for the entry, or <CODE>null</CODE> if the raw |
| | | * newRDN has not yet been processed. |
| | | */ |
| | | public RDN getNewRDN() |
| | | public final RDN getNewRDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getNewRDN"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the new RDN to use for the entry. This should not be called by |
| | | * pre-parse plugins, which should use the <CODE>getRawNewRDN</CODE> and |
| | | * <CODE>setRawNewRDN</CODE> methods instead. |
| | | * |
| | | * @param newRDN The new RDN to use for the entry. |
| | | */ |
| | | public void setNewRDN(RDN newRDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setNewRDN", String.valueOf(newRDN)); |
| | | |
| | | this.newRDN = newRDN; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the current RDN value should be removed from the entry. |
| | | * |
| | | * @return <CODE>true</CODE> if the current RDN value should be removed from |
| | | * the entry, or <CODE>false</CODE> if not. |
| | | */ |
| | | public boolean deleteOldRDN() |
| | | public final boolean deleteOldRDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deleteOldRDN"); |
| | | |
| | |
| | | * @param deleteOldRDN Specifies whether the current RDN value should be |
| | | * removed from the entry. |
| | | */ |
| | | public void setDeleteOldRDN(boolean deleteOldRDN) |
| | | public final void setDeleteOldRDN(boolean deleteOldRDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setDeleteOldRDN", |
| | | String.valueOf(deleteOldRDN)); |
| | |
| | | * @return The raw, unprocessed newSuperior from the client request, or |
| | | * <CODE>null</CODE> if there is none. |
| | | */ |
| | | public ByteString getRawNewSuperior() |
| | | public final ByteString getRawNewSuperior() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRawNewSuperior"); |
| | | |
| | |
| | | /** |
| | | * Specifies the raw, unprocessed newSuperior for this modify DN operation, as |
| | | * provided in the request from the client. This method should only be called |
| | | * by pre-parse plugins. Later processing that needs to set the newSuperior |
| | | * should use the <CODE>setNewSuperior</CODE> method. |
| | | * by pre-parse plugins. |
| | | * |
| | | * @param rawNewSuperior The raw, unprocessed newSuperior as provided in the |
| | | * request from the client. |
| | | */ |
| | | public void setRawNewSuperior(ByteString rawNewSuperior) |
| | | public final void setRawNewSuperior(ByteString rawNewSuperior) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setRawNewSuperior", |
| | | String.valueOf(rawNewSuperior)); |
| | |
| | | * no newSuperior DN for this request or if the raw newSuperior has |
| | | * not yet been processed. |
| | | */ |
| | | public DN getNewSuperior() |
| | | public final DN getNewSuperior() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getNewSuperior"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the new parent DN for the entry. This should not be called by |
| | | * pre-parse plugins, which should use the <CODE>setRawNewSuperior</CODE> |
| | | * method instead. |
| | | * |
| | | * @param newSuperior The new parent DN for the entry. |
| | | */ |
| | | public void setNewSuperior(DN newSuperior) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setNewSuperior", |
| | | String.valueOf(newSuperior)); |
| | | |
| | | this.newSuperior = newSuperior; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of modifications applied to attributes of the target |
| | | * entry in the course of processing this modify DN operation. This will |
| | | * include attribute-level changes from the modify DN itself (e.g., removing |
| | |
| | | * of the modify DN processing, or <CODE>null</CODE> if that |
| | | * information is not yet available (e.g., during pre-parse plugins). |
| | | */ |
| | | public List<Modification> getModifications() |
| | | public final List<Modification> getModifications() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getModifications"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Adds the provided modification to the set of modifications to be applied |
| | | * as part of the update. This should only be called by pre-operation |
| | | * plugins. |
| | | * |
| | | * @param modification The modification to add to the set of modifications |
| | | * to apply to the entry. |
| | | */ |
| | | public final void addModification(Modification modification) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "addModification", |
| | | String.valueOf(modification)); |
| | | |
| | | modifications.add(modification); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the current entry, before it is renamed. This will not be |
| | | * available to pre-parse plugins or during the conflict resolution portion of |
| | | * the synchronization processing. |
| | |
| | | * @return The current entry, or <CODE>null</CODE> if it is not yet |
| | | * available. |
| | | */ |
| | | public Entry getOriginalEntry() |
| | | public final Entry getOriginalEntry() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getOriginalEntry"); |
| | | |
| | |
| | | * @return The updated entry, or <CODE>null</CODE> if it is not yet |
| | | * available. |
| | | */ |
| | | public Entry getUpdatedEntry() |
| | | public final Entry getUpdatedEntry() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getUpdatedEntry"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing started for this operation. |
| | | * |
| | | * @return The time that processing started for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingStartTime() |
| | | @Override() |
| | | public final long getProcessingStartTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingStartTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing stopped for this operation. This will |
| | | * actually hold a time immediately before the response was sent to the |
| | | * client. |
| | | * |
| | | * @return The time that processing stopped for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingStopTime() |
| | | @Override() |
| | | public final long getProcessingStopTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingStopTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the length of time in milliseconds that the server spent |
| | | * processing this operation. This should not be called until after the |
| | | * server has sent the response to the client. |
| | | * |
| | | * @return The length of time in milliseconds that the server spent |
| | | * processing this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingTime() |
| | | @Override() |
| | | public final long getProcessingTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingTime"); |
| | | |
| | |
| | | * if none has been assigned yet or if there is no applicable |
| | | * synchronization mechanism in place that uses change numbers. |
| | | */ |
| | | public long getChangeNumber() |
| | | public final long getChangeNumber() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getChangeNumber"); |
| | | |
| | |
| | | * @param changeNumber The change number that has been assigned to this |
| | | * operation by the synchronization mechanism. |
| | | */ |
| | | public void setChangeNumber(long changeNumber) |
| | | public final void setChangeNumber(long changeNumber) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setChangeNumber", |
| | | String.valueOf(changeNumber)); |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the operation type for this operation. |
| | | * |
| | | * @return The operation type for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public OperationType getOperationType() |
| | | @Override() |
| | | public final OperationType getOperationType() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a standard set of elements that should be logged in requests for |
| | | * this type of operation. Each element in the array will itself be a |
| | | * two-element array in which the first element is the name of the field and |
| | | * the second is a string representation of the value, or <CODE>null</CODE> if |
| | | * there is no value for that field. |
| | | * |
| | | * @return A standard set of elements that should be logged in requests for |
| | | * this type of operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public String[][] getRequestLogElements() |
| | | @Override() |
| | | public final String[][] getRequestLogElements() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a standard set of elements that should be logged in responses for |
| | | * this type of operation. Each element in the array will itself be a |
| | | * two-element array in which the first element is the name of the field and |
| | | * the second is a string representation of the value, or <CODE>null</CODE> if |
| | | * there is no value for that field. |
| | | * |
| | | * @return A standard set of elements that should be logged in responses for |
| | | * this type of operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public String[][] getResponseLogElements() |
| | | @Override() |
| | | public final String[][] getResponseLogElements() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of controls to include in the response to the client. |
| | | * Note that the contents of this list should not be altered after |
| | | * post-operation plugins have been called. |
| | | * |
| | | * @return The set of controls to include in the response to the client. |
| | | * {@inheritDoc} |
| | | */ |
| | | public List<Control> getResponseControls() |
| | | @Override() |
| | | public final List<Control> getResponseControls() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getResponseControls"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Performs the work of actually processing this operation. This should |
| | | * include all processing for the operation, including invoking plugins, |
| | | * logging messages, performing access control, managing synchronization, and |
| | | * any other work that might need to be done in the course of processing. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void run() |
| | | @Override() |
| | | public final void addResponseControl(Control control) |
| | | { |
| | | responseControls.add(control); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public final void removeResponseControl(Control control) |
| | | { |
| | | responseControls.remove(control); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public final void run() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "run"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Attempts to cancel this operation before processing has completed. |
| | | * |
| | | * @param cancelRequest Information about the way in which the operation |
| | | * should be canceled. |
| | | * |
| | | * @return A code providing information on the result of the cancellation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public CancelResult cancel(CancelRequest cancelRequest) |
| | | @Override() |
| | | public final CancelResult cancel(CancelRequest cancelRequest) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "cancel", String.valueOf(cancelRequest)); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the cancel request that has been issued for this operation, if |
| | | * there is one. |
| | | * |
| | | * @return The cancel request that has been issued for this operation, or |
| | | * <CODE>null</CODE> if there has not been any request to cancel. |
| | | * {@inheritDoc} |
| | | */ |
| | | public CancelRequest getCancelRequest() |
| | | @Override() |
| | | public final CancelRequest getCancelRequest() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCancelRequest"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Appends a string representation of this operation to the provided buffer. |
| | | * |
| | | * @param buffer The buffer into which a string representation of this |
| | | * operation should be appended. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void toString(StringBuilder buffer) |
| | | @Override() |
| | | public final void toString(StringBuilder buffer) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder"); |
| | | |
| | |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.AuthenticationInfo; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.CancelledOperationException; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.Modification; |
| | | import org.opends.server.types.ModificationType; |
| | | import org.opends.server.types.OperationType; |
| | | import org.opends.server.types.RDN; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.SearchFilter; |
| | | import org.opends.server.types.SearchResultEntry; |
| | | import org.opends.server.types.SynchronizationProviderResult; |
| | | import org.opends.server.types.operation.PreParseModifyOperation; |
| | | import org.opends.server.types.operation.PreOperationModifyOperation; |
| | | import org.opends.server.types.operation.PostOperationModifyOperation; |
| | | import org.opends.server.types.operation.PostResponseModifyOperation; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.core.CoreConstants.*; |
| | |
| | | */ |
| | | public class ModifyOperation |
| | | extends Operation |
| | | implements PreParseModifyOperation, PreOperationModifyOperation, |
| | | PostOperationModifyOperation, PostResponseModifyOperation |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | |
| | | * |
| | | * @return The raw, unprocessed entry DN as included in the client request. |
| | | */ |
| | | public ByteString getRawEntryDN() |
| | | public final ByteString getRawEntryDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRawEntryDN"); |
| | | |
| | |
| | | |
| | | /** |
| | | * Specifies the raw, unprocessed entry DN as included in the client request. |
| | | * This should only be called by pre-parse plugins. All other code that needs |
| | | * to set the entry DN should use the <CODE>setEntryDN</CODE> method. |
| | | * This should only be called by pre-parse plugins. |
| | | * |
| | | * @param rawEntryDN The raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | */ |
| | | public void setRawEntryDN(ByteString rawEntryDN) |
| | | public final void setRawEntryDN(ByteString rawEntryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setRawEntryDN"); |
| | | |
| | |
| | | * @return The DN of the entry to modify, or <CODE>null</CODE> if the raw |
| | | * entry DN has not yet been processed. |
| | | */ |
| | | public DN getEntryDN() |
| | | public final DN getEntryDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getEntryDN"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the DN of the entry to modify. This should not be called by |
| | | * pre-parse plugins, since they should use <CODE>setRawEntryDN</CODE> |
| | | * instead. |
| | | * |
| | | * @param entryDN The DN of the entry to modify. |
| | | */ |
| | | public void setEntryDN(DN entryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setEntryDN", String.valueOf(entryDN)); |
| | | |
| | | this.entryDN = entryDN; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of raw, unprocessed modifications as included in the |
| | | * client request. Note that this may contain one or more invalid |
| | | * modifications, as no validation will have been performed on this |
| | |
| | | * @return The set of raw, unprocessed modifications as included in the |
| | | * client request. |
| | | */ |
| | | public List<LDAPModification> getRawModifications() |
| | | public final List<LDAPModification> getRawModifications() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRawModifications"); |
| | | |
| | |
| | | * @param rawModification The modification to add to the set of raw |
| | | * modifications for this modify operation. |
| | | */ |
| | | public void addRawModification(LDAPModification rawModification) |
| | | public final void addRawModification(LDAPModification rawModification) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "addRawModification", |
| | | String.valueOf(rawModification)); |
| | |
| | | * |
| | | * @param rawModifications The raw modifications for this modify operation. |
| | | */ |
| | | public void setRawModifications(List<LDAPModification> rawModifications) |
| | | public final void setRawModifications(List<LDAPModification> rawModifications) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setRawModifications", |
| | | String.valueOf(rawModifications)); |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of modifications for this modify operation. Its |
| | | * contents may be altered in pre-operation plugins. It must not be accessed |
| | | * by pre-parse plugins, which should use the <CODE>getRawModifications</CODE> |
| | | * method instead. |
| | | * Retrieves the set of modifications for this modify operation. Its contents |
| | | * should not be altered. It will not be available to pre-parse plugins. |
| | | * |
| | | * @return The set of modifications for this modify operation, or |
| | | * <CODE>null</CODE> if the modifications have not yet been |
| | | * processed. |
| | | */ |
| | | public List<Modification> getModifications() |
| | | public final List<Modification> getModifications() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getModifications"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Adds the provided modification to the set of modifications to this modify |
| | | * operation. This may only be called by pre-operation plugins. |
| | | * |
| | | * @param modification The modification to add to the set of changes for |
| | | * this modify operation. |
| | | * |
| | | * @throws DirectoryException If an unexpected problem occurs while applying |
| | | * the modification to the entry. |
| | | */ |
| | | public final void addModification(Modification modification) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "addModification", |
| | | String.valueOf(modification)); |
| | | |
| | | modifiedEntry.applyModification(modification); |
| | | modifications.add(modification); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the current entry before any modifications are applied. This |
| | | * will not be available to pre-parse plugins. |
| | | * |
| | | * @return The current entry, or <CODE>null</CODE> if it is not yet |
| | | * available. |
| | | */ |
| | | public Entry getCurrentEntry() |
| | | public final Entry getCurrentEntry() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCurrentEntry"); |
| | | |
| | |
| | | * @return The modified entry that is to be written to the backend, or |
| | | * <CODE>null</CODE> if it is not yet available. |
| | | */ |
| | | public Entry getModifiedEntry() |
| | | public final Entry getModifiedEntry() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getModifiedEntry"); |
| | | |
| | |
| | | * modify request, or <CODE>null</CODE> if there were none or this |
| | | * information is not yet available. |
| | | */ |
| | | public List<AttributeValue> getCurrentPasswords() |
| | | public final List<AttributeValue> getCurrentPasswords() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCurrentPasswords"); |
| | | |
| | |
| | | * request, or <CODE>null</CODE> if there were none or this |
| | | * information is not yet available. |
| | | */ |
| | | public List<AttributeValue> getNewPasswords() |
| | | public final List<AttributeValue> getNewPasswords() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getNewPasswords"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing started for this operation. |
| | | * |
| | | * @return The time that processing started for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingStartTime() |
| | | @Override() |
| | | public final long getProcessingStartTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingStartTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing stopped for this operation. This will |
| | | * actually hold a time immediately before the response was sent to the |
| | | * client. |
| | | * |
| | | * @return The time that processing stopped for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingStopTime() |
| | | @Override() |
| | | public final long getProcessingStopTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingStopTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the length of time in milliseconds that the server spent |
| | | * processing this operation. This should not be called until after the |
| | | * server has sent the response to the client. |
| | | * |
| | | * @return The length of time in milliseconds that the server spent |
| | | * processing this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingTime() |
| | | @Override() |
| | | public final long getProcessingTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingTime"); |
| | | |
| | |
| | | * if none has been assigned yet or if there is no applicable |
| | | * synchronization mechanism in place that uses change numbers. |
| | | */ |
| | | public long getChangeNumber() |
| | | public final long getChangeNumber() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getChangeNumber"); |
| | | |
| | |
| | | * @param changeNumber The change number that has been assigned to this |
| | | * operation by the synchronization mechanism. |
| | | */ |
| | | public void setChangeNumber(long changeNumber) |
| | | public final void setChangeNumber(long changeNumber) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setChangeNumber", |
| | | String.valueOf(changeNumber)); |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the operation type for this operation. |
| | | * |
| | | * @return The operation type for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public OperationType getOperationType() |
| | | @Override() |
| | | public final OperationType getOperationType() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a standard set of elements that should be logged in requests for |
| | | * this type of operation. Each element in the array will itself be a |
| | | * two-element array in which the first element is the name of the field and |
| | | * the second is a string representation of the value, or <CODE>null</CODE> if |
| | | * there is no value for that field. |
| | | * |
| | | * @return A standard set of elements that should be logged in requests for |
| | | * this type of operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public String[][] getRequestLogElements() |
| | | @Override() |
| | | public final String[][] getRequestLogElements() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a standard set of elements that should be logged in responses for |
| | | * this type of operation. Each element in the array will itself be a |
| | | * two-element array in which the first element is the name of the field and |
| | | * the second is a string representation of the value, or <CODE>null</CODE> if |
| | | * there is no value for that field. |
| | | * |
| | | * @return A standard set of elements that should be logged in responses for |
| | | * this type of operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public String[][] getResponseLogElements() |
| | | @Override() |
| | | public final String[][] getResponseLogElements() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of controls to include in the response to the client. |
| | | * Note that the contents of this list should not be altered after |
| | | * post-operation plugins have been called. |
| | | * |
| | | * @return The set of controls to include in the response to the client. |
| | | * {@inheritDoc} |
| | | */ |
| | | public List<Control> getResponseControls() |
| | | @Override() |
| | | public final List<Control> getResponseControls() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getResponseControls"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Performs the work of actually processing this operation. This should |
| | | * include all processing for the operation, including invoking plugins, |
| | | * logging messages, performing access control, managing synchronization, and |
| | | * any other work that might need to be done in the course of processing. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void run() |
| | | @Override() |
| | | public final void addResponseControl(Control control) |
| | | { |
| | | responseControls.add(control); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public final void removeResponseControl(Control control) |
| | | { |
| | | responseControls.remove(control); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public final void run() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "run"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Attempts to cancel this operation before processing has completed. |
| | | * |
| | | * @param cancelRequest Information about the way in which the operation |
| | | * should be canceled. |
| | | * |
| | | * @return A code providing information on the result of the cancellation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public CancelResult cancel(CancelRequest cancelRequest) |
| | | @Override() |
| | | public final CancelResult cancel(CancelRequest cancelRequest) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "cancel", String.valueOf(cancelRequest)); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the cancel request that has been issued for this operation, if |
| | | * there is one. |
| | | * |
| | | * @return The cancel request that has been issued for this operation, or |
| | | * <CODE>null</CODE> if there has not been any request to cancel. |
| | | * {@inheritDoc} |
| | | */ |
| | | public CancelRequest getCancelRequest() |
| | | @Override() |
| | | public final CancelRequest getCancelRequest() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCancelRequest"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Appends a string representation of this operation to the provided buffer. |
| | | * |
| | | * @param buffer The buffer into which a string representation of this |
| | | * operation should be appended. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void toString(StringBuilder buffer) |
| | | @Override() |
| | | public final void toString(StringBuilder buffer) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder"); |
| | | |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.types.AuthenticationInfo; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.OperationType; |
| | | import org.opends.server.types.RDN; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.operation.PostOperationOperation; |
| | | import org.opends.server.types.operation.PostResponseOperation; |
| | | import org.opends.server.types.operation.PreOperationOperation; |
| | | import org.opends.server.types.operation.PreParseOperation; |
| | | |
| | | import static org.opends.server.core.CoreConstants.*; |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | * appropriate for the type of operation. |
| | | */ |
| | | public abstract class Operation |
| | | implements Runnable |
| | | implements PreParseOperation, PreOperationOperation, |
| | | PostOperationOperation, PostResponseOperation, Runnable |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | |
| | | /** |
| | | * The client connection with which this operation is associated. |
| | | */ |
| | | protected ClientConnection clientConnection; |
| | | protected final ClientConnection clientConnection; |
| | | |
| | | |
| | | |
| | | /** |
| | | * The message ID for this operation. |
| | | */ |
| | | protected int messageID; |
| | | protected final int messageID; |
| | | |
| | | |
| | | |
| | | /** |
| | | * The operation ID for this operation. |
| | | */ |
| | | protected long operationID; |
| | | protected final long operationID; |
| | | |
| | | |
| | | |
| | |
| | | * @return A standard set of elements that should be logged in requests and |
| | | * responses for all types of operations. |
| | | */ |
| | | public String[][] getCommonLogElements() |
| | | public final String[][] getCommonLogElements() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | /** |
| | | * Retrieves the set of controls included in the request from the client. |
| | | * Note that it is only acceptable for the caller to alter the contents of the |
| | | * returned list in pre-parse plugins. |
| | | * The returned list must not be altered. |
| | | * |
| | | * @return The set of controls included in the request from the client. |
| | | */ |
| | | public List<Control> getRequestControls() |
| | | public final List<Control> getRequestControls() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRequestControls"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Adds the provided control to the set of request controls for this |
| | | * operation. This method may only be called by pre-parse plugins. |
| | | * |
| | | * @param control The control to add to the set of request controls for this |
| | | * operation. |
| | | */ |
| | | public final void addRequestControl(Control control) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "addRequestControl", String.valueOf(control)); |
| | | |
| | | requestControls.add(control); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Removes the provided control from the set of request controls for this |
| | | * operation. This method may only be called by pre-parse plugins. |
| | | * |
| | | * @param control The control to remove from the set of request controls for |
| | | * this operation. |
| | | */ |
| | | public final void removeRequestControl(Control control) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "removeRequestControl", |
| | | String.valueOf(control)); |
| | | |
| | | requestControls.remove(control); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of controls to include in the response to the client. |
| | | * Note that the contents of this list should not be altered after |
| | | * post-operation plugins have been called. |
| | | * The contents of this list must not be altered. |
| | | * |
| | | * @return The set of controls to include in the response to the client. |
| | | */ |
| | |
| | | |
| | | |
| | | /** |
| | | * Adds the provided control to the set of controls to include in the response |
| | | * to the client. This method may not be called by post-response plugins. |
| | | * |
| | | * @param control The control to add to the set of controls to include in |
| | | * the response to the client. |
| | | */ |
| | | public abstract void addResponseControl(Control control); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Removes the provided control from the set of controls to include in the |
| | | * response to the client. This method may not be called by post-response |
| | | * plugins. |
| | | * |
| | | * @param control The control to remove from the set of controls to include |
| | | * in the response to the client. |
| | | */ |
| | | public abstract void removeResponseControl(Control control); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the result code for this operation. |
| | | * |
| | | * @return The result code associated for this operation, or |
| | | * <CODE>null</CODE> if the operation has not yet completed. |
| | | * <CODE>UNDEFINED</CODE> if the operation has not yet completed. |
| | | */ |
| | | public ResultCode getResultCode() |
| | | public final ResultCode getResultCode() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getResultCode"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the result code for this operation. |
| | | * Specifies the result code for this operation. This method may not be |
| | | * called by post-response plugins. |
| | | * |
| | | * @param resultCode The result code for this operation. |
| | | */ |
| | | public void setResultCode(ResultCode resultCode) |
| | | public final void setResultCode(ResultCode resultCode) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setResultCode", String.valueOf(resultCode)); |
| | | |
| | |
| | | |
| | | /** |
| | | * Retrieves the error message for this operation. Its contents may be |
| | | * altered by the caller. |
| | | * altered by pre-parse, pre-operation, and post-operation plugins, but not |
| | | * by post-response plugins. |
| | | * |
| | | * @return The error message for this operation. |
| | | */ |
| | | public StringBuilder getErrorMessage() |
| | | public final StringBuilder getErrorMessage() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getErrorMessage"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the error message for this operation. |
| | | * Specifies the error message for this operation. This method may not be |
| | | * called by post-response plugins. |
| | | * |
| | | * @param errorMessage The error message for this operation. |
| | | */ |
| | | public void setErrorMessage(StringBuilder errorMessage) |
| | | public final void setErrorMessage(StringBuilder errorMessage) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setErrorMessage", |
| | | String.valueOf(errorMessage)); |
| | |
| | | /** |
| | | * Appends the provided message to the error message buffer. If the buffer |
| | | * has not yet been created, then this will create it first and then add the |
| | | * provided message. |
| | | * provided message. This method may not be called by post-response plugins. |
| | | * |
| | | * @param message The message to append to the error message buffer. |
| | | */ |
| | | public void appendErrorMessage(String message) |
| | | public final void appendErrorMessage(String message) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "appendErrorMessage", |
| | | String.valueOf(message)); |
| | |
| | | /** |
| | | * Retrieves the additional log message for this operation, which should be |
| | | * written to the log but not included in the response to the client. The |
| | | * contents of this buffer may be altered by the caller. |
| | | * contents of this buffer may be altered by pre-parse, pre-operation, and |
| | | * post-operation plugins, but not by post-response plugins. |
| | | * |
| | | * @return The additional log message for this operation. |
| | | */ |
| | | public StringBuilder getAdditionalLogMessage() |
| | | public final StringBuilder getAdditionalLogMessage() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAdditionalLogMessage"); |
| | | |
| | |
| | | |
| | | /** |
| | | * Specifies the additional log message for this operation, which should be |
| | | * written to the log but not included in the response to the client. |
| | | * written to the log but not included in the response to the client. This |
| | | * method may not be called by post-response plugins. |
| | | * |
| | | * @param additionalLogMessage The additional log message for this |
| | | * operation. |
| | | */ |
| | | public void setAdditionalLogMessage(StringBuilder additionalLogMessage) |
| | | public final void setAdditionalLogMessage(StringBuilder additionalLogMessage) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setAdditionalLogMessage", |
| | | String.valueOf(additionalLogMessage)); |
| | |
| | | |
| | | /** |
| | | * Appends the provided message to the additional log information for this |
| | | * operation. |
| | | * operation. This method may not be called by post-response plugins. |
| | | * |
| | | * @param message The message that should be appended to the additional log |
| | | * information for this operation. |
| | | */ |
| | | public void appendAdditionalLogMessage(String message) |
| | | public final void appendAdditionalLogMessage(String message) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "appendAdditionalLogMessage", |
| | | String.valueOf(message)); |
| | |
| | | * @return The matched DN for this operation, or <CODE>null</CODE> if the |
| | | * operation has not yet completed or does not have a matched DN. |
| | | */ |
| | | public DN getMatchedDN() |
| | | public final DN getMatchedDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMatchedDN"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the matched DN for this operation. |
| | | * Specifies the matched DN for this operation. This may not be called by |
| | | * post-response plugins. |
| | | * |
| | | * @param matchedDN The matched DN for this operation. |
| | | */ |
| | | public void setMatchedDN(DN matchedDN) |
| | | public final void setMatchedDN(DN matchedDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setMatchedDN", String.valueOf(matchedDN)); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of referral URLs for this operation. If it is non-null |
| | | * then its contents may be altered by the caller. |
| | | * Retrieves the set of referral URLs for this operation. Its contents must |
| | | * not be altered by the caller. |
| | | * |
| | | * @return The set of referral URLs for this operation, or <CODE>null</CODE> |
| | | * if the operation is not yet complete or does not have a set of |
| | | * referral URLs. |
| | | */ |
| | | public List<String> getReferralURLs() |
| | | public final List<String> getReferralURLs() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getReferralURLs"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the set of referral URLs for this operation. |
| | | * Specifies the set of referral URLs for this operation. This may not be |
| | | * called by post-response plugins. |
| | | * |
| | | * @param referralURLs The set of referral URLs for this operation. |
| | | */ |
| | | public void setReferralURLs(List<String> referralURLs) |
| | | public final void setReferralURLs(List<String> referralURLs) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setReferralURLs", |
| | | String.valueOf(referralURLs)); |
| | |
| | | |
| | | /** |
| | | * Sets the response elements for this operation based on the information |
| | | * contained in the provided <CODE>DirectoryException</CODE> object. |
| | | * contained in the provided <CODE>DirectoryException</CODE> object. This |
| | | * method may not be called by post-response plugins. |
| | | * |
| | | * @param directoryException The exception containing the information to use |
| | | * for the response elements. |
| | | */ |
| | | public void setResponseData(DirectoryException directoryException) |
| | | public final void setResponseData(DirectoryException directoryException) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setResponseData"); |
| | | |
| | |
| | | * @return <CODE>true</CODE> if this is an internal operation, or |
| | | * <CODE>false</CODE> if it is not. |
| | | */ |
| | | public boolean isInternalOperation() |
| | | public final boolean isInternalOperation() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "isInternalOperation"); |
| | | |
| | |
| | | |
| | | /** |
| | | * Specifies whether this is an internal operation rather than one that was |
| | | * requested by an external client. |
| | | * requested by an external client. This may not be called from within a |
| | | * plugin. |
| | | * |
| | | * @param isInternalOperation Specifies whether this is an internal |
| | | * operation rather than one that was requested |
| | | * by an external client. |
| | | */ |
| | | public void setInternalOperation(boolean isInternalOperation) |
| | | public final void setInternalOperation(boolean isInternalOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setInternalOperation", |
| | | String.valueOf(isInternalOperation)); |
| | |
| | | * @return <CODE>true</CODE> if this is a data synchronization operation, or |
| | | * <CODE>false</CODE> if it is not. |
| | | */ |
| | | public boolean isSynchronizationOperation() |
| | | public final boolean isSynchronizationOperation() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "isSynchronizationOperation"); |
| | | |
| | |
| | | |
| | | /** |
| | | * Specifies whether this is a synchronization operation rather than one that |
| | | * was requested by an external client. |
| | | * was requested by an external client. This method may not be called from |
| | | * within a plugin. |
| | | * |
| | | * @param isSynchronizationOperation Specifies whether this is a |
| | | * synchronization operation rather than |
| | | * one that was requested by an external |
| | | * client. |
| | | */ |
| | | public void setSynchronizationOperation(boolean isSynchronizationOperation) |
| | | public final void setSynchronizationOperation( |
| | | boolean isSynchronizationOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setSynchronizationOperation", |
| | | String.valueOf(isSynchronizationOperation)); |
| | |
| | | * connection, or the null DN if no authentication has been performed on that |
| | | * connection. However, it may be some other value if special processing has |
| | | * been requested (e.g., the operation included a proxied authorization |
| | | * control). |
| | | * control). This method should not be called by pre-parse plugins because |
| | | * the correct value may not have yet been determined. |
| | | * |
| | | * @return The authorization DN for this operation. |
| | | */ |
| | | public DN getAuthorizationDN() |
| | | public final DN getAuthorizationDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAuthorizationDN"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the authorization DN for this operation. |
| | | * Specifies the authorization DN for this operation. This method may not be |
| | | * called from within a plugin. |
| | | * |
| | | * @param authorizationDN The authorization DN for this operation, or |
| | | * <CODE>null</CODE> if it should use the DN of the |
| | | * authenticated user. |
| | | */ |
| | | public void setAuthorizationDN(DN authorizationDN) |
| | | public final void setAuthorizationDN(DN authorizationDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setAuthorizationDN", |
| | | String.valueOf(authorizationDN)); |
| | |
| | | * |
| | | * @return The set of attachments defined for this operation. |
| | | */ |
| | | public Map<String,Object> getAttachments() |
| | | public final Map<String,Object> getAttachments() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAttachments"); |
| | | |
| | |
| | | * @return The requested attachment object, or <CODE>null</CODE> if it does |
| | | * not exist. |
| | | */ |
| | | public Object getAttachment(String name) |
| | | public final Object getAttachment(String name) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAttachment", String.valueOf(name)); |
| | | |
| | |
| | | * @return The attachment that was removed, or <CODE>null</CODE> if it does |
| | | * not exist. |
| | | */ |
| | | public Object removeAttachment(String name) |
| | | public final Object removeAttachment(String name) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "removeAttachment", String.valueOf(name)); |
| | | |
| | |
| | | * @return The former value held by the attachment with the given name, or |
| | | * <CODE>null</CODE> if there was previously no such attachment. |
| | | */ |
| | | public Object setAttachment(String name, Object value) |
| | | public final Object setAttachment(String name, Object value) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "putAttachment", String.valueOf(name), |
| | | String.valueOf(value)); |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing started for this operation. |
| | | * |
| | | * @return The time that processing started for this operation. |
| | | */ |
| | | public abstract long getProcessingStartTime(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing stopped for this operation. This will |
| | | * actually hold a time immediately before the response was sent to the |
| | | * client. |
| | | * |
| | | * @return The time that processing stopped for this operation. |
| | | */ |
| | | public abstract long getProcessingStopTime(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the length of time in milliseconds that the server spent |
| | | * processing this operation. This should not be called until after the |
| | | * server has sent the response to the client. |
| | | * |
| | | * @return The length of time in milliseconds that the server spent |
| | | * processing this operation. |
| | | */ |
| | | public abstract long getProcessingTime(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Performs the work of actually processing this operation. This should |
| | | * include all processing for the operation, including invoking plugins, |
| | | * logging messages, performing access control, managing synchronization, and |
| | |
| | | * Indicates that processing on this operation has completed successfully and |
| | | * that the client should perform any associated cleanup work. |
| | | */ |
| | | public void operationCompleted() |
| | | public final void operationCompleted() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "operationCompleted"); |
| | | |
| | |
| | | |
| | | /** |
| | | * Retrieves the cancel request that has been issued for this operation, if |
| | | * there is one. |
| | | * there is one. This method should not be called by post-operation or |
| | | * post-response plugins. |
| | | * |
| | | * @return The cancel request that has been issued for this operation, or |
| | | * <CODE>null</CODE> if there has not been any request to cancel. |
| | |
| | | * <CODE>null</CODE> if the operation has not seen and reacted to a |
| | | * cancel request. |
| | | */ |
| | | public CancelResult getCancelResult() |
| | | public final CancelResult getCancelResult() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCancelResult"); |
| | | |
| | |
| | | * |
| | | * @param cancelResult The cancel result for this operation. |
| | | */ |
| | | public void setCancelResult(CancelResult cancelResult) |
| | | public final void setCancelResult(CancelResult cancelResult) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setCancelResult", |
| | | String.valueOf(cancelResult)); |
| | |
| | | * |
| | | * @param cancelRequest The request to cancel this operation. |
| | | */ |
| | | protected void indicateCancelled(CancelRequest cancelRequest) |
| | | protected final void indicateCancelled(CancelRequest cancelRequest) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "indicateCancelled", |
| | | String.valueOf(cancelRequest)); |
| | |
| | | * |
| | | * @return A string representation of this operation. |
| | | */ |
| | | public String toString() |
| | | public final String toString() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "toString"); |
| | | |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.ConditionResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DebugLogCategory; |
| | | import org.opends.server.types.DebugLogSeverity; |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.controls.EntryChangeNotificationControl; |
| | | import org.opends.server.controls.PersistentSearchChangeType; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.SearchFilter; |
| | |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.IntermediateResponse; |
| | | import org.opends.server.types.LDIFExportConfig; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | |
| | | import java.util.Iterator; |
| | | import java.util.NoSuchElementException; |
| | | |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ObjectClass; |
| | |
| | | import java.util.InputMismatchException; |
| | | import java.util.NoSuchElementException; |
| | | |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ResultCode; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.config.DNConfigAttribute; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DITContentRule; |
| | | import org.opends.server.types.DITStructureRule; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.types.MatchingRuleUse; |
| | | import org.opends.server.types.NameForm; |
| | | import org.opends.server.types.ObjectClass; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.Schema; |
| | | import org.opends.server.util.LDIFReader; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.CancelledOperationException; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DereferencePolicy; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.OperationType; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.SearchFilter; |
| | | import org.opends.server.types.SearchResultEntry; |
| | | import org.opends.server.types.SearchResultReference; |
| | | import org.opends.server.types.SearchScope; |
| | | import org.opends.server.types.operation.PostOperationSearchOperation; |
| | | import org.opends.server.types.operation.PostResponseSearchOperation; |
| | | import org.opends.server.types.operation.PreOperationSearchOperation; |
| | | import org.opends.server.types.operation.PreParseSearchOperation; |
| | | import org.opends.server.types.operation.SearchEntrySearchOperation; |
| | | import org.opends.server.types.operation.SearchReferenceSearchOperation; |
| | | import org.opends.server.util.TimeThread; |
| | | |
| | | import static org.opends.server.core.CoreConstants.*; |
| | |
| | | */ |
| | | public class SearchOperation |
| | | extends Operation |
| | | implements PreParseSearchOperation, PreOperationSearchOperation, |
| | | PostOperationSearchOperation, PostResponseSearchOperation, |
| | | SearchEntrySearchOperation, SearchReferenceSearchOperation |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | |
| | | this.timeLimit = timeLimit; |
| | | this.typesOnly = typesOnly; |
| | | this.rawFilter = rawFilter; |
| | | this.attributes = attributes; |
| | | |
| | | if (attributes == null) |
| | | { |
| | | this.attributes = new LinkedHashSet<String>(0); |
| | | } |
| | | else |
| | | { |
| | | this.attributes = attributes; |
| | | } |
| | | |
| | | |
| | | if (clientConnection.getSizeLimit() <= 0) |
| | |
| | | this.timeLimit = timeLimit; |
| | | this.typesOnly = typesOnly; |
| | | this.filter = filter; |
| | | this.attributes = attributes; |
| | | |
| | | if (attributes == null) |
| | | { |
| | | this.attributes = new LinkedHashSet<String>(0); |
| | | } |
| | | else |
| | | { |
| | | this.attributes = attributes; |
| | | } |
| | | |
| | | rawBaseDN = new ASN1OctetString(baseDN.toString()); |
| | | rawFilter = new LDAPFilter(filter); |
| | |
| | | * @return The raw, unprocessed base DN as included in the request from the |
| | | * client. |
| | | */ |
| | | public ByteString getRawBaseDN() |
| | | public final ByteString getRawBaseDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRawBaseDN"); |
| | | |
| | |
| | | |
| | | /** |
| | | * Specifies the raw, unprocessed base DN as included in the request from the |
| | | * client. This method should only be called by pre-parse plugins. Any other |
| | | * code that wishes to alter the base DN should use the <CODE>setBaseDN</CODE> |
| | | * method instead. |
| | | * client. This method should only be called by pre-parse plugins. |
| | | * |
| | | * @param rawBaseDN The raw, unprocessed base DN as included in the request |
| | | * from the client. |
| | | */ |
| | | public void setRawBaseDN(ByteString rawBaseDN) |
| | | public final void setRawBaseDN(ByteString rawBaseDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setRawBaseDN", String.valueOf(rawBaseDN)); |
| | | |
| | |
| | | * @return The base DN for this search operation, or <CODE>null</CODE> if the |
| | | * raw base DN has not yet been processed. |
| | | */ |
| | | public DN getBaseDN() |
| | | public final DN getBaseDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getBaseDN"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the base DN for this search operation. This should not be called |
| | | * by pre-parse plugins, which should use the <CODE>setRawBaseDN</CODE> method |
| | | * instead. |
| | | * Specifies the base DN for this search operation. This method is only |
| | | * intended for internal use. |
| | | * |
| | | * @param baseDN The base DN for this search operation. |
| | | */ |
| | | public void setBaseDN(DN baseDN) |
| | | public final void setBaseDN(DN baseDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setBaseDN", String.valueOf(baseDN)); |
| | | |
| | |
| | | * |
| | | * @return The scope for this search operation. |
| | | */ |
| | | public SearchScope getScope() |
| | | public final SearchScope getScope() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getScope"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the scope for this search operation. |
| | | * Specifies the scope for this search operation. This should only be called |
| | | * by pre-parse plugins. |
| | | * |
| | | * @param scope The scope for this search operation. |
| | | */ |
| | | public void setScope(SearchScope scope) |
| | | public final void setScope(SearchScope scope) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setScope", String.valueOf(scope)); |
| | | |
| | |
| | | * |
| | | * @return The alias dereferencing policy for this search operation. |
| | | */ |
| | | public DereferencePolicy getDerefPolicy() |
| | | public final DereferencePolicy getDerefPolicy() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDerefPolicy"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the alias dereferencing policy for this search operation. |
| | | * Specifies the alias dereferencing policy for this search operation. This |
| | | * should only be called by pre-parse plugins. |
| | | * |
| | | * @param derefPolicy The alias dereferencing policy for this search |
| | | * operation. |
| | | */ |
| | | public void setDerefPolicy(DereferencePolicy derefPolicy) |
| | | public final void setDerefPolicy(DereferencePolicy derefPolicy) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setDerefPolicy", |
| | | String.valueOf(derefPolicy)); |
| | |
| | | * |
| | | * @return The size limit for this search operation. |
| | | */ |
| | | public int getSizeLimit() |
| | | public final int getSizeLimit() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSizeLimit"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the size limit for this search operation. |
| | | * Specifies the size limit for this search operation. This should only be |
| | | * called by pre-parse plugins. |
| | | * |
| | | * @param sizeLimit The size limit for this search operation. |
| | | */ |
| | | public void setSizeLimit(int sizeLimit) |
| | | public final void setSizeLimit(int sizeLimit) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setSizeLimit", String.valueOf(sizeLimit)); |
| | | |
| | |
| | | * |
| | | * @return The time limit for this search operation. |
| | | */ |
| | | public int getTimeLimit() |
| | | public final int getTimeLimit() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getTimeLimit"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the time limit for this search operation. |
| | | * Specifies the time limit for this search operation. This should only be |
| | | * called by pre-parse plugins. |
| | | * |
| | | * @param timeLimit The time limit for this search operation. |
| | | */ |
| | | public void setTimeLimit(int timeLimit) |
| | | public final void setTimeLimit(int timeLimit) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setTimeLimit", String.valueOf(timeLimit)); |
| | | |
| | |
| | | * |
| | | * @return The typesOnly flag for this search operation. |
| | | */ |
| | | public boolean getTypesOnly() |
| | | public final boolean getTypesOnly() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getTypesOnly"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the typesOnly flag for this search operation. |
| | | * Specifies the typesOnly flag for this search operation. This should only |
| | | * be called by pre-parse plugins. |
| | | * |
| | | * @param typesOnly The typesOnly flag for this search operation. |
| | | */ |
| | | public void setTypesOnly(boolean typesOnly) |
| | | public final void setTypesOnly(boolean typesOnly) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setTypesOnly", String.valueOf(typesOnly)); |
| | | |
| | |
| | | * @return The raw, unprocessed search filter as included in the request from |
| | | * the client. |
| | | */ |
| | | public LDAPFilter getRawFilter() |
| | | public final LDAPFilter getRawFilter() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRawFilter"); |
| | | |
| | |
| | | /** |
| | | * Specifies the raw, unprocessed search filter as included in the request |
| | | * from the client. This method should only be called by pre-parse plugins. |
| | | * All later processing that wishes to change the filter should use the |
| | | * <CODE>setFilter</CODE> method instead. |
| | | * |
| | | * @param rawFilter The raw, unprocessed search filter as included in the |
| | | * request from the client. |
| | | */ |
| | | public void setRawFilter(LDAPFilter rawFilter) |
| | | public final void setRawFilter(LDAPFilter rawFilter) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setRawFilter", String.valueOf(rawFilter)); |
| | | |
| | |
| | | /** |
| | | * Retrieves the filter for this search operation. This should not be called |
| | | * by pre-parse plugins, because the raw filter will not yet have been |
| | | * processed. Instead, they should use the <CODE>getRawFilter</CODE> method. |
| | | * processed. |
| | | * |
| | | * @return The filter for this search operation, or <CODE>null</CODE> if the |
| | | * raw filter has not yet been processed. |
| | | */ |
| | | public SearchFilter getFilter() |
| | | public final SearchFilter getFilter() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getFilter"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Specifies the filter for this search operation. This should not be called |
| | | * by pre-parse plugins, which should instead use the |
| | | * <CODE>setRawFilter</CODE> method. |
| | | * Retrieves the set of requested attributes for this search operation. Its |
| | | * contents should not be be altered. |
| | | * |
| | | * @param filter The filter for this search operation. |
| | | * @return The set of requested attributes for this search operation. |
| | | */ |
| | | public void setFilter(SearchFilter filter) |
| | | public final LinkedHashSet<String> getAttributes() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setFilter", String.valueOf(filter)); |
| | | assert debugEnter(CLASS_NAME, "getAttributes"); |
| | | |
| | | this.filter = filter; |
| | | return attributes; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of requested attributes for this search operation. Its |
| | | * contents may be altered in pre-parse or pre-operation plugins. |
| | | * Specifies the set of requested attributes for this search operation. It |
| | | * should only be called by pre-parse plugins. |
| | | * |
| | | * @return The set of requested attributes for this search operation. |
| | | * @param attributes The set of requested attributes for this search |
| | | * operation. |
| | | */ |
| | | public LinkedHashSet<String> getAttributes() |
| | | public final void setAttributes(LinkedHashSet<String> attributes) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAttributes"); |
| | | assert debugEnter(CLASS_NAME, "setAttributes", |
| | | String.valueOf(attributes)); |
| | | |
| | | return attributes; |
| | | if (attributes == null) |
| | | { |
| | | this.attributes.clear(); |
| | | } |
| | | else |
| | | { |
| | | this.attributes = attributes; |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | * @return The number of entries sent to the client for this search |
| | | * operation. |
| | | */ |
| | | public int getEntriesSent() |
| | | public final int getEntriesSent() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getEntriesSent"); |
| | | |
| | |
| | | * @return The number of search references sent to the client for this search |
| | | * operation. |
| | | */ |
| | | public int getReferencesSent() |
| | | public final int getReferencesSent() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getReferencesSent"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing started for this operation. |
| | | * |
| | | * @return The time that processing started for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingStartTime() |
| | | @Override() |
| | | public final long getProcessingStartTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingStartTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing stopped for this operation. This will |
| | | * actually hold a time immediately before the response was sent to the |
| | | * client. |
| | | * |
| | | * @return The time that processing stopped for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingStopTime() |
| | | @Override() |
| | | public final long getProcessingStopTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingStopTime"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the length of time in milliseconds that the server spent |
| | | * processing this operation. This should not be called until after the |
| | | * server has sent the response to the client. |
| | | * |
| | | * @return The length of time in milliseconds that the server spent |
| | | * processing this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public long getProcessingTime() |
| | | @Override() |
| | | public final long getProcessingTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingTime"); |
| | | |
| | |
| | | * <CODE>false</CODE> if not for some reason (e.g., the size limit |
| | | * has been reached or the search has been abandoned). |
| | | */ |
| | | public boolean returnEntry(Entry entry, List<Control> controls) |
| | | public final boolean returnEntry(Entry entry, List<Control> controls) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "returnEntry", String.valueOf(entry)); |
| | | |
| | |
| | | * <CODE>false</CODE> if not for some reason (e.g., the size limit |
| | | * has been reached or the search has been abandoned). |
| | | */ |
| | | public boolean returnReference(SearchResultReference reference) |
| | | public final boolean returnReference(SearchResultReference reference) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "returnReference", String.valueOf(reference)); |
| | | |
| | |
| | | * message should have been set for this operation before this method is |
| | | * called. |
| | | */ |
| | | public void sendSearchResultDone() |
| | | public final void sendSearchResultDone() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "sendSearchResultDone"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the operation type for this operation. |
| | | * |
| | | * @return The operation type for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public OperationType getOperationType() |
| | | @Override() |
| | | public final OperationType getOperationType() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a standard set of elements that should be logged in requests for |
| | | * this type of operation. Each element in the array will itself be a |
| | | * two-element array in which the first element is the name of the field and |
| | | * the second is a string representation of the value, or <CODE>null</CODE> if |
| | | * there is no value for that field. |
| | | * |
| | | * @return A standard set of elements that should be logged in requests for |
| | | * this type of operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public String[][] getRequestLogElements() |
| | | @Override() |
| | | public final String[][] getRequestLogElements() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a standard set of elements that should be logged in responses for |
| | | * this type of operation. Each element in the array will itself be a |
| | | * two-element array in which the first element is the name of the field and |
| | | * the second is a string representation of the value, or <CODE>null</CODE> if |
| | | * there is no value for that field. |
| | | * |
| | | * @return A standard set of elements that should be logged in responses for |
| | | * this type of operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public String[][] getResponseLogElements() |
| | | @Override() |
| | | public final String[][] getResponseLogElements() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of controls to include in the response to the client. |
| | | * Note that the contents of this list should not be altered after |
| | | * post-operation plugins have been called. |
| | | * |
| | | * @return The set of controls to include in the response to the client. |
| | | * {@inheritDoc} |
| | | */ |
| | | public List<Control> getResponseControls() |
| | | @Override() |
| | | public final List<Control> getResponseControls() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getResponseControls"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Performs the work of actually processing this operation. This should |
| | | * include all processing for the operation, including invoking plugins, |
| | | * logging messages, performing access control, managing synchronization, and |
| | | * any other work that might need to be done in the course of processing. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void run() |
| | | @Override() |
| | | public final void addResponseControl(Control control) |
| | | { |
| | | responseControls.add(control); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public final void removeResponseControl(Control control) |
| | | { |
| | | responseControls.remove(control); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public final void run() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "run"); |
| | | |
| | |
| | | * to a request to cancel or abandon the |
| | | * search operation. |
| | | */ |
| | | private void searchBackend(Backend backend) |
| | | private final void searchBackend(Backend backend) |
| | | throws DirectoryException, CancelledOperationException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "searchBackend", String.valueOf(backend)); |
| | |
| | | |
| | | |
| | | /** |
| | | * Attempts to cancel this operation before processing has completed. |
| | | * |
| | | * @param cancelRequest Information about the way in which the operation |
| | | * should be canceled. |
| | | * |
| | | * @return A code providing information on the result of the cancellation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public CancelResult cancel(CancelRequest cancelRequest) |
| | | @Override() |
| | | public final CancelResult cancel(CancelRequest cancelRequest) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "cancel", String.valueOf(cancelRequest)); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the cancel request that has been issued for this operation, if |
| | | * there is one. |
| | | * |
| | | * @return The cancel request that has been issued for this operation, or |
| | | * <CODE>null</CODE> if there has not been any request to cancel. |
| | | * {@inheritDoc} |
| | | */ |
| | | public CancelRequest getCancelRequest() |
| | | @Override() |
| | | public final CancelRequest getCancelRequest() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCancelRequest"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Appends a string representation of this operation to the provided buffer. |
| | | * |
| | | * @param buffer The buffer into which a string representation of this |
| | | * operation should be appended. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void toString(StringBuilder buffer) |
| | | @Override() |
| | | public final void toString(StringBuilder buffer) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder"); |
| | | |
| | |
| | | import java.util.regex.Pattern; |
| | | |
| | | import org.opends.server.api.SubtreeSpecification; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.SearchFilter; |
| | | |
| | |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.extensions.NullTrustManagerProvider; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DisconnectReason; |
| | | import org.opends.server.types.OperationType; |
| | | import org.opends.server.types.operation.PostOperationUnbindOperation; |
| | | import org.opends.server.types.operation.PreParseUnbindOperation; |
| | | |
| | | import static org.opends.server.loggers.Access.*; |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | */ |
| | | public class UnbindOperation |
| | | extends Operation |
| | | implements PreParseUnbindOperation, PostOperationUnbindOperation |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | |
| | | |
| | | |
| | | |
| | | // The time that processing started on this operation. |
| | | private long processingStartTime; |
| | | |
| | | // The time that processing ended on this operation. |
| | | private long processingStopTime; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new unbind operation with the provided information. |
| | | * |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the operation type for this operation. |
| | | * |
| | | * @return The operation type for this operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public OperationType getOperationType() |
| | | @Override() |
| | | public final OperationType getOperationType() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a standard set of elements that should be logged in requests for |
| | | * this type of operation. Each element in the array will itself be a |
| | | * two-element array in which the first element is the name of the field and |
| | | * the second is a string representation of the value, or <CODE>null</CODE> if |
| | | * there is no value for that field. |
| | | * |
| | | * @return A standard set of elements that should be logged in requests for |
| | | * this type of operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public String[][] getRequestLogElements() |
| | | @Override() |
| | | public final String[][] getRequestLogElements() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a standard set of elements that should be logged in responses for |
| | | * this type of operation. Each element in the array will itself be a |
| | | * two-element array in which the first element is the name of the field and |
| | | * the second is a string representation of the value, or <CODE>null</CODE> if |
| | | * there is no value for that field. |
| | | * |
| | | * @return A standard set of elements that should be logged in responses for |
| | | * this type of operation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public String[][] getResponseLogElements() |
| | | @Override() |
| | | public final String[][] getResponseLogElements() |
| | | { |
| | | // Note that no debugging will be done in this method because it is a likely |
| | | // candidate for being called by the logging subsystem. |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of controls to include in the response to the client. |
| | | * Note that the contents of this list should not be altered after |
| | | * post-operation plugins have been called. Note that unbind operations |
| | | * must never have an associated response, so this method will not be used for |
| | | * this type of operation. |
| | | * |
| | | * @return The set of controls to include in the response to the client. |
| | | * {@inheritDoc} |
| | | */ |
| | | public List<Control> getResponseControls() |
| | | @Override() |
| | | public final List<Control> getResponseControls() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getResponseControls"); |
| | | |
| | | // An abandon operation can never have a response, so just return an empty |
| | | // An unbind operation can never have a response, so just return an empty |
| | | // list. |
| | | return NO_RESPONSE_CONTROLS; |
| | | } |
| | |
| | | |
| | | |
| | | /** |
| | | * Performs the work of actually processing this operation. This should |
| | | * include all processing for the operation, including invoking plugins, |
| | | * logging messages, performing access control, managing synchronization, and |
| | | * any other work that might need to be done in the course of processing. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void run() |
| | | @Override() |
| | | public final void addResponseControl(Control control) |
| | | { |
| | | // An unbind operation can never have a response, so just ignore this. |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public final void removeResponseControl(Control control) |
| | | { |
| | | // An unbind operation can never have a response, so just ignore this. |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public long getProcessingStartTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingStartTime"); |
| | | |
| | | return processingStartTime; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public long getProcessingStopTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingStopTime"); |
| | | |
| | | return processingStopTime; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public long getProcessingTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProcessingTime"); |
| | | |
| | | return (processingStopTime - processingStartTime); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public final void run() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "run"); |
| | | |
| | |
| | | DirectoryServer.getPluginConfigManager(); |
| | | boolean skipPostOperation = false; |
| | | |
| | | processingStartTime = System.currentTimeMillis(); |
| | | |
| | | |
| | | // Invoke the pre-parse unbind plugins. We don't care about the result |
| | | // since we're going to close the connection anyway. |
| | |
| | | |
| | | // Invoke the post-operation unbind plugins. |
| | | pluginConfigManager.invokePostOperationUnbindPlugins(this); |
| | | |
| | | processingStopTime = System.currentTimeMillis(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Attempts to cancel this operation before processing has completed. Note |
| | | * that an unbind operation may not be canceled, so this should never do |
| | | * anything. |
| | | * |
| | | * @param cancelRequest Information about the way in which the operation |
| | | * should be canceled. |
| | | * |
| | | * @return A code providing information on the result of the cancellation. |
| | | * {@inheritDoc} |
| | | */ |
| | | public CancelResult cancel(CancelRequest cancelRequest) |
| | | @Override() |
| | | public final CancelResult cancel(CancelRequest cancelRequest) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "cancel", String.valueOf(cancelRequest)); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the cancel request that has been issued for this operation, if |
| | | * there is one. Note that an unbind operation may not be canceled, so this |
| | | * will always return <CODE>null</CODE>. |
| | | * |
| | | * @return The cancel request that has been issued for this operation, or |
| | | * <CODE>null</CODE> if there has not been any request to cancel. |
| | | * {@inheritDoc} |
| | | */ |
| | | public CancelRequest getCancelRequest() |
| | | @Override() |
| | | public final CancelRequest getCancelRequest() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCancelRequest"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Appends a string representation of this operation to the provided buffer. |
| | | * |
| | | * @param buffer The buffer into which a string representation of this |
| | | * operation should be appended. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void toString(StringBuilder buffer) |
| | | @Override() |
| | | public final void toString(StringBuilder buffer) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder"); |
| | | |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.BindOperation; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.AuthenticationInfo; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.PasswordStorageScheme; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.Base64; |
| | | |
| | |
| | | import org.opends.server.api.TrustManagerProvider; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.config.DNConfigAttribute; |
| | | import org.opends.server.core.BindOperation; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.LockManager; |
| | | import org.opends.server.core.PasswordPolicyState; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AuthenticationInfo; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.api.ExtendedOperationHandler; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.CancelRequest; |
| | | import org.opends.server.core.CancelResult; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ExtendedOperation; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1Sequence; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.PasswordStorageScheme; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.extensions.ExtensionsConstants.*; |
| | |
| | | import org.opends.server.api.EntryCache; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LockType; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.config.DNConfigAttribute; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.BindOperation; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.LockManager; |
| | | import org.opends.server.core.PasswordPolicyState; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AuthenticationInfo; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DisconnectReason; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.Base64; |
| | | |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.config.MultiChoiceConfigAttribute; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.AccountStatusNotificationType; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.config.DNConfigAttribute; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.internal.InternalSearchOperation; |
| | |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DereferencePolicy; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.SearchResultEntry; |
| | | import org.opends.server.types.SearchScope; |
| | |
| | | import org.opends.server.config.MultiChoiceConfigAttribute; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.BindOperation; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.AuthenticationInfo; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.config.IntegerWithUnitConfigAttribute; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.LockManager; |
| | | import org.opends.server.types.CacheEntry; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.LockType; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.SearchFilter; |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.config.DNConfigAttribute; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.BindOperation; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.AuthenticationInfo; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.core.BindOperation; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AuthenticationInfo; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.api.ConnectionSecurityProvider; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.types.DirectoryException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | |
| | | import org.opends.server.config.JMXMBean; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.config.IntegerConfigAttribute; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.Operation; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.api.PasswordStorageScheme; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.Base64; |
| | | |
| | |
| | | import org.opends.server.api.ConnectionSecurityProvider; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DisconnectReason; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | |
| | | import org.opends.server.api.KeyManagerProvider; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | |
| | | import org.opends.server.api.TrustManagerProvider; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.config.DNConfigAttribute; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ExtendedOperation; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.LockManager; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.PasswordPolicyState; |
| | | import org.opends.server.protocols.asn1.ASN1Element; |
| | |
| | | import org.opends.server.types.AuthenticationInfo; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.Modification; |
| | | import org.opends.server.types.ModificationType; |
| | | import org.opends.server.types.ResultCode; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.config.DNConfigAttribute; |
| | | import org.opends.server.core.BindOperation; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.LockManager; |
| | | import org.opends.server.core.PasswordPolicyState; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AuthenticationInfo; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.NamedCharacterSet; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | |
| | | import org.opends.server.api.PasswordStorageScheme; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.Base64; |
| | | |
| | |
| | | import org.opends.server.api.PasswordStorageScheme; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.Base64; |
| | | |
| | |
| | | import org.opends.server.api.PasswordStorageScheme; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.Base64; |
| | | |
| | |
| | | import org.opends.server.api.PasswordStorageScheme; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.Base64; |
| | | |
| | |
| | | import org.opends.server.api.PasswordStorageScheme; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.Base64; |
| | | |
| | |
| | | import org.opends.server.api.PasswordStorageScheme; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.Base64; |
| | | |
| | |
| | | import org.opends.server.config.IntegerWithUnitConfigAttribute; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.LockManager; |
| | | import org.opends.server.types.CacheEntry; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.LockType; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.SearchFilter; |
| | |
| | | import org.opends.server.api.ExtendedOperationHandler; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ExtendedOperation; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DisconnectReason; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.CertificateMapper; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.LockManager; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | |
| | | |
| | | |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.Operation; |
| | | import org.opends.server.types.DirectoryException; |
| | | |
| | | |
| | | |
| | |
| | | import org.opends.server.api.TrustManagerProvider; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DisconnectReason; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.SSLClientAuthPolicy; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.config.IntegerConfigAttribute; |
| | | import org.opends.server.core.CancelRequest; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.Operation; |
| | | import org.opends.server.monitors.TraditionalWorkQueueMonitor; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | |
| | | |
| | | import org.opends.server.api.DirectoryThread; |
| | | import org.opends.server.core.CancelRequest; |
| | | import org.opends.server.core.CancelResult; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.Operation; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.DebugLogCategory; |
| | | import org.opends.server.types.DebugLogSeverity; |
| | | import org.opends.server.types.DisconnectReason; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ExtendedOperation; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AuthenticationInfo; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import java.util.logging.LogRecord; |
| | | |
| | | import org.opends.server.api.InvokableComponent; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.config.ConfigAttribute; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.InvokableMethod; |
| | | import org.opends.server.types.ResultCode; |
| | |
| | | |
| | | |
| | | /** |
| | | * The message ID for the message that will be used if an attempt is made to |
| | | * invoke a plugin for a plugin type that it does not support. This takes |
| | | * two arguments, which are the DN of the plugin configuration entry and the |
| | | * name of the unsupported plugin type. |
| | | */ |
| | | public static final int MSGID_PLUGIN_TYPE_NOT_SUPPORTED = |
| | | CATEGORY_MASK_PLUGIN | SEVERITY_MASK_SEVERE_ERROR | 67; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Associates a set of generic messages with the message IDs defined in this |
| | | * class. |
| | | */ |
| | |
| | | "An error occurred while attempting to encode a password " + |
| | | "value stored in attribute %s of user entry %s: %s. " + |
| | | "Password values for this user will not be encoded."); |
| | | |
| | | |
| | | registerMessage(MSGID_PLUGIN_TYPE_NOT_SUPPORTED, |
| | | "The plugin defined in configuration entry %s does not " + |
| | | "support the %s plugin type."); |
| | | } |
| | | } |
| | | |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import com.sleepycat.je.DatabaseException; |
| | | import com.sleepycat.je.Environment; |
| | |
| | | * @throws org.opends.server.config.ConfigException |
| | | * If an unrecoverable problem arises in the |
| | | * process of performing the initialization. |
| | | * @throws org.opends.server.core.InitializationException |
| | | * @throws org.opends.server.types.InitializationException |
| | | * If a problem occurs during initialization |
| | | * that is not related to the server |
| | | * configuration. |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.extensions.TraditionalWorkQueue; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.util.DynamicConstants; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.plugin.PreOperationPluginResult; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.types.operation.PreOperationAddOperation; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | |
| | | /** |
| | | * This class implements a Directory Server plugin that will add the entryUUID |
| | | * attribute to an entry whenever it is added or imported. |
| | | * attribute to an entry whenever it is added or imported as per RFC 4530. For |
| | | * entries added over LDAP, the entryUUID will be based on a semi-random UUID |
| | | * (which is still guaranteed to be unique). For entries imported from LDIF, |
| | | * the UUID will be constructed from the entry DN using a repeatable algorithm. |
| | | * This will ensure that LDIF files imported in parallel across multiple systems |
| | | * will have identical entryUUID values. |
| | | */ |
| | | public class EntryUUIDPlugin |
| | | public final class EntryUUIDPlugin |
| | | extends DirectoryServerPlugin |
| | | { |
| | | /** |
| | |
| | | |
| | | |
| | | // The attribute type for the "entryUUID" attribute. |
| | | private AttributeType entryUUIDType; |
| | | private final AttributeType entryUUIDType; |
| | | |
| | | |
| | | |
| | |
| | | super(); |
| | | |
| | | assert debugConstructor(CLASS_NAME); |
| | | |
| | | |
| | | // Get the entryUUID attribute type. This needs to be done in the |
| | | // constructor in order to make the associated variables "final". |
| | | AttributeType at = DirectoryServer.getAttributeType(ENTRYUUID); |
| | | if (at == null) |
| | | { |
| | | at = new AttributeType(ENTRYUUID, Collections.singleton(ENTRYUUID), |
| | | ENTRYUUID, null, null, |
| | | DirectoryServer.getDefaultAttributeSyntax(), |
| | | AttributeUsage.DIRECTORY_OPERATION, false, true, |
| | | false, true); |
| | | } |
| | | |
| | | entryUUIDType = at; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Performs any initialization necessary for this plugin. This will be called |
| | | * as soon as the plugin has been loaded and before it is registered with the |
| | | * server. |
| | | * |
| | | * @param directoryServer The reference to the Directory Server instance in |
| | | * which the plugin will be running. |
| | | * @param pluginTypes The set of plugin types that indicate the ways in |
| | | * which this plugin will be invoked. |
| | | * @param configEntry The entry containing the configuration information |
| | | * for this plugin. |
| | | * |
| | | * @throws ConfigException If the provided entry does not contain a valid |
| | | * configuration for this plugin. |
| | | * |
| | | * @throws InitializationException If a problem occurs while initializing |
| | | * the plugin that is not related to the |
| | | * server configuration. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void initializePlugin(DirectoryServer directoryServer, |
| | | Set<PluginType> pluginTypes, |
| | | ConfigEntry configEntry) |
| | | throws ConfigException, InitializationException |
| | | @Override() |
| | | public final void initializePlugin(DirectoryServer directoryServer, |
| | | Set<PluginType> pluginTypes, |
| | | ConfigEntry configEntry) |
| | | throws ConfigException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializePlugin", |
| | | String.valueOf(directoryServer), |
| | |
| | | throw new ConfigException(msgID, message); |
| | | } |
| | | } |
| | | |
| | | |
| | | // Get the entryUUID attribute type. |
| | | entryUUIDType = DirectoryServer.getAttributeType(ENTRYUUID); |
| | | if (entryUUIDType == null) |
| | | { |
| | | entryUUIDType = new AttributeType(ENTRYUUID, |
| | | Collections.singleton(ENTRYUUID), |
| | | ENTRYUUID, |
| | | null, |
| | | null, |
| | | DirectoryServer.getDefaultAttributeSyntax(), |
| | | AttributeUsage.DIRECTORY_OPERATION, |
| | | false, true, false, true); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Performs any necessary processing that should be done during an LDIF import |
| | | * operation immediately after reading an entry and confirming that it should |
| | | * be imported based on the provided configuration. |
| | | * |
| | | * @param importConfig The configuration used for the LDIF import. |
| | | * @param entry The entry that has been read to the LDIF file. |
| | | * |
| | | * @return The result of the plugin processing. |
| | | * {@inheritDoc} |
| | | */ |
| | | public LDIFPluginResult doLDIFImport(LDIFImportConfig importConfig, |
| | | Entry entry) |
| | | @Override() |
| | | public final LDIFPluginResult doLDIFImport(LDIFImportConfig importConfig, |
| | | Entry entry) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doLDIFImport", |
| | | String.valueOf(importConfig), String.valueOf(entry)); |
| | |
| | | |
| | | |
| | | /** |
| | | * Performs any necessary processing that should be done just before the |
| | | * Directory Server performs the core processing for an add operation. |
| | | * |
| | | * @param addOperation The add operation to be processed. |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | * {@inheritDoc} |
| | | */ |
| | | public PreOperationPluginResult doPreOperation(AddOperation addOperation) |
| | | @Override() |
| | | public final PreOperationPluginResult |
| | | doPreOperation(PreOperationAddOperation addOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreOperation", |
| | | String.valueOf(addOperation)); |
| | |
| | | uuidList = new ArrayList<Attribute>(1); |
| | | Attribute uuidAttr = new Attribute(entryUUIDType, "entryUUID", values); |
| | | uuidList.add(uuidAttr); |
| | | operationalAttributes.put(entryUUIDType, uuidList); |
| | | |
| | | |
| | | // We shouldn't ever need to return a non-success result. |
| | | // Add the attribute to the entry and return. |
| | | addOperation.setAttribute(entryUUIDType, uuidList); |
| | | return new PreOperationPluginResult(); |
| | | } |
| | | } |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.DebugLogCategory; |
| | | import org.opends.server.types.DebugLogSeverity; |
| | | import org.opends.server.types.ObjectClass; |
| | | import org.opends.server.types.operation.PreParseSearchOperation; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.PluginMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | /** |
| | | * This pre-parse plugin modifies the operation to allow an object class |
| | | * This pre-parse plugin modifies the operation to allow an object class |
| | | * identifier to be specified in attributes lists, such as in Search requests, |
| | | * to request the return all attributes belonging to an object class as per the |
| | | * specification in RFC 4529. The "@" character is used to distinguish an |
| | | * object class identifier from an attribute descriptions. |
| | | */ |
| | | public class LDAPADListPlugin |
| | | public final class LDAPADListPlugin |
| | | extends DirectoryServerPlugin |
| | | { |
| | | private static final String CLASS_NAME = |
| | |
| | | |
| | | |
| | | /** |
| | | * Performs any initialization necessary for this plugin. This will be called |
| | | * as soon as the plugin has been loaded and before it is registered with the |
| | | * server. |
| | | * |
| | | * @param directoryServer The reference to the Directory Server instance in |
| | | * which the plugin will be running. |
| | | * @param pluginTypes The set of plugin types that indicate the ways in |
| | | * which this plugin will be invoked. |
| | | * @param configEntry The entry containing the configuration information |
| | | * for this plugin. |
| | | * |
| | | * @throws ConfigException If the provided entry does not contain a valid |
| | | * configuration for this plugin. |
| | | * |
| | | * @throws InitializationException If a problem occurs while initializing |
| | | * the plugin that is not related to the |
| | | * server configuration. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void initializePlugin(DirectoryServer directoryServer, |
| | | Set<PluginType> pluginTypes, |
| | | ConfigEntry configEntry) |
| | | throws ConfigException, InitializationException |
| | | @Override() |
| | | public final void initializePlugin(DirectoryServer directoryServer, |
| | | Set<PluginType> pluginTypes, |
| | | ConfigEntry configEntry) |
| | | throws ConfigException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializePlugin", |
| | | String.valueOf(directoryServer), |
| | |
| | | |
| | | |
| | | /** |
| | | * Performs any necessary processing that should be done before the Directory |
| | | * Server parses the elements of a search request. |
| | | * |
| | | * @param searchOperation The search operation that has been requested. |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | * {@inheritDoc} |
| | | */ |
| | | public PreParsePluginResult doPreParse(SearchOperation searchOperation) |
| | | @Override() |
| | | public final PreParsePluginResult |
| | | doPreParse(PreParseSearchOperation searchOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreParseSearch", |
| | | String.valueOf(searchOperation)); |
| | | |
| | | |
| | | // Iterate through the requested attributes to see if any of them start with |
| | | // an "@" symbol. If not, then we don't need to do anything. If so, then |
| | | // keep track of them. |
| | | LinkedHashSet<String> attributes = searchOperation.getAttributes(); |
| | | |
| | | LinkedHashSet<String> objectClassList = new LinkedHashSet<String> (); |
| | | |
| | | // Create list of object classes that need to be replaced with attributes. |
| | | for(String attribute : attributes) |
| | | boolean foundOC = false; |
| | | for (String attrName : attributes) |
| | | { |
| | | // check if it starts with "@". If so add it to the list of object classes |
| | | if(attribute.startsWith("@")) |
| | | if (attrName.startsWith("@")) |
| | | { |
| | | objectClassList.add(attribute); |
| | | foundOC = true; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | // Iterate through list of object classes and replace with attributes. |
| | | for (String objectClass : objectClassList) |
| | | if (foundOC) |
| | | { |
| | | // find object class and get list of attributes. |
| | | ObjectClass objClass = DirectoryServer.getObjectClass( |
| | | objectClass.substring(1, objectClass.length())); |
| | | // remove the object class from the attribute list. |
| | | attributes.remove(objectClass); |
| | | |
| | | if(objClass == null) |
| | | LinkedHashSet<String> newAttrs = new LinkedHashSet<String>(); |
| | | for (String attrName : attributes) |
| | | { |
| | | // object class not found. |
| | | assert debugMessage(DebugLogCategory.PLUGIN, DebugLogSeverity.WARNING, |
| | | CLASS_NAME, "doPreSearch", |
| | | "Invalid object class: " + objectClass); |
| | | } else |
| | | { |
| | | Set<AttributeType> requiredAttributes = |
| | | objClass.getRequiredAttributeChain(); |
| | | Set<AttributeType> optionalAttributes = |
| | | objClass.getOptionalAttributeChain(); |
| | | |
| | | // remove attribute and replace with expanded list. |
| | | assert debugMessage(DebugLogCategory.PLUGIN, DebugLogSeverity.INFO, |
| | | CLASS_NAME, "doPreParse", |
| | | "Replacing object class " + |
| | | String.valueOf(objClass)); |
| | | for(AttributeType req : requiredAttributes) |
| | | if (attrName.startsWith("@")) |
| | | { |
| | | attributes.add(req.getNameOrOID()); |
| | | String lowerName = toLowerCase(attrName.substring(1)); |
| | | ObjectClass oc = DirectoryServer.getObjectClass(lowerName); |
| | | if (oc == null) |
| | | { |
| | | debugMessage(DebugLogCategory.PLUGIN, DebugLogSeverity.WARNING, |
| | | CLASS_NAME, "doPreParse", |
| | | "Cannot replace unknown objectclass " + lowerName); |
| | | } |
| | | else |
| | | { |
| | | debugMessage(DebugLogCategory.PLUGIN, DebugLogSeverity.INFO, |
| | | CLASS_NAME, "doPreParse", |
| | | "Replacing objectclass " + lowerName); |
| | | |
| | | for (AttributeType at : oc.getRequiredAttributeChain()) |
| | | { |
| | | newAttrs.add(at.getNameOrOID()); |
| | | } |
| | | |
| | | for (AttributeType at : oc.getOptionalAttributeChain()) |
| | | { |
| | | newAttrs.add(at.getNameOrOID()); |
| | | } |
| | | } |
| | | } |
| | | for(AttributeType opt : optionalAttributes) |
| | | else |
| | | { |
| | | attributes.add(opt.getNameOrOID()); |
| | | newAttrs.add(attrName); |
| | | } |
| | | } |
| | | |
| | | searchOperation.setAttributes(newAttrs); |
| | | } |
| | | |
| | | |
| | | return new PreParsePluginResult(); |
| | | } |
| | | } |
| | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashSet; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | import org.opends.server.api.plugin.DirectoryServerPlugin; |
| | |
| | | import org.opends.server.api.plugin.PreOperationPluginResult; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.Modification; |
| | | import org.opends.server.types.ModificationType; |
| | | import org.opends.server.types.operation.PreOperationAddOperation; |
| | | import org.opends.server.types.operation.PreOperationModifyOperation; |
| | | import org.opends.server.types.operation.PreOperationModifyDNOperation; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | * to the server, and will add the modifiersName and modifyTimestamp attributes |
| | | * whenever the entry is modified or renamed. |
| | | */ |
| | | public class LastModPlugin |
| | | public final class LastModPlugin |
| | | extends DirectoryServerPlugin |
| | | { |
| | | /** |
| | |
| | | |
| | | |
| | | // The attribute type for the "createTimestamp" attribute. |
| | | private AttributeType createTimestampType; |
| | | private final AttributeType createTimestampType; |
| | | |
| | | // The attribute type for the "creatorsName" attribute. |
| | | private AttributeType creatorsNameType; |
| | | private final AttributeType creatorsNameType; |
| | | |
| | | // The attribute type for the "modifiersName" attribute. |
| | | private AttributeType modifiersNameType; |
| | | private final AttributeType modifiersNameType; |
| | | |
| | | // The attribute type for the "modifyTimestamp" attribute. |
| | | private AttributeType modifyTimestampType; |
| | | private final AttributeType modifyTimestampType; |
| | | |
| | | |
| | | |
| | |
| | | super(); |
| | | |
| | | assert debugConstructor(CLASS_NAME); |
| | | |
| | | |
| | | // Get the attribute types for the attributes that we will use. This needs |
| | | // to be done in the constructor in order to make the associated variables |
| | | // "final". |
| | | createTimestampType = |
| | | DirectoryServer.getAttributeType(OP_ATTR_CREATE_TIMESTAMP_LC, true); |
| | | creatorsNameType = |
| | | DirectoryServer.getAttributeType(OP_ATTR_CREATORS_NAME_LC, true); |
| | | modifiersNameType = |
| | | DirectoryServer.getAttributeType(OP_ATTR_MODIFIERS_NAME_LC, true); |
| | | modifyTimestampType = |
| | | DirectoryServer.getAttributeType(OP_ATTR_MODIFY_TIMESTAMP_LC, true); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Performs any initialization necessary for this plugin. This will be called |
| | | * as soon as the plugin has been loaded and before it is registered with the |
| | | * server. |
| | | * |
| | | * @param directoryServer The reference to the Directory Server instance in |
| | | * which the plugin will be running. |
| | | * @param pluginTypes The set of plugin types that indicate the ways in |
| | | * which this plugin will be invoked. |
| | | * @param configEntry The entry containing the configuration information |
| | | * for this plugin. |
| | | * |
| | | * @throws ConfigException If the provided entry does not contain a valid |
| | | * configuration for this plugin. |
| | | * |
| | | * @throws InitializationException If a problem occurs while initializing |
| | | * the plugin that is not related to the |
| | | * server configuration. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void initializePlugin(DirectoryServer directoryServer, |
| | | Set<PluginType> pluginTypes, |
| | | ConfigEntry configEntry) |
| | | throws ConfigException, InitializationException |
| | | @Override() |
| | | public final void initializePlugin(DirectoryServer directoryServer, |
| | | Set<PluginType> pluginTypes, |
| | | ConfigEntry configEntry) |
| | | throws ConfigException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializePlugin", |
| | | String.valueOf(directoryServer), |
| | |
| | | throw new ConfigException(msgID, message); |
| | | } |
| | | } |
| | | |
| | | |
| | | // Get the attribute types for the attributes that we will use. |
| | | createTimestampType = |
| | | DirectoryServer.getAttributeType(OP_ATTR_CREATE_TIMESTAMP_LC); |
| | | if (createTimestampType == null) |
| | | { |
| | | createTimestampType = |
| | | DirectoryServer.getDefaultAttributeType(OP_ATTR_CREATE_TIMESTAMP); |
| | | } |
| | | |
| | | creatorsNameType = |
| | | DirectoryServer.getAttributeType(OP_ATTR_CREATORS_NAME_LC); |
| | | if (creatorsNameType == null) |
| | | { |
| | | creatorsNameType = |
| | | DirectoryServer.getDefaultAttributeType(OP_ATTR_CREATORS_NAME); |
| | | } |
| | | |
| | | modifiersNameType = |
| | | DirectoryServer.getAttributeType(OP_ATTR_MODIFIERS_NAME_LC); |
| | | if (modifiersNameType == null) |
| | | { |
| | | modifiersNameType = |
| | | DirectoryServer.getDefaultAttributeType(OP_ATTR_MODIFIERS_NAME); |
| | | } |
| | | |
| | | modifyTimestampType = |
| | | DirectoryServer.getAttributeType(OP_ATTR_MODIFY_TIMESTAMP_LC); |
| | | if (modifyTimestampType == null) |
| | | { |
| | | modifyTimestampType = |
| | | DirectoryServer.getDefaultAttributeType(OP_ATTR_MODIFY_TIMESTAMP); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Performs any necessary processing that should be done just before the |
| | | * Directory Server performs the core processing for an add operation. |
| | | * |
| | | * @param addOperation The add operation to be processed. |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | * {@inheritDoc} |
| | | */ |
| | | public PreOperationPluginResult doPreOperation(AddOperation addOperation) |
| | | @Override() |
| | | public final PreOperationPluginResult |
| | | doPreOperation(PreOperationAddOperation addOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreOperation", |
| | | String.valueOf(addOperation)); |
| | | |
| | | |
| | | // Get the set of operational attributes for the add operation. |
| | | Map<AttributeType,List<Attribute>> operationalAttrs = |
| | | addOperation.getOperationalAttributes(); |
| | | |
| | | |
| | | // Create the attribute list for the creatorsName attribute, if appropriate. |
| | | DN creatorDN = addOperation.getAuthorizationDN(); |
| | | LinkedHashSet<AttributeValue> nameValues = |
| | |
| | | nameValues); |
| | | ArrayList<Attribute> nameList = new ArrayList<Attribute>(1); |
| | | nameList.add(nameAttr); |
| | | operationalAttrs.put(creatorsNameType, nameList); |
| | | addOperation.setAttribute(creatorsNameType, nameList); |
| | | |
| | | |
| | | // Create the attribute list for the createTimestamp attribute. |
| | |
| | | OP_ATTR_CREATE_TIMESTAMP, timeValues); |
| | | ArrayList<Attribute> timeList = new ArrayList<Attribute>(1); |
| | | timeList.add(timeAttr); |
| | | operationalAttrs.put(createTimestampType, timeList); |
| | | addOperation.setAttribute(createTimestampType, timeList); |
| | | |
| | | |
| | | // We shouldn't ever need to return a non-success result. |
| | |
| | | |
| | | |
| | | /** |
| | | * Performs any necessary processing that should be done just before the |
| | | * Directory Server performs the core processing for a modify operation. |
| | | * |
| | | * @param modifyOperation The modify operation to be processed. |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | * {@inheritDoc} |
| | | */ |
| | | public PreOperationPluginResult doPreOperation(ModifyOperation |
| | | modifyOperation) |
| | | @Override() |
| | | public final PreOperationPluginResult |
| | | doPreOperation(PreOperationModifyOperation modifyOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreOperation", |
| | | String.valueOf(modifyOperation)); |
| | | |
| | | |
| | | // Get the set of modifications for this operation. Also get the modified |
| | | // entry. We need to make sure that both get updated appropriately. |
| | | List<Modification> mods = modifyOperation.getModifications(); |
| | | Entry modifiedEntry = modifyOperation.getModifiedEntry(); |
| | | |
| | | |
| | | // Create the modifiersName attribute. |
| | | DN modifierDN = modifyOperation.getAuthorizationDN(); |
| | | LinkedHashSet<AttributeValue> nameValues = |
| | |
| | | } |
| | | Attribute nameAttr = new Attribute(modifiersNameType, |
| | | OP_ATTR_MODIFIERS_NAME, nameValues); |
| | | mods.add(new Modification(ModificationType.REPLACE, nameAttr)); |
| | | try |
| | | { |
| | | modifyOperation.addModification(new Modification(ModificationType.REPLACE, |
| | | nameAttr)); |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | assert debugException(CLASS_NAME, "doPreOperation", de); |
| | | |
| | | ArrayList<Attribute> nameList = new ArrayList<Attribute>(1); |
| | | nameList.add(nameAttr); |
| | | modifiedEntry.putAttribute(modifiersNameType, nameList); |
| | | // This should never happen. |
| | | modifyOperation.setResultCode(DirectoryServer.getServerErrorResultCode()); |
| | | modifyOperation.appendErrorMessage(de.getErrorMessage()); |
| | | return new PreOperationPluginResult(false, false, true); |
| | | } |
| | | |
| | | |
| | | // Create the modifyTimestamp attribute. |
| | |
| | | |
| | | Attribute timeAttr = new Attribute(modifyTimestampType, |
| | | OP_ATTR_MODIFY_TIMESTAMP, timeValues); |
| | | mods.add(new Modification(ModificationType.REPLACE, timeAttr)); |
| | | try |
| | | { |
| | | modifyOperation.addModification(new Modification(ModificationType.REPLACE, |
| | | timeAttr)); |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | assert debugException(CLASS_NAME, "doPreOperation", de); |
| | | |
| | | ArrayList<Attribute> timeList = new ArrayList<Attribute>(1); |
| | | timeList.add(timeAttr); |
| | | modifiedEntry.putAttribute(modifyTimestampType, timeList); |
| | | // This should never happen. |
| | | modifyOperation.setResultCode(DirectoryServer.getServerErrorResultCode()); |
| | | modifyOperation.appendErrorMessage(de.getErrorMessage()); |
| | | return new PreOperationPluginResult(false, false, true); |
| | | } |
| | | |
| | | |
| | | // We shouldn't ever need to return a non-success result. |
| | |
| | | |
| | | |
| | | /** |
| | | * Performs any necessary processing that should be done just before the |
| | | * Directory Server performs the core processing for a modify DN operation. |
| | | * |
| | | * @param modifyDNOperation The modify DN operation to be processed. |
| | | * |
| | | * @return Information about the result of the plugin processing. |
| | | * {@inheritDoc} |
| | | */ |
| | | public PreOperationPluginResult doPreOperation(ModifyDNOperation |
| | | modifyDNOperation) |
| | | @Override() |
| | | public final PreOperationPluginResult |
| | | doPreOperation(PreOperationModifyDNOperation modifyDNOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doPreOperation", |
| | | String.valueOf(modifyDNOperation)); |
| | | |
| | | |
| | | // Get the set of modifications for this operation. |
| | | List<Modification> mods = modifyDNOperation.getModifications(); |
| | | |
| | | |
| | | // Create the modifiersName attribute. |
| | | DN modifierDN = modifyDNOperation.getAuthorizationDN(); |
| | | LinkedHashSet<AttributeValue> nameValues = |
| | |
| | | } |
| | | Attribute nameAttr = new Attribute(modifiersNameType, |
| | | OP_ATTR_MODIFIERS_NAME, nameValues); |
| | | mods.add(new Modification(ModificationType.REPLACE, nameAttr)); |
| | | modifyDNOperation.addModification(new Modification(ModificationType.REPLACE, |
| | | nameAttr)); |
| | | |
| | | |
| | | // Create the modifyTimestamp attribute. |
| | |
| | | |
| | | Attribute timeAttr = new Attribute(modifyTimestampType, |
| | | OP_ATTR_MODIFY_TIMESTAMP, timeValues); |
| | | mods.add(new Modification(ModificationType.REPLACE, timeAttr)); |
| | | modifyDNOperation.addModification(new Modification(ModificationType.REPLACE, |
| | | timeAttr)); |
| | | |
| | | |
| | | // We shouldn't ever need to return a non-success result. |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.PasswordPolicy; |
| | | import org.opends.server.schema.AuthPasswordSyntax; |
| | | import org.opends.server.schema.UserPasswordSyntax; |
| | |
| | | * password policy processing during an LDIF import. In particular, it ensures |
| | | * that all of the password values are properly encoded before they are stored. |
| | | */ |
| | | public class PasswordPolicyImportPlugin |
| | | public final class PasswordPolicyImportPlugin |
| | | extends DirectoryServerPlugin |
| | | { |
| | | /** |
| | |
| | | |
| | | |
| | | // The sets of password storage schemes for the auth password attributes. |
| | | private HashMap<AttributeType,PasswordStorageScheme[]> authPasswordSchemes; |
| | | private final HashMap<AttributeType,PasswordStorageScheme[]> |
| | | authPasswordSchemes; |
| | | |
| | | // The sets of password storage schemes for the user password attributes. |
| | | private HashMap<AttributeType,PasswordStorageScheme[]> userPasswordSchemes; |
| | | private final HashMap<AttributeType,PasswordStorageScheme[]> |
| | | userPasswordSchemes; |
| | | |
| | | |
| | | |
| | |
| | | super(); |
| | | |
| | | assert debugConstructor(CLASS_NAME); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Performs any initialization necessary for this plugin. This will be called |
| | | * as soon as the plugin has been loaded and before it is registered with the |
| | | * server. |
| | | * |
| | | * @param directoryServer The reference to the Directory Server instance in |
| | | * which the plugin will be running. |
| | | * @param pluginTypes The set of plugin types that indicate the ways in |
| | | * which this plugin will be invoked. |
| | | * @param configEntry The entry containing the configuration information |
| | | * for this plugin. |
| | | * |
| | | * @throws ConfigException If the provided entry does not contain a valid |
| | | * configuration for this plugin. |
| | | * |
| | | * @throws InitializationException If a problem occurs while initializing |
| | | * the plugin that is not related to the |
| | | * server configuration. |
| | | */ |
| | | public void initializePlugin(DirectoryServer directoryServer, |
| | | Set<PluginType> pluginTypes, |
| | | ConfigEntry configEntry) |
| | | throws ConfigException, InitializationException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializePlugin", |
| | | String.valueOf(directoryServer), |
| | | String.valueOf(pluginTypes), |
| | | String.valueOf(configEntry)); |
| | | |
| | | |
| | | // Make sure that the plugin has been enabled for the appropriate types. |
| | | for (PluginType t : pluginTypes) |
| | | { |
| | | switch (t) |
| | | { |
| | | case LDIF_IMPORT: |
| | | // This is the only acceptable type. |
| | | break; |
| | | |
| | | |
| | | default: |
| | | int msgID = MSGID_PLUGIN_PWPIMPORT_INVALID_PLUGIN_TYPE; |
| | | String message = getMessage(msgID, t.toString()); |
| | | throw new ConfigException(msgID, message); |
| | | } |
| | | } |
| | | |
| | | |
| | | // Get the password policies from the Directory Server configuration. |
| | | // Get the password policies from the Directory Server configuration. This |
| | | // is done in the constructor to allow the instance variables to be declared |
| | | // "final". |
| | | authPasswordSchemes = new HashMap<AttributeType,PasswordStorageScheme[]>(); |
| | | userPasswordSchemes = new HashMap<AttributeType,PasswordStorageScheme[]>(); |
| | | for (PasswordPolicy p : DirectoryServer.getPasswordPolicies().values()) |
| | |
| | | |
| | | |
| | | /** |
| | | * Performs any necessary processing that should be done during an LDIF import |
| | | * operation immediately after reading an entry and confirming that it should |
| | | * be imported based on the provided configuration. |
| | | * |
| | | * @param importConfig The configuration used for the LDIF import. |
| | | * @param entry The entry that has been read to the LDIF file. |
| | | * |
| | | * @return The result of the plugin processing. |
| | | * {@inheritDoc} |
| | | */ |
| | | public LDIFPluginResult doLDIFImport(LDIFImportConfig importConfig, |
| | | Entry entry) |
| | | @Override() |
| | | public final void initializePlugin(DirectoryServer directoryServer, |
| | | Set<PluginType> pluginTypes, |
| | | ConfigEntry configEntry) |
| | | throws ConfigException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializePlugin", |
| | | String.valueOf(directoryServer), |
| | | String.valueOf(pluginTypes), |
| | | String.valueOf(configEntry)); |
| | | |
| | | |
| | | // Make sure that the plugin has been enabled for the appropriate types. |
| | | for (PluginType t : pluginTypes) |
| | | { |
| | | switch (t) |
| | | { |
| | | case LDIF_IMPORT: |
| | | // This is the only acceptable type. |
| | | break; |
| | | |
| | | |
| | | default: |
| | | int msgID = MSGID_PLUGIN_PWPIMPORT_INVALID_PLUGIN_TYPE; |
| | | String message = getMessage(msgID, t.toString()); |
| | | throw new ConfigException(msgID, message); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public final LDIFPluginResult doLDIFImport(LDIFImportConfig importConfig, |
| | | Entry entry) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doLDIFImport", |
| | | String.valueOf(importConfig), String.valueOf(entry)); |
| | |
| | | import org.opends.server.config.ReadOnlyConfigAttribute; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | |
| | | * can be analyzed to see where the server is spending all of its processing |
| | | * time. |
| | | */ |
| | | public class ProfilerPlugin |
| | | public final class ProfilerPlugin |
| | | extends DirectoryServerPlugin |
| | | implements ConfigurableComponent |
| | | { |
| | |
| | | |
| | | |
| | | /** |
| | | * Performs any initialization necessary for this plugin. This will be called |
| | | * as soon as the plugin has been loaded and before it is registered with the |
| | | * server. |
| | | * |
| | | * @param directoryServer The reference to the Directory Server instance in |
| | | * which the plugin will be running. |
| | | * @param pluginTypes The set of plugin types that indicate the ways in |
| | | * which this plugin will be invoked. |
| | | * @param configEntry The entry containing the configuration information |
| | | * for this plugin. |
| | | * |
| | | * @throws ConfigException If the provided entry does not contain a valid |
| | | * configuration for this plugin. |
| | | * |
| | | * @throws InitializationException If a problem occurs while initializing |
| | | * the plugin that is not related to the |
| | | * server configuration. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void initializePlugin(DirectoryServer directoryServer, |
| | | @Override() |
| | | public final void initializePlugin(DirectoryServer directoryServer, |
| | | Set<PluginType> pluginTypes, |
| | | ConfigEntry configEntry) |
| | | throws ConfigException, InitializationException |
| | | throws ConfigException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializePlugin", |
| | | String.valueOf(directoryServer), |
| | |
| | | |
| | | |
| | | /** |
| | | * Performs any necessary finalization for this plugin. This will be called |
| | | * just after the plugin has been deregistered with the server but before it |
| | | * has been unloaded. |
| | | * {@inheritDoc} |
| | | */ |
| | | public void finalizePlugin() |
| | | @Override() |
| | | public final void finalizePlugin() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "finalizePlugin"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Performs any processing that should be done when the Directory Server is in |
| | | * the process of starting. This method will be called after virtually all |
| | | * initialization has been performed but before other plugins have before the |
| | | * connection handlers are started. |
| | | * |
| | | * @return The result of the startup plugin processing. |
| | | * {@inheritDoc} |
| | | */ |
| | | public StartupPluginResult doStartup() |
| | | @Override() |
| | | public final StartupPluginResult doStartup() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "doStartup"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DN of the configuration entry with which this component is |
| | | * associated. |
| | | * |
| | | * @return The DN of the configuration entry with which this component is |
| | | * associated. |
| | | * {@inheritDoc} |
| | | */ |
| | | public DN getConfigurableComponentEntryDN() |
| | | public final DN getConfigurableComponentEntryDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of configuration attributes that are associated with this |
| | | * configurable component. |
| | | * |
| | | * @return The set of configuration attributes that are associated with this |
| | | * configurable component. |
| | | * {@inheritDoc} |
| | | */ |
| | | public List<ConfigAttribute> getConfigurationAttributes() |
| | | public final List<ConfigAttribute> getConfigurationAttributes() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getConfigurationAttributes"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided configuration entry has an acceptable |
| | | * configuration for this component. If it does not, then detailed |
| | | * information about the problem(s) should be added to the provided list. |
| | | * |
| | | * @param configEntry The configuration entry for which to make the |
| | | * determination. |
| | | * @param unacceptableReasons A list that can be used to hold messages about |
| | | * why the provided entry does not have an |
| | | * acceptable configuration. |
| | | * |
| | | * @return <CODE>true</CODE> if the provided entry has an acceptable |
| | | * configuration for this component, or <CODE>false</CODE> if not. |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean hasAcceptableConfiguration(ConfigEntry configEntry, |
| | | List<String> unacceptableReasons) |
| | | public final boolean hasAcceptableConfiguration(ConfigEntry configEntry, |
| | | List<String> unacceptableReasons) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration", |
| | | String.valueOf(configEntry), "java.lang.List<String>"); |
| | |
| | | |
| | | |
| | | /** |
| | | * Makes a best-effort attempt to apply the configuration contained in the |
| | | * provided entry. Information about the result of this processing should be |
| | | * added to the provided message list. Information should always be added to |
| | | * this list if a configuration change could not be applied. If detailed |
| | | * results are requested, then information about the changes applied |
| | | * successfully (and optionally about parameters that were not changed) should |
| | | * also be included. |
| | | * |
| | | * @param configEntry The entry containing the new configuration to |
| | | * apply for this component. |
| | | * @param detailedResults Indicates whether detailed information about the |
| | | * processing should be added to the list. |
| | | * |
| | | * @return Information about the result of the configuration update. |
| | | * {@inheritDoc} |
| | | */ |
| | | public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry, |
| | | boolean detailedResults) |
| | | public final ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry, |
| | | boolean detailedResults) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "applyNewConfiguration", |
| | | String.valueOf(configEntry), |
| | |
| | | import org.opends.server.api.ConnectionSecurityProvider; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.BindOperation; |
| | | import org.opends.server.core.CancelRequest; |
| | | import org.opends.server.core.CancelResult; |
| | | import org.opends.server.core.CompareOperation; |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.ExtendedOperation; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AuthenticationInfo; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DereferencePolicy; |
| | | import org.opends.server.types.DisconnectReason; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.IntermediateResponse; |
| | | import org.opends.server.types.Modification; |
| | |
| | | |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.api.ConnectionHandler; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | |
| | | import org.opends.server.config.IntegerConfigAttribute; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | /** |
| | |
| | | import org.opends.server.core.AbandonOperation; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.BindOperation; |
| | | import org.opends.server.core.CancelRequest; |
| | | import org.opends.server.core.CancelResult; |
| | | import org.opends.server.core.CompareOperation; |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ExtendedOperation; |
| | | import org.opends.server.core.ModifyOperation; |
| | |
| | | import org.opends.server.protocols.asn1.ASN1Element; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.protocols.asn1.ASN1Sequence; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DisconnectReason; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | |
| | | import org.opends.server.api.ConnectionSecurityProvider; |
| | | import org.opends.server.api.plugin.PostConnectPluginResult; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.PluginConfigManager; |
| | | import org.opends.server.config.BooleanConfigAttribute; |
| | | import org.opends.server.config.ConfigAttribute; |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.SSLClientAuthPolicy; |
| | | |
| | |
| | | import org.opends.server.api.DirectoryThread; |
| | | import org.opends.server.api.ServerShutdownListener; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.loggers.Error.*; |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.AbsoluteSubtreeSpecification; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.Schema; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeUsage; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.Schema; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.loggers.Error.*; |
| | |
| | | import org.opends.server.api.PasswordStorageScheme; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.ConditionResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.loggers.Error.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.ResultCode; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.ResultCode; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.ResultCode; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.Schema; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DITContentRule; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.ObjectClass; |
| | | import org.opends.server.types.ObjectClassType; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.Schema; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.loggers.Error.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.Schema; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DITStructureRule; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.NameForm; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.Schema; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.loggers.Error.*; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | import org.opends.server.config.ConfigAttribute; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AcceptRejectWarn; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AcceptRejectWarn; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AcceptRejectWarn; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.ResultCode; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.ResultCode; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.ResultCode; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.ResultCode; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.Schema; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.MatchingRuleUse; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.Schema; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.loggers.Error.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.Schema; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.NameForm; |
| | | import org.opends.server.types.ObjectClass; |
| | | import org.opends.server.types.ObjectClassType; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.Schema; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.loggers.Error.*; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.Schema; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.ObjectClass; |
| | | import org.opends.server.types.ObjectClassType; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.Schema; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.loggers.Error.*; |
| | |
| | | import org.opends.server.api.MatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types. AttributeType; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.NameForm; |
| | | import org.opends.server.types.ObjectClass; |
| | | import org.opends.server.types.ResultCode; |
| | |
| | | import org.opends.server.api.MatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.NameForm; |
| | | import org.opends.server.types.ObjectClass; |
| | | |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.RFC3672SubtreeSpecification; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.RelativeSubtreeSpecification; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.ResultCode; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import org.opends.server.api.PasswordStorageScheme; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.ConditionResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.ResultCode; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.zip.DataFormatException; |
| | | |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.core.DirectoryException; |
| | | |
| | | /** |
| | | * Message sent by a changelog server to another changelog server at Startup. |
| | |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | |
| | | import java.net.UnknownHostException; |
| | | import java.util.zip.DataFormatException; |
| | | |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.core.DirectoryException; |
| | | |
| | | /** |
| | | * This message is used by LDAP server when they first connect. |
| | |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.DereferencePolicy; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.ModificationType; |
| | |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.ModifyOperation; |
| | |
| | | import org.opends.server.protocols.internal.InternalSearchOperation; |
| | | import org.opends.server.protocols.ldap.LDAPException; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DereferencePolicy; |
| | | import org.opends.server.types.Entry; |
| | |
| | | |
| | | import org.opends.server.backends.task.Task; |
| | | import org.opends.server.backends.task.TaskState; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.LockFileManager; |
| | | import org.opends.server.api.Backend; |
| | |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.BackupConfig; |
| | | import org.opends.server.types.BackupDirectory; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | |
| | | import static org.opends.server.loggers.Error.logError; |
| | | import org.opends.server.backends.task.Task; |
| | | import org.opends.server.backends.task.TaskState; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.LockFileManager; |
| | | import org.opends.server.api.Backend; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | |
| | | |
| | | import org.opends.server.backends.task.Task; |
| | | import org.opends.server.backends.task.TaskState; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.LockFileManager; |
| | | import org.opends.server.api.Backend; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | |
| | | |
| | | import org.opends.server.backends.task.Task; |
| | | import org.opends.server.backends.task.TaskState; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.LockFileManager; |
| | | import org.opends.server.api.Backend; |
| | |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.BackupDirectory; |
| | | import org.opends.server.types.BackupInfo; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | |
| | | |
| | | import org.opends.server.backends.task.Task; |
| | | import org.opends.server.backends.task.TaskState; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.Entry; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.loggers.Error; |
| | | import org.opends.server.messages.TaskMessages; |
| | |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | |
| | | import org.opends.server.config.DNConfigAttribute; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.CoreConfigManager; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.LockFileManager; |
| | | import org.opends.server.loggers.StartupErrorLogger; |
| | | import org.opends.server.types.BackupConfig; |
| | | import org.opends.server.types.BackupDirectory; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.util.args.ArgumentException; |
| | | import org.opends.server.util.args.ArgumentParser; |
| | | import org.opends.server.util.args.BooleanArgument; |
| | |
| | | import org.opends.server.config.DNConfigAttribute; |
| | | import org.opends.server.config.IntegerConfigAttribute; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.LockFileManager; |
| | | import org.opends.server.extensions.SaltedSHA512PasswordStorageScheme; |
| | | import org.opends.server.protocols.ldap.LDAPResultCode; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.util.args.ArgumentException; |
| | | import org.opends.server.util.args.ArgumentParser; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.config.ConfigFileHandler; |
| | | import org.opends.server.core.CoreConfigManager; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.PasswordStorageSchemeConfigManager; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.schema.AuthPasswordSyntax; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.util.args.ArgumentException; |
| | | import org.opends.server.util.args.ArgumentParser; |
| | | import org.opends.server.util.args.BooleanArgument; |
| | |
| | | import org.opends.server.config.DNConfigAttribute; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.CoreConfigManager; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.LockFileManager; |
| | | import org.opends.server.loggers.StartupErrorLogger; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.ExistingFileBehavior; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LDIFExportConfig; |
| | | import org.opends.server.types.SearchFilter; |
| | | import org.opends.server.util.args.ArgumentException; |
| | |
| | | import org.opends.server.config.DNConfigAttribute; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.CoreConfigManager; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.LockFileManager; |
| | | import org.opends.server.loggers.StartupErrorLogger; |
| | | import org.opends.server.tools.makeldif.TemplateFile; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.ExistingFileBehavior; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.types.SearchFilter; |
| | | import org.opends.server.util.args.ArgumentException; |
| | |
| | | import java.util.Map; |
| | | |
| | | import org.opends.server.config.ConfigFileHandler; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.protocols.ldap.LDAPException; |
| | | import org.opends.server.protocols.ldap.LDAPModification; |
| | |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ExistingFileBehavior; |
| | |
| | | import org.opends.server.config.DNConfigAttribute; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.CoreConfigManager; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.LockFileManager; |
| | | import org.opends.server.loggers.StartupErrorLogger; |
| | | import org.opends.server.types.BackupDirectory; |
| | | import org.opends.server.types.BackupInfo; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.RestoreConfig; |
| | | import org.opends.server.util.args.ArgumentException; |
| | | import org.opends.server.util.args.ArgumentParser; |
| | |
| | | import org.opends.server.config.DNConfigAttribute; |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.core.CoreConfigManager; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.core.LockFileManager; |
| | | import org.opends.server.loggers.StartupErrorLogger; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.util.args.ArgumentException; |
| | | import org.opends.server.util.args.ArgumentParser; |
| | | import org.opends.server.util.args.BooleanArgument; |
| | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ToolMessages.*; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.RDN; |
| | | |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ToolMessages.*; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ToolMessages.*; |
| | |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ToolMessages.*; |
| | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ToolMessages.*; |
| | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ToolMessages.*; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ToolMessages.*; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ToolMessages.*; |
| | |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ToolMessages.*; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ToolMessages.*; |
| | |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ToolMessages.*; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ToolMessages.*; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ToolMessages.*; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | |
| | | |
| | |
| | | import java.util.StringTokenizer; |
| | | |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ToolMessages.*; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.RDN; |
| | | |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.core.InitializationException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.RDN; |
| | | |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | |
| | | |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import java.util.LinkedList; |
| | | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | | |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a data structure that can be used to hold |
| | | * information about a request to cancel or abandon an operation in |
| | | * progress. |
| | | */ |
| | | public class CancelRequest |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.types.CancelRequest"; |
| | | |
| | | |
| | | |
| | | // Indicates whether to send a response to the original request if |
| | | // the operation is canceled. |
| | | private final boolean notifyOriginalRequestor; |
| | | |
| | | // A message that explains the purpose for this cancellation (may be |
| | | // included in the response to the original requestor). |
| | | private final String cancelReason; |
| | | |
| | | // A buffer to hold a human-readable response that the server |
| | | // provided for the result of the cancellation. |
| | | private StringBuilder responseMessage; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new cancel request with the provided information. |
| | | * |
| | | * @param notifyOriginalRequestor Indicates whether the original |
| | | * requestor should receive a |
| | | * response if the operation is |
| | | * canceled. |
| | | * @param cancelReason A message that explains the |
| | | * purpose for this cancellation. |
| | | */ |
| | | public CancelRequest(boolean notifyOriginalRequestor, |
| | | String cancelReason) |
| | | { |
| | | assert debugConstructor(CLASS_NAME, |
| | | String.valueOf(notifyOriginalRequestor), |
| | | String.valueOf(cancelReason)); |
| | | |
| | | this.notifyOriginalRequestor = notifyOriginalRequestor; |
| | | this.cancelReason = cancelReason; |
| | | this.responseMessage = new StringBuilder(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new cancel request with the provided information. |
| | | * |
| | | * @param notifyOriginalRequestor Indicates whether the original |
| | | * requestor should receive a |
| | | * response if the operation is |
| | | * canceled. |
| | | * @param cancelReason A message that explains the |
| | | * purpose for this cancellation. |
| | | * @param responseMessage A buffer to hold a |
| | | * human-readable response that the |
| | | * server provided for the result |
| | | * of the cancellation. |
| | | */ |
| | | public CancelRequest(boolean notifyOriginalRequestor, |
| | | String cancelReason, |
| | | StringBuilder responseMessage) |
| | | { |
| | | assert debugConstructor(CLASS_NAME, |
| | | String.valueOf(notifyOriginalRequestor), |
| | | String.valueOf(cancelReason), |
| | | "java.lang.StringBuilder"); |
| | | |
| | | this.notifyOriginalRequestor = notifyOriginalRequestor; |
| | | this.cancelReason = cancelReason; |
| | | this.responseMessage = responseMessage; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the original requestor should receive a |
| | | * response to the request if the operation is canceled. |
| | | * |
| | | * @return <CODE>true</CODE> if the original requestor should |
| | | * receive a response if the operation is canceled, or |
| | | * <CODE>false</CODE> if not. |
| | | */ |
| | | public final boolean notifyOriginalRequestor() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "notifyOriginalRequestor"); |
| | | |
| | | return notifyOriginalRequestor; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a message that explains the purpose for this |
| | | * cancellation. |
| | | * |
| | | * @return A message that explains the purpose for this |
| | | * cancellation. |
| | | */ |
| | | public final String getCancelReason() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCancelReason"); |
| | | |
| | | return cancelReason; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the buffer that is used to hold a human-readable |
| | | * response that the server provided for the result of the |
| | | * cancellation. The caller may alter the contents of this buffer. |
| | | * |
| | | * @return The buffer that is used to hold a human-readable |
| | | * response that the server provided for the result of this |
| | | * cancellation. |
| | | */ |
| | | public final StringBuilder getResponseMessage() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getResponseMessage"); |
| | | |
| | | return responseMessage; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Appends the provided message to the buffer used to hold |
| | | * information about the result of the cancellation. |
| | | * |
| | | * @param message The message to append to the response message |
| | | * buffer. |
| | | */ |
| | | public final void addResponseMessage(String message) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "addResponseMessage", |
| | | String.valueOf(message)); |
| | | |
| | | responseMessage.append(message); |
| | | } |
| | | } |
| | | |
| File was renamed from opends/src/server/org/opends/server/core/CancelResult.java |
| | |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.core; |
| | | |
| | | |
| | | |
| | | import org.opends.server.types.ResultCode; |
| | | package org.opends.server.types; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This enumeration defines the set of possible outcomes that can result from |
| | | * processing a cancel request. This is based on the specification contained in |
| | | * RFC 3909. |
| | | * This enumeration defines the set of possible outcomes that can |
| | | * result from processing a cancel request. This is based on the |
| | | * specification contained in RFC 3909. |
| | | */ |
| | | public enum CancelResult |
| | | { |
| | | /** |
| | | * The cancel result that indicates that the target operation was canceled |
| | | * successfully and in a manner that should have no permanent effects on the |
| | | * server or the data it contains. |
| | | * The cancel result that indicates that the target operation was |
| | | * canceled successfully and in a manner that should have no |
| | | * permanent effects on the server or the data it contains. |
| | | */ |
| | | CANCELED(ResultCode.CANCELED), |
| | | |
| | | |
| | | |
| | | /** |
| | | * The cancel result that indicates that the target operation could not be |
| | | * found, which may mean that it either does not exist or has already |
| | | * completed. |
| | | * The cancel result that indicates that the target operation could |
| | | * not be found, which may mean that it either does not exist or has |
| | | * already completed. |
| | | */ |
| | | NO_SUCH_OPERATION(ResultCode.NO_SUCH_OPERATION), |
| | | |
| | | |
| | | |
| | | /** |
| | | * The cancel result that indicates that processing on the target operation |
| | | * had already progressed to a point in which it was too late to be able to |
| | | * cancel. |
| | | * The cancel result that indicates that processing on the target |
| | | * operation had already progressed to a point in which it was too |
| | | * late to be able to cancel. |
| | | */ |
| | | TOO_LATE(ResultCode.TOO_LATE), |
| | | |
| | | |
| | | |
| | | /** |
| | | * The cancel result that indicates that the operation exists but cannot be |
| | | * canceled for some reason (e.g., it is an abandon, bind, cancel, or unbind |
| | | * operation, or if it is one that would impact the security of the underlying |
| | | * connection). |
| | | * The cancel result that indicates that the operation exists but |
| | | * cannot be canceled for some reason (e.g., it is an abandon, bind, |
| | | * cancel, or unbind operation, or if it is one that would impact |
| | | * the security of the underlying connection). |
| | | */ |
| | | CANNOT_CANCEL(ResultCode.CANNOT_CANCEL); |
| | | |
| | | |
| | | |
| | | // The result code associated with this cancel result. |
| | | private ResultCode resultCode; |
| | | private final ResultCode resultCode; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new cancel result with the provided result code. |
| | | * |
| | | * @param resultCode The result code associated with this cancel result. |
| | | * @param resultCode The result code associated with this cancel |
| | | * result. |
| | | */ |
| | | private CancelResult(ResultCode resultCode) |
| | | { |
| | |
| | | * |
| | | * @return The result code associated with this cancel result. |
| | | */ |
| | | public ResultCode getResultCode() |
| | | public final ResultCode getResultCode() |
| | | { |
| | | return resultCode; |
| | | } |
| | |
| | | * |
| | | * @return A string representation of this cancel result. |
| | | */ |
| | | public String toString() |
| | | public final String toString() |
| | | { |
| | | return String.valueOf(resultCode); |
| | | } |
| File was renamed from opends/src/server/org/opends/server/core/CancelledOperationException.java |
| | |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.core; |
| | | package org.opends.server.types; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * This class defines an exception that may be thrown if the operation being |
| | | * processed is cancelled for some reason (e.g., an abandon or cancel request |
| | | * from the client). |
| | | * This class defines an exception that may be thrown if the operation |
| | | * being processed is cancelled for some reason (e.g., an abandon or |
| | | * cancel request from the client). |
| | | */ |
| | | public class CancelledOperationException |
| | | extends Exception |
| | |
| | | * The fully-qualified name of this class for debugging purposes. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.core.CancelledOperationException"; |
| | | "org.opends.server.types.CancelledOperationException"; |
| | | |
| | | |
| | | |
| | | /** |
| | | * The serial version identifier required to satisfy the compiler because this |
| | | * class extends <CODE>java.lang.Exception</CODE>, which implements the |
| | | * <CODE>java.io.Serializable</CODE> interface. This value was generated |
| | | * using the <CODE>serialver</CODE> command-line utility included with the |
| | | * Java SDK. |
| | | * The serial version identifier required to satisfy the compiler |
| | | * because this class extends <CODE>java.lang.Exception</CODE>, |
| | | * which implements the <CODE>java.io.Serializable</CODE> interface. |
| | | * This value was generated using the <CODE>serialver</CODE> |
| | | * command-line utility included with the Java SDK. |
| | | */ |
| | | private static final long serialVersionUID = -1936491673256446966L; |
| | | |
| | | |
| | | |
| | | // The cancel result that provides information about the status of the |
| | | // cancellation. |
| | | private CancelResult cancelResult; |
| | | // The cancel result that provides information about the status of |
| | | // the cancellation. |
| | | private final CancelResult cancelResult; |
| | | |
| | | // The message ID for the cancel message. |
| | | private int messageID; |
| | | private final int messageID; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new cancelled operation exception with the provided result and |
| | | * no additional message. |
| | | * Creates a new cancelled operation exception with the provided |
| | | * result and no additional message. |
| | | * |
| | | * @param cancelResult The result of the cancel processing. |
| | | */ |
| | |
| | | |
| | | |
| | | /** |
| | | * Creates a new cancelled operation exception with the provided information. |
| | | * Creates a new cancelled operation exception with the provided |
| | | * information. |
| | | * |
| | | * @param cancelResult The result of the cancel processing. |
| | | * @param message The message providing additional information about |
| | | * the cancel processing, or <CODE>null</CODE> if there |
| | | * is no message. |
| | | * @param messageID The message ID that uniquely identifies the cancel |
| | | * message, or -1 if there is no message. |
| | | * @param message The message providing additional |
| | | * information about the cancel processing, or |
| | | * <CODE>null</CODE> if there is no message. |
| | | * @param messageID The message ID that uniquely identifies the |
| | | * cancel message, or -1 if there is no |
| | | * message. |
| | | */ |
| | | public CancelledOperationException(CancelResult cancelResult, String message, |
| | | int messageID) |
| | | public CancelledOperationException(CancelResult cancelResult, |
| | | String message, int messageID) |
| | | { |
| | | super(message); |
| | | |
| | | assert debugConstructor(CLASS_NAME, String.valueOf(cancelResult), |
| | | String.valueOf(message), String.valueOf(messageID)); |
| | | String.valueOf(message), |
| | | String.valueOf(messageID)); |
| | | |
| | | this.cancelResult = cancelResult; |
| | | this.messageID = messageID; |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the cancel result for this cancelled operation exception. |
| | | * Retrieves the cancel result for this cancelled operation |
| | | * exception. |
| | | * |
| | | * @return The cancel result for this cancelled operation exception. |
| | | * @return The cancel result for this cancelled operation |
| | | * exception. |
| | | */ |
| | | public CancelResult getCancelResult() |
| | | public final CancelResult getCancelResult() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCancelResult"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the unique message ID for the message associated with this |
| | | * cancelled operation exception. |
| | | * Retrieves the unique message ID for the message associated with |
| | | * this cancelled operation exception. |
| | | * |
| | | * @return The unique message ID for the message associated with this |
| | | * cancelled operation exception, or <CODE>-1</CODE> if there is no |
| | | * message. |
| | | * @return The unique message ID for the message associated with |
| | | * this cancelled operation exception, or <CODE>-1</CODE> |
| | | * if there is no message. |
| | | */ |
| | | public int getMessageID() |
| | | public final int getMessageID() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMessageID"); |
| | | |
| File was renamed from opends/src/server/org/opends/server/core/CryptoManager.java |
| | |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.core; |
| | | package org.opends.server.types; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * This class provides the interface to the Directory Server cryptographic |
| | | * framework, which may be used for hashing, encryption, and other kinds of |
| | | * cryptographic operations. Note that it also contains methods for compressing |
| | | * and uncompressing data. Although these are not strictly cryptographic |
| | | * operations, there are a lot of similarities and it may be conceivable at |
| | | * some point that accelerated compression may be available just as it is for |
| | | * This class provides the interface to the Directory Server |
| | | * cryptographic framework, which may be used for hashing, encryption, |
| | | * and other kinds of cryptographic operations. Note that it also |
| | | * contains methods for compressing and uncompressing data. Although |
| | | * these are not strictly cryptographic operations, there are a lot of |
| | | * similarities and it may be conceivable at some point that |
| | | * accelerated compression may be available just as it is for |
| | | * cryptographic operations. |
| | | */ |
| | | public class CryptoManager |
| | |
| | | * The fully-qualified name of this class for debugging purposes. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.core.CryptoManager"; |
| | | "org.opends.server.types.CryptoManager"; |
| | | |
| | | |
| | | |
| | | // The default secret key that we will use for encryption and decryption. |
| | | // The default secret key that we will use for encryption and |
| | | // decryption. |
| | | private SecretKey secretKey; |
| | | |
| | | // The preferred cipher for the Directory Server. |
| | |
| | | /** |
| | | * Creates a new instance of this crypto manager object. |
| | | * |
| | | * @throws ConfigException If a problem occurs while creating this crypto |
| | | * manager that is a result of a problem in the |
| | | * configuration. |
| | | * @throws ConfigException If a problem occurs while creating this |
| | | * crypto manager that is a result of a |
| | | * problem in the configuration. |
| | | * |
| | | * @throws InitializationException If a problem occurs while creating this |
| | | * crypto manager that is not the result of |
| | | * a problem in the configuration. |
| | | * @throws InitializationException If a problem occurs while |
| | | * creating this crypto manager |
| | | * that is not the result of a |
| | | * problem in the configuration. |
| | | */ |
| | | public CryptoManager() |
| | | throws ConfigException, InitializationException |
| | | { |
| | | assert debugConstructor(CLASS_NAME); |
| | | |
| | | // FIXME -- Get the defaults from the configuration rather than hard-coding |
| | | // them. |
| | | // FIXME -- Get the defaults from the configuration rather than |
| | | // hard-coding them. |
| | | preferredDigestAlgorithm = "SHA-1"; |
| | | preferredMACAlgorithm = "HmacSHA1"; |
| | | preferredCipher = "AES/CBC/PKCS5Padding"; |
| | | |
| | | |
| | | // FIXME -- Use a much more secure way of constructing the secret key. |
| | | // FIXME -- Use a much more secure way of constructing the secret |
| | | // key. |
| | | secretKey = new SecretKeySpec(new byte[16], "AES"); |
| | | |
| | | |
| | | // Make sure that we can create instances of the preferred digest, MAC, and |
| | | // cipher algorithms. |
| | | // Make sure that we can create instances of the preferred digest, |
| | | // MAC, and cipher algorithms. |
| | | try |
| | | { |
| | | MessageDigest.getInstance(preferredDigestAlgorithm); |
| | |
| | | assert debugException(CLASS_NAME, "<init>", e); |
| | | |
| | | // FIXME -- Number this. |
| | | throw new InitializationException(-1, "Can't get preferred digest: " + |
| | | stackTraceToSingleLineString(e), e); |
| | | throw new InitializationException(-1, |
| | | "Can't get preferred digest: " + |
| | | stackTraceToSingleLineString(e), e); |
| | | } |
| | | |
| | | try |
| | |
| | | assert debugException(CLASS_NAME, "<init>", e); |
| | | |
| | | // FIXME -- Number this. |
| | | throw new InitializationException(-1, "Can't get preferred MAC " + |
| | | "provider: " + |
| | | stackTraceToSingleLineString(e), e); |
| | | throw new InitializationException(-1, |
| | | "Can't get preferred MAC provider: " + |
| | | stackTraceToSingleLineString(e), e); |
| | | } |
| | | |
| | | try |
| | |
| | | assert debugException(CLASS_NAME, "<init>", e); |
| | | |
| | | // FIXME -- Number this. |
| | | throw new InitializationException(-1, "Can't get preferred cipher: " + |
| | | stackTraceToSingleLineString(e), e); |
| | | throw new InitializationException(-1, |
| | | "Can't get preferred cipher: " + |
| | | stackTraceToSingleLineString(e), e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSecureRandom"); |
| | | |
| | | // FIXME -- Is this threadsafe? Can we share a single instance among all |
| | | // threads? |
| | | // FIXME -- Is this threadsafe? Can we share a single instance |
| | | // among all threads? |
| | | return new SecureRandom(); |
| | | } |
| | | |
| | |
| | | */ |
| | | public String getPreferredMessageDigestAlgorithm() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getPreferredMessageDigestAlgorithm"); |
| | | assert debugEnter(CLASS_NAME, |
| | | "getPreferredMessageDigestAlgorithm"); |
| | | |
| | | return preferredDigestAlgorithm; |
| | | } |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a <CODE>MessageDigest</CODE> object that may be used to generate |
| | | * digests using the preferred digest algorithm. |
| | | * Retrieves a <CODE>MessageDigest</CODE> object that may be used to |
| | | * generate digests using the preferred digest algorithm. |
| | | * |
| | | * @return A <CODE>MessageDigest</CODE> object that may be used to generate |
| | | * digests using the preferred digest algorithm. |
| | | * @return A <CODE>MessageDigest</CODE> object that may be used to |
| | | * generate digests using the preferred digest algorithm. |
| | | * |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is not |
| | | * supported or is unavailable. |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is |
| | | * not supported or is |
| | | * unavailable. |
| | | */ |
| | | public MessageDigest getPreferredMessageDigest() |
| | | throws NoSuchAlgorithmException |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a <CODE>MessageDigest</CODE> object that may be used to generate |
| | | * digests using the specified algorithm. |
| | | * Retrieves a <CODE>MessageDigest</CODE> object that may be used to |
| | | * generate digests using the specified algorithm. |
| | | * |
| | | * @param digestAlgorithm The algorithm to use to generate the message |
| | | * digest. |
| | | * @param digestAlgorithm The algorithm to use to generate the |
| | | * message digest. |
| | | * |
| | | * @return A <CODE>MessageDigest</CODE> object that may be used to generate |
| | | * digests using the specified algorithm. |
| | | * @return A <CODE>MessageDigest</CODE> object that may be used to |
| | | * generate digests using the specified algorithm. |
| | | * |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is not |
| | | * supported or is unavailable. |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is |
| | | * not supported or is |
| | | * unavailable. |
| | | */ |
| | | public MessageDigest getMessageDigest(String digestAlgorithm) |
| | | throws NoSuchAlgorithmException |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a byte array containing a message digest based on the provided |
| | | * data, using the preferred digest algorithm. |
| | | * Retrieves a byte array containing a message digest based on the |
| | | * provided data, using the preferred digest algorithm. |
| | | * |
| | | * @param data The data to be digested. |
| | | * |
| | | * @return A byte array containing the generated message digest. |
| | | * |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is not |
| | | * supported or is unavailable. |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is |
| | | * not supported or is |
| | | * unavailable. |
| | | */ |
| | | public byte[] digest(byte[] data) |
| | | throws NoSuchAlgorithmException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "digest", "byte[" + data.length + "]"); |
| | | assert debugEnter(CLASS_NAME, "digest", |
| | | "byte[" + data.length + "]"); |
| | | |
| | | return MessageDigest.getInstance(preferredDigestAlgorithm).digest(data); |
| | | return MessageDigest.getInstance(preferredDigestAlgorithm). |
| | | digest(data); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a byte array containing a message digest based on the provided |
| | | * data, using the requested digest algorithm. |
| | | * Retrieves a byte array containing a message digest based on the |
| | | * provided data, using the requested digest algorithm. |
| | | * |
| | | * @param digestAlgorithm The algorithm to use to generate the message |
| | | * digest. |
| | | * @param digestAlgorithm The algorithm to use to generate the |
| | | * message digest. |
| | | * @param data The data to be digested. |
| | | * |
| | | * @return A byte array containing the generated message digest. |
| | | * |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is not |
| | | * supported or is unavailable. |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is |
| | | * not supported or is |
| | | * unavailable. |
| | | */ |
| | | public byte[] digest(String digestAlgorithm, byte[] data) |
| | | throws NoSuchAlgorithmException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "digest", String.valueOf(digestAlgorithm), |
| | | assert debugEnter(CLASS_NAME, "digest", |
| | | String.valueOf(digestAlgorithm), |
| | | "byte[" + data.length + "]"); |
| | | |
| | | return MessageDigest.getInstance(digestAlgorithm).digest(data); |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a byte array containing a message digest based on the data read |
| | | * from the provided input stream, using the preferred digest algorithm. Data |
| | | * will be read until the end of the stream is reached. |
| | | * Retrieves a byte array containing a message digest based on the |
| | | * data read from the provided input stream, using the preferred |
| | | * digest algorithm. Data will be read until the end of the stream |
| | | * is reached. |
| | | * |
| | | * @param inputStream The input stream from which the data is to be read. |
| | | * @param inputStream The input stream from which the data is to |
| | | * be read. |
| | | * |
| | | * @return A byte array containing the generated message digest. |
| | | * |
| | | * @throws IOException If a problem occurs while reading data from the |
| | | * provided stream. |
| | | * @throws IOException If a problem occurs while reading data from |
| | | * the provided stream. |
| | | * |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is not |
| | | * supported or is unavailable. |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is |
| | | * not supported or is |
| | | * unavailable. |
| | | */ |
| | | public byte[] digest(InputStream inputStream) |
| | | throws IOException, NoSuchAlgorithmException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "digest", "java.io.InputStream"); |
| | | |
| | | MessageDigest digest = MessageDigest.getInstance(preferredDigestAlgorithm); |
| | | MessageDigest digest = |
| | | MessageDigest.getInstance(preferredDigestAlgorithm); |
| | | |
| | | byte[] buffer = new byte[8192]; |
| | | while (true) |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a byte array containing a message digest based on the data read |
| | | * from the provided input stream, using the requested digest algorithm. Data |
| | | * will be read until the end of the stream is reached. |
| | | * Retrieves a byte array containing a message digest based on the |
| | | * data read from the provided input stream, using the requested |
| | | * digest algorithm. Data will be read until the end of the stream |
| | | * is reached. |
| | | * |
| | | * @param digestAlgorithm The algorithm to use to generate the message |
| | | * digest. |
| | | * @param inputStream The input stream from which the data is to be |
| | | * read. |
| | | * @param digestAlgorithm The algorithm to use to generate the |
| | | * message digest. |
| | | * @param inputStream The input stream from which the data is |
| | | * to be read. |
| | | * |
| | | * @return A byte array containing the generated message digest. |
| | | * |
| | | * @throws IOException If a problem occurs while reading data from the |
| | | * provided stream. |
| | | * @throws IOException If a problem occurs while reading data from |
| | | * the provided stream. |
| | | * |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is not |
| | | * supported or is unavailable. |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is |
| | | * not supported or is |
| | | * unavailable. |
| | | */ |
| | | public byte[] digest(String digestAlgorithm, InputStream inputStream) |
| | | public byte[] digest(String digestAlgorithm, |
| | | InputStream inputStream) |
| | | throws IOException, NoSuchAlgorithmException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "digest", "java.io.InputStream"); |
| | |
| | | */ |
| | | public String getPreferredMACAlgorithm() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getPreferredMessageDigestAlgorithm"); |
| | | assert debugEnter(CLASS_NAME, |
| | | "getPreferredMessageDigestAlgorithm"); |
| | | |
| | | return preferredMACAlgorithm; |
| | | } |
| | |
| | | * |
| | | * @return A MAC provider using the preferred algorithm. |
| | | * |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is not |
| | | * supported or is unavailable. |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is |
| | | * not supported or is |
| | | * unavailable. |
| | | * |
| | | * @throws InvalidKeyException If the provided key is not appropriate for |
| | | * use with the requested MAC algorithm. |
| | | * @throws InvalidKeyException If the provided key is not |
| | | * appropriate for use with the |
| | | * requested MAC algorithm. |
| | | */ |
| | | public Mac getPreferredMACProvider() |
| | | throws NoSuchAlgorithmException, InvalidKeyException |
| | |
| | | * |
| | | * @return A MAC provider using the specified algorithm. |
| | | * |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is not |
| | | * supported or is unavailable. |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is |
| | | * not supported or is |
| | | * unavailable. |
| | | * |
| | | * @throws InvalidKeyException If the provided key is not appropriate for |
| | | * use with the requested MAC algorithm. |
| | | * @throws InvalidKeyException If the provided key is not |
| | | * appropriate for use with the |
| | | * requested MAC algorithm. |
| | | */ |
| | | public Mac getMACProvider(String macAlgorithm) |
| | | throws NoSuchAlgorithmException, InvalidKeyException |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a byte array containing a MAC based on the provided data, using |
| | | * the preferred MAC algorithm. |
| | | * Retrieves a byte array containing a MAC based on the provided |
| | | * data, using the preferred MAC algorithm. |
| | | * |
| | | * @param data The data for which to generate the MAC. |
| | | * |
| | | * @return A byte array containing the generated MAC. |
| | | * |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is not |
| | | * supported or is unavailable. |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is |
| | | * not supported or is |
| | | * unavailable. |
| | | */ |
| | | public byte[] mac(byte[] data) |
| | | throws NoSuchAlgorithmException |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a byte array containing a MAC based on the provided data, using |
| | | * the requested MAC algorithm. |
| | | * Retrieves a byte array containing a MAC based on the provided |
| | | * data, using the requested MAC algorithm. |
| | | * |
| | | * @param macAlgorithm The algorithm to use for the MAC. |
| | | * @param data The data for which to generate the MAC. |
| | | * |
| | | * @return A byte array containing the generated MAC. |
| | | * |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is not |
| | | * supported or is unavailable. |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is |
| | | * not supported or is |
| | | * unavailable. |
| | | */ |
| | | public byte[] mac(String macAlgorithm, byte[] data) |
| | | throws NoSuchAlgorithmException |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a byte array containing a MAC based on the data read from the |
| | | * provided input stream, using the preferred MAC algorithm. Data will be |
| | | * read until the end of the stream is reached. |
| | | * Retrieves a byte array containing a MAC based on the data read |
| | | * from the provided input stream, using the preferred MAC |
| | | * algorithm. Data will be read until the end of the stream is |
| | | * reached. |
| | | * |
| | | * @param inputStream The input stream from which the data is to be read. |
| | | * @param inputStream The input stream from which the data is to |
| | | * be read. |
| | | * |
| | | * @return A byte array containing the generated MAC. |
| | | * |
| | | * @throws IOException If a problem occurs while reading data from the |
| | | * provided stream. |
| | | * @throws IOException If a problem occurs while reading data from |
| | | * the provided stream. |
| | | * |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is not |
| | | * supported or is unavailable. |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is |
| | | * not supported or is |
| | | * unavailable. |
| | | */ |
| | | public byte[] mac(InputStream inputStream) |
| | | throws IOException, NoSuchAlgorithmException |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a byte array containing a MAC based on the data read from the |
| | | * provided input stream, using the preferred MAC algorithm. Data will be |
| | | * read until the end of the stream is reached. |
| | | * Retrieves a byte array containing a MAC based on the data read |
| | | * from the provided input stream, using the preferred MAC |
| | | * algorithm. Data will be read until the end of the stream is |
| | | * reached. |
| | | * |
| | | * @param macAlgorithm The algorithm to use for the MAC. |
| | | * @param inputStream The input stream from which the data is to be read. |
| | | * @param inputStream The input stream from which the data is to |
| | | * be read. |
| | | * |
| | | * @return A byte array containing the generated MAC. |
| | | * |
| | | * @throws IOException If a problem occurs while reading data from the |
| | | * provided stream. |
| | | * @throws IOException If a problem occurs while reading data from |
| | | * the provided stream. |
| | | * |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is not |
| | | * supported or is unavailable. |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is |
| | | * not supported or is |
| | | * unavailable. |
| | | */ |
| | | public byte[] mac(String macAlgorithm, InputStream inputStream) |
| | | throws IOException, NoSuchAlgorithmException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "digest", String.valueOf(macAlgorithm), |
| | | assert debugEnter(CLASS_NAME, "digest", |
| | | String.valueOf(macAlgorithm), |
| | | "java.io.InputStream"); |
| | | |
| | | Mac mac = Mac.getInstance(macAlgorithm); |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a cipher using the preferred algorithm and the specified cipher |
| | | * mode. |
| | | * Retrieves a cipher using the preferred algorithm and the |
| | | * specified cipher mode. |
| | | * |
| | | * @param cipherMode The cipher mode that indicates how the cipher will be |
| | | * used (e.g., encryption, decryption, wrapping, |
| | | * unwrapping). |
| | | * @param cipherMode The cipher mode that indicates how the cipher |
| | | * will be used (e.g., encryption, decryption, |
| | | * wrapping, unwrapping). |
| | | * |
| | | * @return A cipher using the preferred algorithm. |
| | | * |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is not |
| | | * supported or is unavailable. |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is |
| | | * not supported or is |
| | | * unavailable. |
| | | * |
| | | * @throws NoSuchPaddingException If the requested padding mechanism is not |
| | | * supported or is unavailable. |
| | | * @throws NoSuchPaddingException If the requested padding |
| | | * mechanism is not supported or is |
| | | * unavailable. |
| | | * |
| | | * @throws InvalidKeyException If the provided key is not appropriate for |
| | | * use with the requested cipher algorithm. |
| | | * @throws InvalidKeyException If the provided key is not |
| | | * appropriate for use with the |
| | | * requested cipher algorithm. |
| | | * |
| | | * @throws InvalidAlgorithmParameterException If an internal problem occurs |
| | | * as a result of the |
| | | * initialization vector used. |
| | | * @throws InvalidAlgorithmParameterException |
| | | * If an internal problem occurs as a result of the |
| | | * initialization vector used. |
| | | */ |
| | | public Cipher getPreferredCipher(int cipherMode) |
| | | throws NoSuchAlgorithmException, NoSuchPaddingException, |
| | | InvalidKeyException, InvalidAlgorithmParameterException |
| | | InvalidKeyException, |
| | | InvalidAlgorithmParameterException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getPreferredCipher", |
| | | String.valueOf(cipherMode)); |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a cipher using the preferred algorithm and the specified cipher |
| | | * mode. |
| | | * Retrieves a cipher using the preferred algorithm and the |
| | | * specified cipher mode. |
| | | * |
| | | * @param cipherAlgorithm The algorithm to use for the cipher. |
| | | * @param cipherMode The cipher mode that indicates how the cipher will |
| | | * be used (e.g., encryption, decryption, wrapping, |
| | | * unwrapping). |
| | | * @param cipherMode The cipher mode that indicates how the |
| | | * cipher will be used (e.g., encryption, |
| | | * decryption, wrapping, unwrapping). |
| | | * |
| | | * @return A cipher using the preferred algorithm. |
| | | * |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is not |
| | | * supported or is unavailable. |
| | | * @throws NoSuchAlgorithmException If the requested algorithm is |
| | | * not supported or is |
| | | * unavailable. |
| | | * |
| | | * @throws NoSuchPaddingException If the requested padding mechanism is not |
| | | * supported or is unavailable. |
| | | * @throws NoSuchPaddingException If the requested padding |
| | | * mechanism is not supported or is |
| | | * unavailable. |
| | | * |
| | | * @throws InvalidKeyException If the provided key is not appropriate for |
| | | * use with the requested cipher algorithm. |
| | | * @throws InvalidKeyException If the provided key is not |
| | | * appropriate for use with the |
| | | * requested cipher algorithm. |
| | | * |
| | | * @throws InvalidAlgorithmParameterException If an internal problem occurs |
| | | * as a result of the |
| | | * initialization vector used. |
| | | * @throws InvalidAlgorithmParameterException |
| | | * If an internal problem occurs as a result of the |
| | | * initialization vector used. |
| | | */ |
| | | public Cipher getCipher(String cipherAlgorithm, int cipherMode) |
| | | throws NoSuchAlgorithmException, NoSuchPaddingException, |
| | | InvalidKeyException, InvalidAlgorithmParameterException |
| | | InvalidKeyException, |
| | | InvalidAlgorithmParameterException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCipher", |
| | | String.valueOf(cipherAlgorithm), |
| | |
| | | |
| | | |
| | | /** |
| | | * Encrypts the data in the provided byte array using the preferred cipher. |
| | | * Encrypts the data in the provided byte array using the preferred |
| | | * cipher. |
| | | * |
| | | * @param data The data to be encrypted. |
| | | * |
| | | * @return A byte array containing the encrypted representation of the |
| | | * provided data. |
| | | * @return A byte array containing the encrypted representation of |
| | | * the provided data. |
| | | * |
| | | * @throws GeneralSecurityException If a problem occurs while attempting to |
| | | * encrypt the data. |
| | | * @throws GeneralSecurityException If a problem occurs while |
| | | * attempting to encrypt the |
| | | * data. |
| | | */ |
| | | public byte[] encrypt(byte[] data) |
| | | throws GeneralSecurityException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "encrypt", "byte[" + data.length + "]"); |
| | | assert debugEnter(CLASS_NAME, "encrypt", |
| | | "byte[" + data.length + "]"); |
| | | |
| | | Cipher cipher = Cipher.getInstance(preferredCipher); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Decrypts the data in the provided byte array using the preferred cipher. |
| | | * Decrypts the data in the provided byte array using the preferred |
| | | * cipher. |
| | | * |
| | | * @param data The data to be decrypted. |
| | | * |
| | | * @return A byte array containing the cleartext representation of the |
| | | * provided data. |
| | | * @return A byte array containing the cleartext representation of |
| | | * the provided data. |
| | | * |
| | | * @throws GeneralSecurityException If a problem occurs while attempting to |
| | | * decrypt the data. |
| | | * @throws GeneralSecurityException If a problem occurs while |
| | | * attempting to decrypt the |
| | | * data. |
| | | */ |
| | | public byte[] decrypt(byte[] data) |
| | | throws GeneralSecurityException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "decrypt", "byte[" + data.length + "]"); |
| | | assert debugEnter(CLASS_NAME, "decrypt", |
| | | "byte[" + data.length + "]"); |
| | | |
| | | Cipher cipher = Cipher.getInstance(preferredCipher); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Encrypts the data in the provided byte array using the preferred cipher. |
| | | * Encrypts the data in the provided byte array using the preferred |
| | | * cipher. |
| | | * |
| | | * @param cipherAlgorithm The algorithm to use to encrypt the data. |
| | | * @param cipherAlgorithm The algorithm to use to encrypt the |
| | | * data. |
| | | * @param data The data to be encrypted. |
| | | * |
| | | * @return A byte array containing the encrypted representation of the |
| | | * provided data. |
| | | * @return A byte array containing the encrypted representation of |
| | | * the provided data. |
| | | * |
| | | * @throws GeneralSecurityException If a problem occurs while attempting to |
| | | * encrypt the data. |
| | | * @throws GeneralSecurityException If a problem occurs while |
| | | * attempting to encrypt the |
| | | * data. |
| | | */ |
| | | public byte[] encrypt(String cipherAlgorithm, byte[] data) |
| | | throws GeneralSecurityException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "encrypt", "byte[" + data.length + "]"); |
| | | assert debugEnter(CLASS_NAME, "encrypt", |
| | | "byte[" + data.length + "]"); |
| | | |
| | | Cipher cipher = Cipher.getInstance(cipherAlgorithm); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Decrypts the data in the provided byte array using the requested cipher. |
| | | * Decrypts the data in the provided byte array using the requested |
| | | * cipher. |
| | | * |
| | | * @param cipherAlgorithm The algorithm to use to decrypt the data. |
| | | * @param cipherAlgorithm The algorithm to use to decrypt the |
| | | * data. |
| | | * @param data The data to be decrypted. |
| | | * |
| | | * @return A byte array containing the cleartext representation of the |
| | | * provided data. |
| | | * @return A byte array containing the cleartext representation of |
| | | * the provided data. |
| | | * |
| | | * @throws GeneralSecurityException If a problem occurs while attempting to |
| | | * decrypt the data. |
| | | * @throws GeneralSecurityException If a problem occurs while |
| | | * attempting to decrypt the |
| | | * data. |
| | | */ |
| | | public byte[] decrypt(String cipherAlgorithm, byte[] data) |
| | | throws GeneralSecurityException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "decrypt", "byte[" + data.length + "]"); |
| | | assert debugEnter(CLASS_NAME, "decrypt", |
| | | "byte[" + data.length + "]"); |
| | | |
| | | Cipher cipher = Cipher.getInstance(cipherAlgorithm); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Attempts to compress the data in the provided source array into the given |
| | | * destination array. If the compressed data will fit into the destination |
| | | * array, then this method will return the number of bytes of compressed data |
| | | * in the array. Otherwise, it will return -1 to indicate that the |
| | | * compression was not successful. Note that if -1 is returned, then the data |
| | | * in the destination array should be considered invalid. |
| | | * Attempts to compress the data in the provided source array into |
| | | * the given destination array. If the compressed data will fit |
| | | * into the destination array, then this method will return the |
| | | * number of bytes of compressed data in the array. Otherwise, it |
| | | * will return -1 to indicate that the compression was not |
| | | * successful. Note that if -1 is returned, then the data in the |
| | | * destination array should be considered invalid. |
| | | * |
| | | * @param src The array containing the raw data to compress. |
| | | * @param dst The array into which the compressed data should be written. |
| | | * @param dst The array into which the compressed data should be |
| | | * written. |
| | | * |
| | | * @return The number of bytes of compressed data, or -1 if it was not |
| | | * possible to actually compress the data. |
| | | * @return The number of bytes of compressed data, or -1 if it was |
| | | * not possible to actually compress the data. |
| | | */ |
| | | public int compress(byte[] src, byte[] dst) |
| | | { |
| | |
| | | |
| | | |
| | | /** |
| | | * Attempts to uncompress the data in the provided source array into the given |
| | | * destination array. If the uncompressed data will fit into the given |
| | | * destination array, then this method will return the number of bytes of |
| | | * uncompressed data written into the destination buffer. Otherwise, it will |
| | | * return a negative value to indicate that the destination buffer was not |
| | | * large enough. The absolute value of that negative return value will |
| | | * indicate the buffer size required to fully decompress the data. Note that |
| | | * if a negative value is returned, then the data in the destination array |
| | | * should be considered invalid. |
| | | * Attempts to uncompress the data in the provided source array into |
| | | * the given destination array. If the uncompressed data will fit |
| | | * into the given destination array, then this method will return |
| | | * the number of bytes of uncompressed data written into the |
| | | * destination buffer. Otherwise, it will return a negative value |
| | | * to indicate that the destination buffer was not large enough. |
| | | * The absolute value of that negative return value will indicate |
| | | * the buffer size required to fully decompress the data. Note that |
| | | * if a negative value is returned, then the data in the destination |
| | | * array should be considered invalid. |
| | | * |
| | | * @param src The array containing the compressed data. |
| | | * @param dst The array into which the uncompressed data should be written. |
| | | * @param dst The array into which the uncompressed data should be |
| | | * written. |
| | | * |
| | | * @return A positive value containing the number of bytes of uncompressed |
| | | * data written into the destination buffer, or a negative value |
| | | * whose absolute value is the size of the destination buffer |
| | | * required to fully decompress the provided data. |
| | | * @return A positive value containing the number of bytes of |
| | | * uncompressed data written into the destination buffer, |
| | | * or a negative value whose absolute value is the size of |
| | | * the destination buffer required to fully decompress the |
| | | * provided data. |
| | | * |
| | | * @throws DataFormatException If a problem occurs while attempting to |
| | | * uncompress the data. |
| | | * @throws DataFormatException If a problem occurs while |
| | | * attempting to uncompress the data. |
| | | */ |
| | | public int uncompress(byte[] src, byte[] dst) |
| | | throws DataFormatException |
| | |
| | | import java.io.Serializable; |
| | | import java.util.ArrayList; |
| | | |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | |
| File was renamed from opends/src/server/org/opends/server/core/DirectoryException.java |
| | |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.core; |
| | | package org.opends.server.types; |
| | | |
| | | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines an exception that may be thrown if a problem occurs in the |
| | | * Directory Server. |
| | | * This class defines an exception that may be thrown if a problem |
| | | * occurs in the Directory Server. |
| | | */ |
| | | public class DirectoryException |
| | | extends Exception |
| | |
| | | * The fully-qualified name of this class for debugging purposes. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.core.DirectoryException"; |
| | | "org.opends.server.types.DirectoryException"; |
| | | |
| | | |
| | | |
| | | /** |
| | | * The serial version identifier required to satisfy the compiler because this |
| | | * class extends <CODE>java.lang.Exception</CODE>, which implements the |
| | | * <CODE>java.io.Serializable</CODE> interface. This value was generated |
| | | * using the <CODE>serialver</CODE> command-line utility included with the |
| | | * Java SDK. |
| | | * The serial version identifier required to satisfy the compiler |
| | | * because this class extends <CODE>java.lang.Exception</CODE>, |
| | | * which implements the <CODE>java.io.Serializable</CODE> interface. |
| | | * This value was generated using the <CODE>serialver</CODE> |
| | | * command-line utility included with the Java SDK. |
| | | */ |
| | | private static final long serialVersionUID = 2615453139798417203L; |
| | | |
| | | |
| | | |
| | | // The matched DN for this directory exception. |
| | | private DN matchedDN; |
| | | private final DN matchedDN; |
| | | |
| | | // The message ID for the error message. |
| | | private int errorMessageID; |
| | | private final int errorMessageID; |
| | | |
| | | // The set of referral URLs for this directory exception. |
| | | private List<String> referralURLs; |
| | | private final List<String> referralURLs; |
| | | |
| | | // The result code for this directory exception. |
| | | private ResultCode resultCode; |
| | | private final ResultCode resultCode; |
| | | |
| | | // The error message for this directory exception. |
| | | private String errorMessage; |
| | | private final String errorMessage; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new directory exception with the provided information. |
| | | * |
| | | * @param resultCode The result code for this directory exception. |
| | | * @param errorMessage The error message for this directory exception. |
| | | * @param resultCode The result code for this directory |
| | | * exception. |
| | | * @param errorMessage The error message for this directory |
| | | * exception. |
| | | * @param errorMessageID The unique ID for the error message. |
| | | */ |
| | | public DirectoryException(ResultCode resultCode, String errorMessage, |
| | | int errorMessageID) |
| | | public DirectoryException(ResultCode resultCode, |
| | | String errorMessage, int errorMessageID) |
| | | { |
| | | super(errorMessage); |
| | | |
| | |
| | | /** |
| | | * Creates a new directory exception with the provided information. |
| | | * |
| | | * @param resultCode The result code for this directory exception. |
| | | * @param errorMessage The error message for this directory exception. |
| | | * @param resultCode The result code for this directory |
| | | * exception. |
| | | * @param errorMessage The error message for this directory |
| | | * exception. |
| | | * @param errorMessageID The unique ID for the error message. |
| | | * @param cause The exception that was caught to trigger this |
| | | * directory exception. |
| | | * @param cause The exception that was caught to trigger |
| | | * this directory exception. |
| | | */ |
| | | public DirectoryException(ResultCode resultCode, String errorMessage, |
| | | int errorMessageID, Throwable cause) |
| | | public DirectoryException(ResultCode resultCode, |
| | | String errorMessage, int errorMessageID, |
| | | Throwable cause) |
| | | { |
| | | super(errorMessage, cause); |
| | | |
| | |
| | | /** |
| | | * Creates a new directory exception with the provided information. |
| | | * |
| | | * @param resultCode The result code for this directory exception. |
| | | * @param errorMessage The error message for this directory exception. |
| | | * @param resultCode The result code for this directory |
| | | * exception. |
| | | * @param errorMessage The error message for this directory |
| | | * exception. |
| | | * @param errorMessageID The unique ID for the error message. |
| | | * @param matchedDN The matched DN for this directory exception. |
| | | * @param cause The exception that was caught to trigger this |
| | | * directory exception. |
| | | * @param matchedDN The matched DN for this directory |
| | | * exception. |
| | | * @param cause The exception that was caught to trigger |
| | | * this directory exception. |
| | | */ |
| | | public DirectoryException(ResultCode resultCode, String errorMessage, |
| | | int errorMessageID, DN matchedDN, Throwable cause) |
| | | public DirectoryException(ResultCode resultCode, |
| | | String errorMessage, int errorMessageID, |
| | | DN matchedDN, Throwable cause) |
| | | { |
| | | super(errorMessage, cause); |
| | | |
| | | assert debugConstructor(CLASS_NAME, String.valueOf(resultCode), |
| | | String.valueOf(errorMessage), |
| | | String.valueOf(errorMessageID), |
| | | String.valueOf(matchedDN), String.valueOf(cause)); |
| | | String.valueOf(matchedDN), |
| | | String.valueOf(cause)); |
| | | |
| | | this.resultCode = resultCode; |
| | | this.errorMessage = errorMessage; |
| | |
| | | /** |
| | | * Creates a new directory exception with the provided information. |
| | | * |
| | | * @param resultCode The result code for this directory exception. |
| | | * @param errorMessage The error message for this directory exception. |
| | | * @param errorMessageID The unique ID for the error message. |
| | | * @param matchedDN The matched DN for this directory exception. |
| | | * @param referralURLs The set of referral URLs for this directory |
| | | * @param resultCode The result code for this directory |
| | | * exception. |
| | | * @param cause The exception that was caught to trigger this |
| | | * @param errorMessage The error message for this directory |
| | | * exception. |
| | | * @param errorMessageID The unique ID for the error message. |
| | | * @param matchedDN The matched DN for this directory |
| | | * exception. |
| | | * @param referralURLs The set of referral URLs for this |
| | | * directory exception. |
| | | * @param cause The exception that was caught to trigger |
| | | * this directory exception. |
| | | */ |
| | | public DirectoryException(ResultCode resultCode, String errorMessage, |
| | | int errorMessageID, DN matchedDN, |
| | | List<String> referralURLs, Throwable cause) |
| | | public DirectoryException(ResultCode resultCode, |
| | | String errorMessage, int errorMessageID, |
| | | DN matchedDN, List<String> referralURLs, |
| | | Throwable cause) |
| | | { |
| | | super(errorMessage, cause); |
| | | |
| | |
| | | * |
| | | * @return The result code for this directory exception. |
| | | */ |
| | | public ResultCode getResultCode() |
| | | public final ResultCode getResultCode() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getResultCode"); |
| | | |
| | |
| | | * |
| | | * @return The error message for this directory exception. |
| | | */ |
| | | public String getErrorMessage() |
| | | public final String getErrorMessage() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getErrorMessage"); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the unique ID for the error message associated with this |
| | | * directory exception. |
| | | * Retrieves the unique ID for the error message associated with |
| | | * this directory exception. |
| | | * |
| | | * @return The unique ID for the error message associated with this directory |
| | | * exception. |
| | | * @return The unique ID for the error message associated with this |
| | | * directory exception. |
| | | */ |
| | | public int getErrorMessageID() |
| | | public final int getErrorMessageID() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getErrorMessageID"); |
| | | |
| | |
| | | /** |
| | | * Retrieves the matched DN for this directory exception. |
| | | * |
| | | * @return The matched DN for this directory exception, or <CODE>null</CODE> |
| | | * if there is none. |
| | | * @return The matched DN for this directory exception, or |
| | | * <CODE>null</CODE> if there is none. |
| | | */ |
| | | public DN getMatchedDN() |
| | | public final DN getMatchedDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMatchedDN"); |
| | | |
| | |
| | | /** |
| | | * Retrieves the set of referral URLs for this directory exception. |
| | | * |
| | | * @return The set of referral URLs for this directory exception, or |
| | | * <CODE>null</CODE> if there are none. |
| | | * @return The set of referral URLs for this directory exception, |
| | | * or <CODE>null</CODE> if there are none. |
| | | */ |
| | | public List<String> getReferralURLs() |
| | | public final List<String> getReferralURLs() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getReferralURLs"); |
| | | |
| | |
| | | import org.opends.server.api.AttributeValueDecoder; |
| | | import org.opends.server.api.ProtocolElement; |
| | | import org.opends.server.api.plugin.LDIFPluginResult; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.LockManager; |
| | | import org.opends.server.core.PluginConfigManager; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.util.LDIFException; |
| | |
| | | import java.lang.reflect.Method; |
| | | import java.util.ArrayList; |
| | | |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| File was renamed from opends/src/server/org/opends/server/core/InitializationException.java |
| | |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.core; |
| | | package org.opends.server.types; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * This class defines an exception that may be thrown if a problem occurs while |
| | | * trying to initialize a Directory Server component. |
| | | * This class defines an exception that may be thrown if a problem |
| | | * occurs while trying to initialize a Directory Server component. |
| | | */ |
| | | public class InitializationException |
| | | extends Exception |
| | |
| | | * The fully-qualified name of this class for debugging purposes. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.core.InitializationException"; |
| | | "org.opends.server.types.InitializationException"; |
| | | |
| | | |
| | | |
| | | /** |
| | | * The serial version identifier required to satisfy the compiler because this |
| | | * class extends <CODE>java.lang.Exception</CODE>, which implements the |
| | | * <CODE>java.io.Serializable</CODE> interface. This value was generated |
| | | * using the <CODE>serialver</CODE> command-line utility included with the |
| | | * Java SDK. |
| | | * The serial version identifier required to satisfy the compiler |
| | | * because this class extends <CODE>java.lang.Exception</CODE>, |
| | | * which implements the <CODE>java.io.Serializable</CODE> interface. |
| | | * This value was generated using the <CODE>serialver</CODE> |
| | | * command-line utility included with the Java SDK. |
| | | */ |
| | | private static final long serialVersionUID = -6121147544833914730L; |
| | | |
| | | |
| | | |
| | | // The message ID for the message associated with this initialization |
| | | // exception. |
| | | private int messageID; |
| | | // The message ID for the message associated with this |
| | | // initialization exception. |
| | | private final int messageID; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new initialization exception with the provided message. |
| | | * |
| | | * @param messageID The unique identifier for the associated message. |
| | | * @param message The message that explains the problem that occurred. |
| | | * @param messageID The unique identifier for the associated |
| | | * message. |
| | | * @param message The message that explains the problem that |
| | | * occurred. |
| | | */ |
| | | public InitializationException(int messageID, String message) |
| | | { |
| | |
| | | |
| | | |
| | | /** |
| | | * Creates a new initialization exception with the provided message and root |
| | | * cause. |
| | | * Creates a new initialization exception with the provided message |
| | | * and root cause. |
| | | * |
| | | * @param messageID The unique identifier for the associated message. |
| | | * @param message The message that explains the problem that occurred. |
| | | * @param cause The exception that was caught to trigger this exception. |
| | | * @param messageID The unique identifier for the associated |
| | | * message. |
| | | * @param message The message that explains the problem that |
| | | * occurred. |
| | | * @param cause The exception that was caught to trigger this |
| | | * exception. |
| | | */ |
| | | public InitializationException(int messageID, String message, Throwable cause) |
| | | public InitializationException(int messageID, String message, |
| | | Throwable cause) |
| | | { |
| | | super(message, cause); |
| | | |
| | |
| | | * |
| | | * @return The unique identifier for the associated message. |
| | | */ |
| | | public int getMessageID() |
| | | public final int getMessageID() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMessageID"); |
| | | |
| | |
| | | |
| | | import org.opends.server.api.InvokableComponent; |
| | | import org.opends.server.config.ConfigAttribute; |
| | | import org.opends.server.core.DirectoryException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | |
| | | import java.util.LinkedList; |
| | | import java.util.StringTokenizer; |
| | | |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | |
| | | import java.util.Set; |
| | | import java.util.zip.GZIPOutputStream; |
| | | |
| | | import org.opends.server.core.DirectoryException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.UtilityMessages.*; |
| | |
| | | import java.util.Set; |
| | | import java.util.zip.GZIPInputStream; |
| | | |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.tools.makeldif.MakeLDIFInputStream; |
| | | import org.opends.server.tools.makeldif.TemplateFile; |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | | |
| | | |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.concurrent.locks.Lock; |
| | | import java.util.concurrent.locks.ReentrantLock; |
| | | import java.util.concurrent.locks.ReentrantReadWriteLock; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a Directory Server component that can keep track |
| | | * of all locks needed throughout the Directory Server. It is |
| | | * intended primarily for entry locking but support for other types of |
| | | * objects might be added in the future. |
| | | */ |
| | | public class LockManager |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.types.LockManager"; |
| | | |
| | | |
| | | |
| | | /** |
| | | * The number of buckets into which the set of global DN locks will |
| | | * be broken. |
| | | */ |
| | | public static final int NUM_GLOBAL_DN_LOCKS = |
| | | (10 * Runtime.getRuntime().availableProcessors()); |
| | | |
| | | |
| | | |
| | | /** |
| | | * The initial capacity to use for the DN lock hashtable. |
| | | */ |
| | | public static final int DN_TABLE_INITIAL_SIZE = 50; |
| | | |
| | | |
| | | |
| | | /** |
| | | * The load factor to use for the DN lock hashtable. |
| | | */ |
| | | public static final float DN_TABLE_LOAD_FACTOR = 0.75F; |
| | | |
| | | |
| | | |
| | | /** |
| | | * The default length of time in milliseconds to wait while |
| | | * attempting to acquire a read or write lock. |
| | | */ |
| | | public static final long DEFAULT_TIMEOUT = 3000; |
| | | |
| | | |
| | | |
| | | // The set of global DN locks that we need to ensure thread safety |
| | | // for all of the other operations. |
| | | private static ReentrantLock[] globalDNLocks; |
| | | |
| | | // The set of entry locks that the server knows about. |
| | | private static ConcurrentHashMap<DN,ReentrantReadWriteLock> |
| | | entryLocks; |
| | | |
| | | |
| | | |
| | | // Initialize all of the lock variables. |
| | | static |
| | | { |
| | | // Create the set of global DN locks. |
| | | globalDNLocks = new ReentrantLock[NUM_GLOBAL_DN_LOCKS]; |
| | | for (int i=0; i < NUM_GLOBAL_DN_LOCKS; i++) |
| | | { |
| | | globalDNLocks[i] = new ReentrantLock(); |
| | | } |
| | | |
| | | |
| | | // Create an empty table for holding the entry locks. |
| | | entryLocks = new ConcurrentHashMap<DN,ReentrantReadWriteLock>( |
| | | DN_TABLE_INITIAL_SIZE, DN_TABLE_LOAD_FACTOR, |
| | | NUM_GLOBAL_DN_LOCKS); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Attempts to acquire a read lock on the specified entry. It will |
| | | * succeed only if the lock is not already held. If any blocking is |
| | | * required, then this call will fail rather than block. |
| | | * |
| | | * @param entryDN The DN of the entry for which to obtain the read |
| | | * lock. |
| | | * |
| | | * @return The read lock that was acquired, or <CODE>null</CODE> if |
| | | * it was not possible to obtain a read lock for some |
| | | * reason. |
| | | */ |
| | | public static final Lock tryLockRead(DN entryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "tryLockRead", |
| | | String.valueOf(entryDN)); |
| | | |
| | | |
| | | int hashCode = (entryDN.hashCode() & 0x7FFFFFFF); |
| | | |
| | | |
| | | // Get the hash code for the provided entry DN and determine which |
| | | // global lock to acquire. This will ensure that no two threads |
| | | // will be allowed to lock or unlock the same entry at any given |
| | | // time, but should allow other entries with different hash codes |
| | | // to be processed. |
| | | ReentrantLock globalLock; |
| | | try |
| | | { |
| | | globalLock = globalDNLocks[hashCode % NUM_GLOBAL_DN_LOCKS]; |
| | | if (! globalLock.tryLock()) |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "lockRead", e); |
| | | |
| | | // This is not fine. Some unexpected error occurred. |
| | | assert debugMessage(DebugLogCategory.CORE_SERVER, |
| | | DebugLogSeverity.ERROR, CLASS_NAME, "lockRead", |
| | | "Unexpected exception while trying to obtain the " + |
| | | "global lock for entry " + entryDN.toString() + |
| | | ": " + stackTraceToSingleLineString(e)); |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | // At this point we have the global lock for this bucket. We must |
| | | // use a try/catch/finally block to ensure that the global lock is |
| | | // always released no matter what. |
| | | try |
| | | { |
| | | // Now check to see if the entry is already in the lock table. |
| | | ReentrantReadWriteLock entryLock = entryLocks.get(entryDN); |
| | | if (entryLock == null) |
| | | { |
| | | // No lock exists for the entry. Create one and put it in the |
| | | // table. |
| | | entryLock = new ReentrantReadWriteLock(); |
| | | if (entryLock.readLock().tryLock()) |
| | | { |
| | | entryLocks.put(entryDN, entryLock); |
| | | return entryLock.readLock(); |
| | | } |
| | | else |
| | | { |
| | | // This should never happen since we just created the lock. |
| | | assert debugMessage(DebugLogCategory.CORE_SERVER, |
| | | DebugLogSeverity.ERROR, CLASS_NAME, "lockRead", |
| | | "Unable to acquire read lock on " + |
| | | "newly-created lock for entry " + |
| | | entryDN.toString()); |
| | | return null; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | // There is already a lock for the entry. Try to get its read |
| | | // lock. |
| | | if (entryLock.readLock().tryLock()) |
| | | { |
| | | // We got the read lock. We don't need to do anything else. |
| | | return entryLock.readLock(); |
| | | } |
| | | else |
| | | { |
| | | // We couldn't get the read lock. Write a debug message. |
| | | assert debugMessage(DebugLogCategory.CORE_SERVER, |
| | | DebugLogSeverity.WARNING, CLASS_NAME, |
| | | "lockRead", |
| | | "Unable to acquire a read lock for entry " + |
| | | entryDN.toString() + " that was already " + |
| | | "present in the lock table."); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "lockRead", e); |
| | | |
| | | // This is not fine. Some unexpected error occurred. |
| | | assert debugMessage(DebugLogCategory.CORE_SERVER, |
| | | DebugLogSeverity.ERROR, CLASS_NAME, "lockRead", |
| | | "Unexpected exception while trying to obtain a " + |
| | | "read lock for entry " + entryDN.toString() + |
| | | ": " + stackTraceToSingleLineString(e)); |
| | | return null; |
| | | } |
| | | finally |
| | | { |
| | | // This will always be called even after a return. |
| | | globalLock.unlock(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Attempts to acquire a read lock for the specified entry. |
| | | * Multiple threads can hold the read lock concurrently for an entry |
| | | * as long as the write lock is held. If the write lock is held, |
| | | * then no other read or write locks will be allowed for that entry |
| | | * until the write lock is released. A default timeout will be used |
| | | * for the lock. |
| | | * |
| | | * @param entryDN The DN of the entry for which to obtain the read |
| | | * lock. |
| | | * |
| | | * @return The read lock that was acquired, or <CODE>null</CODE> if |
| | | * it was not possible to obtain a read lock for some |
| | | * reason. |
| | | */ |
| | | public static final Lock lockRead(DN entryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "lockRead", |
| | | String.valueOf(entryDN)); |
| | | |
| | | return lockRead(entryDN, DEFAULT_TIMEOUT); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Attempts to acquire a read lock for the specified entry. |
| | | * Multiple threads can hold the read lock concurrently for an entry |
| | | * as long as the write lock is held. If the write lock is held, |
| | | * then no other read or write locks will be allowed for that entry |
| | | * until the write lock is released. |
| | | * |
| | | * @param entryDN The DN of the entry for which to obtain the read |
| | | * lock. |
| | | * @param timeout The maximum length of time in milliseconds to |
| | | * wait for the lock before timing out. |
| | | * |
| | | * @return The read lock that was acquired, or <CODE>null</CODE> if |
| | | * it was not possible to obtain a read lock for some |
| | | * reason. |
| | | */ |
| | | public static final Lock lockRead(DN entryDN, long timeout) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "lockRead", String.valueOf(entryDN), |
| | | String.valueOf(timeout)); |
| | | |
| | | |
| | | int hashCode = (entryDN.hashCode() & 0x7FFFFFFF); |
| | | |
| | | |
| | | // Get the hash code for the provided entry DN and determine which |
| | | // global lock to acquire. This will ensure that no two threads |
| | | // will be allowed to lock or unlock the same entry at any given |
| | | // time, but should allow other entries with different hash codes |
| | | // to be processed. |
| | | ReentrantLock globalLock; |
| | | try |
| | | { |
| | | globalLock = globalDNLocks[hashCode % NUM_GLOBAL_DN_LOCKS]; |
| | | if (! globalLock.tryLock(timeout, TimeUnit.MILLISECONDS)) |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | catch (InterruptedException ie) |
| | | { |
| | | assert debugException(CLASS_NAME, "lockRead", ie); |
| | | |
| | | // This is fine. The thread trying to acquire the lock was |
| | | // interrupted. |
| | | return null; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "lockRead", e); |
| | | |
| | | // This is not fine. Some unexpected error occurred. |
| | | assert debugMessage(DebugLogCategory.CORE_SERVER, |
| | | DebugLogSeverity.ERROR, CLASS_NAME, "lockRead", |
| | | "Unexpected exception while trying to obtain the " + |
| | | "global lock for entry " + entryDN.toString() + |
| | | ": " + stackTraceToSingleLineString(e)); |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | // At this point we have the global lock for this bucket. We must |
| | | // use a try/catch/finally block to ensure that the global lock is |
| | | // always released no matter what. |
| | | try |
| | | { |
| | | // Now check to see if the entry is already in the lock table. |
| | | ReentrantReadWriteLock entryLock = entryLocks.get(entryDN); |
| | | if (entryLock == null) |
| | | { |
| | | // No lock exists for the entry. Create one and put it in the |
| | | // table. |
| | | entryLock = new ReentrantReadWriteLock(); |
| | | if (entryLock.readLock().tryLock(timeout, |
| | | TimeUnit.MILLISECONDS)) |
| | | { |
| | | entryLocks.put(entryDN, entryLock); |
| | | return entryLock.readLock(); |
| | | } |
| | | else |
| | | { |
| | | // This should never happen since we just created the lock. |
| | | assert debugMessage(DebugLogCategory.CORE_SERVER, |
| | | DebugLogSeverity.ERROR, CLASS_NAME, "lockRead", |
| | | "Unable to acquire read lock on " + |
| | | "newly-created lock for entry " + |
| | | entryDN.toString()); |
| | | return null; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | // There is already a lock for the entry. Try to get its read |
| | | // lock. |
| | | if (entryLock.readLock().tryLock(timeout, |
| | | TimeUnit.MILLISECONDS)) |
| | | { |
| | | // We got the read lock. We don't need to do anything else. |
| | | return entryLock.readLock(); |
| | | } |
| | | else |
| | | { |
| | | // We couldn't get the read lock. Write a debug message. |
| | | assert debugMessage(DebugLogCategory.CORE_SERVER, |
| | | DebugLogSeverity.WARNING, CLASS_NAME, |
| | | "lockRead", |
| | | "Unable to acquire a read lock for entry " + |
| | | entryDN.toString() + " that was already " + |
| | | "present in the lock table."); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | catch (InterruptedException ie) |
| | | { |
| | | assert debugException(CLASS_NAME, "lockRead", ie); |
| | | |
| | | // This is fine. The thread trying to acquire the lock was |
| | | // interrupted. |
| | | return null; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "lockRead", e); |
| | | |
| | | // This is not fine. Some unexpected error occurred. |
| | | assert debugMessage(DebugLogCategory.CORE_SERVER, |
| | | DebugLogSeverity.ERROR, CLASS_NAME, "lockRead", |
| | | "Unexpected exception while trying to obtain a " + |
| | | "read lock for entry " + entryDN.toString() + |
| | | ": " + stackTraceToSingleLineString(e)); |
| | | return null; |
| | | } |
| | | finally |
| | | { |
| | | // This will always be called even after a return. |
| | | globalLock.unlock(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Attempts to acquire a write lock on the specified entry. It will |
| | | * succeed only if the lock is not already held. If any blocking is |
| | | * required, then this call will fail rather than block. |
| | | * |
| | | * @param entryDN The DN of the entry for which to obtain the |
| | | * write lock. |
| | | * |
| | | * @return The write lock that was acquired, or <CODE>null</CODE> |
| | | * if it was not possible to obtain a write lock for some |
| | | * reason. |
| | | */ |
| | | public static final Lock tryLockWrite(DN entryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "lockWrite", |
| | | String.valueOf(entryDN)); |
| | | |
| | | |
| | | int hashCode = (entryDN.hashCode() & 0x7FFFFFFF); |
| | | |
| | | |
| | | // Get the hash code for the provided entry DN and determine which |
| | | // global lock to acquire. This will ensure that no two threads |
| | | // will be allowed to lock or unlock the same entry at any given |
| | | // time, but should allow other entries with different hash codes |
| | | // to be processed. |
| | | ReentrantLock globalLock; |
| | | try |
| | | { |
| | | globalLock = globalDNLocks[hashCode % NUM_GLOBAL_DN_LOCKS]; |
| | | if (! globalLock.tryLock()) |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "lockWrite", e); |
| | | |
| | | // This is not fine. Some unexpected error occurred. |
| | | assert debugMessage(DebugLogCategory.CORE_SERVER, |
| | | DebugLogSeverity.ERROR, CLASS_NAME, "lockWrite", |
| | | "Unexpected exception while trying to obtain the " + |
| | | "global lock for entry " + entryDN.toString() + |
| | | ": " + stackTraceToSingleLineString(e)); |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | // At this point we have the global lock for this bucket. We must |
| | | // use a try/catch/finally block to ensure that the global lock is |
| | | // always released no matter what. |
| | | try |
| | | { |
| | | // Now check to see if the entry is already in the lock table. |
| | | ReentrantReadWriteLock entryLock = entryLocks.get(entryDN); |
| | | if (entryLock == null) |
| | | { |
| | | // No lock exists for the entry. Create one and put it in the |
| | | // table. |
| | | entryLock = new ReentrantReadWriteLock(); |
| | | if (entryLock.writeLock().tryLock()) |
| | | { |
| | | entryLocks.put(entryDN, entryLock); |
| | | return entryLock.writeLock(); |
| | | } |
| | | else |
| | | { |
| | | // This should never happen since we just created the lock. |
| | | assert debugMessage(DebugLogCategory.CORE_SERVER, |
| | | DebugLogSeverity.ERROR, CLASS_NAME, "lockWrite", |
| | | "Unable to acquire write lock on " + |
| | | "newly-created lock for entry " + |
| | | entryDN.toString()); |
| | | return null; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | // There is already a lock for the entry. Try to get its |
| | | // write lock. |
| | | if (entryLock.writeLock().tryLock()) |
| | | { |
| | | // We got the write lock. We don't need to do anything |
| | | // else. |
| | | return entryLock.writeLock(); |
| | | } |
| | | else |
| | | { |
| | | // We couldn't get the write lock. Write a debug message. |
| | | assert debugMessage(DebugLogCategory.CORE_SERVER, |
| | | DebugLogSeverity.WARNING, CLASS_NAME, |
| | | "lockWrite", |
| | | "Unable to acquire the write lock for entry " + |
| | | entryDN.toString() + " that was already " + |
| | | "present in the lock table."); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "lockWrite", e); |
| | | |
| | | // This is not fine. Some unexpected error occurred. |
| | | assert debugMessage(DebugLogCategory.CORE_SERVER, |
| | | DebugLogSeverity.ERROR, CLASS_NAME, "lockWrite", |
| | | "Unexpected exception while trying to obtain the " + |
| | | "write lock for entry " + entryDN.toString() + |
| | | ": " + stackTraceToSingleLineString(e)); |
| | | return null; |
| | | } |
| | | finally |
| | | { |
| | | // This will always be called even after a return. |
| | | globalLock.unlock(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Attempts to acquire the write lock for the specified entry. Only |
| | | * a single thread may hold the write lock for an entry at any given |
| | | * time, and during that time no read locks may be held for it. A |
| | | * default timeout will be used for the lock. |
| | | * |
| | | * @param entryDN The DN of the entry for which to obtain the |
| | | * write lock. |
| | | * |
| | | * @return The write lock that was acquired, or <CODE>null</CODE> |
| | | * if it was not possible to obtain a read lock for some |
| | | * reason. |
| | | */ |
| | | public static final Lock lockWrite(DN entryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "lockRead", |
| | | String.valueOf(entryDN)); |
| | | |
| | | return lockWrite(entryDN, DEFAULT_TIMEOUT); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Attempts to acquire the write lock for the specified entry. Only |
| | | * a single thread may hold the write lock for an entry at any given |
| | | * time, and during that time no read locks may be held for it. |
| | | * |
| | | * @param entryDN The DN of the entry for which to obtain the |
| | | * write lock. |
| | | * @param timeout The maximum length of time in milliseconds to |
| | | * wait for the lock before timing out. |
| | | * |
| | | * @return The write lock that was acquired, or <CODE>null</CODE> |
| | | * if it was not possible to obtain a read lock for some |
| | | * reason. |
| | | */ |
| | | public static final Lock lockWrite(DN entryDN, long timeout) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "lockWrite", |
| | | String.valueOf(entryDN), |
| | | String.valueOf(timeout)); |
| | | |
| | | |
| | | int hashCode = (entryDN.hashCode() & 0x7FFFFFFF); |
| | | |
| | | |
| | | // Get the hash code for the provided entry DN and determine which |
| | | // global lock to acquire. This will ensure that no two threads |
| | | // will be allowed to lock or unlock the same entry at any given |
| | | // time, but should allow other entries with different hash codes |
| | | // to be processed. |
| | | ReentrantLock globalLock; |
| | | try |
| | | { |
| | | globalLock = globalDNLocks[hashCode % NUM_GLOBAL_DN_LOCKS]; |
| | | if (! globalLock.tryLock(timeout, TimeUnit.MILLISECONDS)) |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | catch (InterruptedException ie) |
| | | { |
| | | assert debugException(CLASS_NAME, "lockWrite", ie); |
| | | |
| | | // This is fine. The thread trying to acquire the lock was |
| | | // interrupted. |
| | | return null; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "lockWrite", e); |
| | | |
| | | // This is not fine. Some unexpected error occurred. |
| | | assert debugMessage(DebugLogCategory.CORE_SERVER, |
| | | DebugLogSeverity.ERROR, CLASS_NAME, "lockWrite", |
| | | "Unexpected exception while trying to obtain the " + |
| | | "global lock for entry " + entryDN.toString() + |
| | | ": " + stackTraceToSingleLineString(e)); |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | // At this point we have the global lock for this bucket. We must |
| | | // use a try/catch/finally block to ensure that the global lock is |
| | | // always released no matter what. |
| | | try |
| | | { |
| | | // Now check to see if the entry is already in the lock table. |
| | | ReentrantReadWriteLock entryLock = entryLocks.get(entryDN); |
| | | if (entryLock == null) |
| | | { |
| | | // No lock exists for the entry. Create one and put it in the |
| | | // table. |
| | | entryLock = new ReentrantReadWriteLock(); |
| | | if (entryLock.writeLock().tryLock(timeout, |
| | | TimeUnit.MILLISECONDS)) |
| | | { |
| | | entryLocks.put(entryDN, entryLock); |
| | | return entryLock.writeLock(); |
| | | } |
| | | else |
| | | { |
| | | // This should never happen since we just created the lock. |
| | | assert debugMessage(DebugLogCategory.CORE_SERVER, |
| | | DebugLogSeverity.ERROR, CLASS_NAME, "lockWrite", |
| | | "Unable to acquire write lock on " + |
| | | "newly-created lock for entry " + |
| | | entryDN.toString()); |
| | | return null; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | // There is already a lock for the entry. Try to get its |
| | | // write lock. |
| | | if (entryLock.writeLock().tryLock(timeout, |
| | | TimeUnit.MILLISECONDS)) |
| | | { |
| | | // We got the write lock. We don't need to do anything |
| | | // else. |
| | | return entryLock.writeLock(); |
| | | } |
| | | else |
| | | { |
| | | // We couldn't get the write lock. Write a debug message. |
| | | assert debugMessage(DebugLogCategory.CORE_SERVER, |
| | | DebugLogSeverity.WARNING, CLASS_NAME, |
| | | "lockWrite", |
| | | "Unable to acquire the write lock for entry " + |
| | | entryDN.toString() + " that was already " + |
| | | "present in the lock table."); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | catch (InterruptedException ie) |
| | | { |
| | | assert debugException(CLASS_NAME, "lockWrite", ie); |
| | | |
| | | // This is fine. The thread trying to acquire the lock was |
| | | // interrupted. |
| | | return null; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "lockWrite", e); |
| | | |
| | | // This is not fine. Some unexpected error occurred. |
| | | assert debugMessage(DebugLogCategory.CORE_SERVER, |
| | | DebugLogSeverity.ERROR, CLASS_NAME, "lockWrite", |
| | | "Unexpected exception while trying to obtain the " + |
| | | "write lock for entry " + entryDN.toString() + |
| | | ": " + stackTraceToSingleLineString(e)); |
| | | return null; |
| | | } |
| | | finally |
| | | { |
| | | // This will always be called even after a return. |
| | | globalLock.unlock(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Releases a read or write lock held on the specified entry. |
| | | * |
| | | * @param entryDN The DN of the entry for which to release the |
| | | * lock. |
| | | * @param lock The read or write lock held for the entry. |
| | | */ |
| | | public static final void unlock(DN entryDN, Lock lock) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "unlock", String.valueOf(entryDN)); |
| | | |
| | | |
| | | // Unlock the entry without grabbing any additional locks. |
| | | try |
| | | { |
| | | lock.unlock(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | // This should never happen. However, if it does, then just |
| | | // capture the exception and continue because it may still be |
| | | // necessary to remove the lock for the entry from the table. |
| | | assert debugException(CLASS_NAME, "unlock", e); |
| | | } |
| | | |
| | | |
| | | int hashCode = (entryDN.hashCode() & 0x7FFFFFFF); |
| | | |
| | | |
| | | // Now grab the global lock for the entry and check to see if we |
| | | // can remove it from the table. |
| | | ReentrantLock globalLock; |
| | | try |
| | | { |
| | | globalLock = globalDNLocks[hashCode % NUM_GLOBAL_DN_LOCKS]; |
| | | |
| | | // This will block until it acquires the lock or until it is |
| | | // interrupted. |
| | | globalLock.lockInterruptibly(); |
| | | } |
| | | catch (InterruptedException ie) |
| | | { |
| | | assert debugException(CLASS_NAME, "unlock", ie); |
| | | |
| | | // The lock trying to acquire the lock was interrupted. In this |
| | | // case, we'll just return. The worst that could happen here is |
| | | // that a lock that isn't held by anything is still in the table |
| | | // which will just consume a little memory. |
| | | return; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "unlock", e); |
| | | |
| | | // This is not fine. Some unexpected error occurred. But |
| | | // again, the worst that could happen is that we may not clean |
| | | // up an unheld lock, which isn't really that big a deal unless |
| | | // it happens too often. |
| | | assert debugMessage(DebugLogCategory.CORE_SERVER, |
| | | DebugLogSeverity.ERROR, CLASS_NAME, "unlock", |
| | | "Unexpected exception while trying to obtain the " + |
| | | "global lock for entry " + entryDN.toString() + |
| | | ": " + stackTraceToSingleLineString(e)); |
| | | return; |
| | | } |
| | | |
| | | |
| | | // At this point we have the global lock for this bucket. We must |
| | | // use a try/catch/finally block to ensure that the global lock is |
| | | // always released no matter what. |
| | | try |
| | | { |
| | | ReentrantReadWriteLock entryLock = entryLocks.get(entryDN); |
| | | if ((entryLock != null) && |
| | | (entryLock.getReadLockCount() == 0) && |
| | | (! entryLock.isWriteLocked())) |
| | | { |
| | | // This lock isn't held so we can remove it from the table. |
| | | entryLocks.remove(entryDN); |
| | | } |
| | | |
| | | return; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "unlock", e); |
| | | |
| | | // This should never happen. |
| | | assert debugMessage(DebugLogCategory.CORE_SERVER, |
| | | DebugLogSeverity.ERROR, CLASS_NAME, "unlock", |
| | | "Unexpected exception while trying to determine " + |
| | | "whether the lock for entry " + entryDN.toString() + |
| | | " can be removed: " + |
| | | stackTraceToSingleLineString(e)); |
| | | return; |
| | | } |
| | | finally |
| | | { |
| | | globalLock.unlock(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Removes any reference to the specified entry from the lock table. |
| | | * This may be helpful if there is a case where a lock has been |
| | | * orphaned somehow and must be removed before other threads may |
| | | * acquire it. |
| | | * |
| | | * @param entryDN The DN of the entry for which to remove the lock |
| | | * from the table. |
| | | * |
| | | * @return The read write lock that was removed from the table, or |
| | | * <CODE>null</CODE> if nothing was in the table for the |
| | | * specified entry. If a lock object is returned, it may |
| | | * be possible to get information about who was holding it. |
| | | */ |
| | | public static final ReentrantReadWriteLock destroyLock(DN entryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "destroyLock", |
| | | String.valueOf(entryDN)); |
| | | |
| | | return entryLocks.remove(entryDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the number of entries currently held in the lock table. |
| | | * Note that this may be an expensive operation. |
| | | * |
| | | * @return The number of entries currently held in the lock table. |
| | | */ |
| | | public static final int lockTableSize() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "lockTableSize"); |
| | | |
| | | return entryLocks.size(); |
| | | } |
| | | } |
| | | |
| File was renamed from opends/src/server/org/opends/server/core/OperationType.java |
| | |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.core; |
| | | package org.opends.server.types; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This enumeration defines the set of possible operation types that may be |
| | | * processed by the Directory Server. |
| | | * This enumeration defines the set of possible operation types that |
| | | * may be processed by the Directory Server. |
| | | */ |
| | | public enum OperationType |
| | | { |
| | |
| | | |
| | | |
| | | // The string representation of this operation type. |
| | | private String operationName; |
| | | private final String operationName; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new operation type with the provided operation name. |
| | | * |
| | | * @param operationName The operation name for this operation type. |
| | | * @param operationName The operation name for this operation |
| | | * type. |
| | | */ |
| | | private OperationType(String operationName) |
| | | { |
| | |
| | | * |
| | | * @return The human-readable name for this operation type. |
| | | */ |
| | | public String getOperationName() |
| | | public final String getOperationName() |
| | | { |
| | | return operationName; |
| | | } |
| | |
| | | * |
| | | * @return A string representation of this operation type. |
| | | */ |
| | | public String toString() |
| | | public final String toString() |
| | | { |
| | | return operationName; |
| | | } |
| | |
| | | import java.util.List; |
| | | import java.util.TreeSet; |
| | | |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | | |
| | | |
| | | import java.util.LinkedHashSet; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | | import org.opends.server.api.AttributeSyntax; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | | import org.opends.server.api.MatchingRule; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a data structure that holds information about |
| | | * the components of the Directory Server schema. It includes the |
| | | * following kinds of elements: |
| | | * |
| | | * <UL> |
| | | * <LI>Attribute type definitions</LI> |
| | | * <LI>Objectclass definitions</LI> |
| | | * <LI>Attribute syntax definitions</LI> |
| | | * <LI>Matching rule definitions</LI> |
| | | * <LI>Matching rule use definitions</LI> |
| | | * <LI>DIT content rule definitions</LI> |
| | | * <LI>DIT structure rule definitions</LI> |
| | | * <LI>Name form definitions</LI> |
| | | * </UL> |
| | | */ |
| | | public class Schema |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.types.Schema"; |
| | | |
| | | |
| | | |
| | | // The set of attribute type definitions for this schema, mapped |
| | | // between the lowercase names and OID for the definition and the |
| | | // attribute type itself. |
| | | private ConcurrentHashMap<String,AttributeType> attributeTypes; |
| | | |
| | | // The set of objectclass definitions for this schema, mapped |
| | | // between the lowercase names and OID for the definition and the |
| | | // objectclass itself. |
| | | private ConcurrentHashMap<String,ObjectClass> objectClasses; |
| | | |
| | | // The set of attribute syntaxes for this schema, mapped between the |
| | | // OID for the syntax and the syntax itself. |
| | | private ConcurrentHashMap<String,AttributeSyntax> syntaxes; |
| | | |
| | | // The entire set of matching rules for this schema, mapped between |
| | | // the lowercase names and OID for the definition and the matching |
| | | // rule itself. |
| | | private ConcurrentHashMap<String,MatchingRule> matchingRules; |
| | | |
| | | // The set of approximate matching rules for this schema, mapped |
| | | // between the lowercase names and OID for the definition and the |
| | | // matching rule itself. |
| | | private ConcurrentHashMap<String,ApproximateMatchingRule> |
| | | approximateMatchingRules; |
| | | |
| | | // The set of equality matching rules for this schema, mapped |
| | | // between the lowercase names and OID for the definition and the |
| | | // matching rule itself. |
| | | private ConcurrentHashMap<String,EqualityMatchingRule> |
| | | equalityMatchingRules; |
| | | |
| | | // The set of ordering matching rules for this schema, mapped |
| | | // between the lowercase names and OID for the definition and the |
| | | // matching rule itself. |
| | | private ConcurrentHashMap<String,OrderingMatchingRule> |
| | | orderingMatchingRules; |
| | | |
| | | // The set of substring matching rules for this schema, mapped |
| | | // between the lowercase names and OID for the definition and the |
| | | // matching rule itself. |
| | | private ConcurrentHashMap<String,SubstringMatchingRule> |
| | | substringMatchingRules; |
| | | |
| | | // The set of matching rule uses for this schema, mapped between the |
| | | // matching rule for the definition and the matching rule use |
| | | // itself. |
| | | private ConcurrentHashMap<MatchingRule,MatchingRuleUse> |
| | | matchingRuleUses; |
| | | |
| | | // The set of DIT content rules for this schema, mapped between the |
| | | // structural objectclass for the definition and the DIT content |
| | | // rule itself. |
| | | private ConcurrentHashMap<ObjectClass,DITContentRule> |
| | | ditContentRules; |
| | | |
| | | // The set of DIT structure rules for this schema, mapped between |
| | | // the name form for the definition and the DIT structure rule |
| | | // itself. |
| | | private ConcurrentHashMap<Integer,DITStructureRule> |
| | | ditStructureRulesByID; |
| | | |
| | | // The set of DIT structure rules for this schema, mapped between |
| | | // the name form for the definition and the DIT structure rule |
| | | // itself. |
| | | private ConcurrentHashMap<NameForm,DITStructureRule> |
| | | ditStructureRulesByNameForm; |
| | | |
| | | // The set of name forms for this schema, mapped between the |
| | | // structural objectclass for the definition and the name form |
| | | // itself. |
| | | private ConcurrentHashMap<ObjectClass,NameForm> nameFormsByOC; |
| | | |
| | | // The set of name forms for this schema, mapped between the |
| | | // names/OID and the name form itself. |
| | | private ConcurrentHashMap<String,NameForm> nameFormsByName; |
| | | |
| | | // The set of pre-encoded attribute syntax representations. |
| | | private LinkedHashSet<AttributeValue> syntaxSet; |
| | | |
| | | // The set of pre-encoded attribute type representations. |
| | | private LinkedHashSet<AttributeValue> attributeTypeSet; |
| | | |
| | | // The set of pre-encoded DIT content rule representations. |
| | | private LinkedHashSet<AttributeValue> ditContentRuleSet; |
| | | |
| | | // The set of pre-encoded DIT structure rule representations. |
| | | private LinkedHashSet<AttributeValue> ditStructureRuleSet; |
| | | |
| | | // The set of pre-encoded matching rule representations. |
| | | private LinkedHashSet<AttributeValue> matchingRuleSet; |
| | | |
| | | // The set of pre-encoded matching rule use representations. |
| | | private LinkedHashSet<AttributeValue> matchingRuleUseSet; |
| | | |
| | | // The set of pre-encoded name form representations. |
| | | private LinkedHashSet<AttributeValue> nameFormSet; |
| | | |
| | | // The set of pre-encoded objectclass representations. |
| | | private LinkedHashSet<AttributeValue> objectClassSet; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new schema structure with all elements initialized but |
| | | * empty. |
| | | */ |
| | | public Schema() |
| | | { |
| | | assert debugConstructor(CLASS_NAME); |
| | | |
| | | attributeTypes = new ConcurrentHashMap<String,AttributeType>(); |
| | | objectClasses = new ConcurrentHashMap<String,ObjectClass>(); |
| | | syntaxes = new ConcurrentHashMap<String,AttributeSyntax>(); |
| | | matchingRules = new ConcurrentHashMap<String,MatchingRule>(); |
| | | approximateMatchingRules = |
| | | new ConcurrentHashMap<String,ApproximateMatchingRule>(); |
| | | equalityMatchingRules = |
| | | new ConcurrentHashMap<String,EqualityMatchingRule>(); |
| | | orderingMatchingRules = |
| | | new ConcurrentHashMap<String,OrderingMatchingRule>(); |
| | | substringMatchingRules = |
| | | new ConcurrentHashMap<String,SubstringMatchingRule>(); |
| | | matchingRuleUses = |
| | | new ConcurrentHashMap<MatchingRule,MatchingRuleUse>(); |
| | | ditContentRules = |
| | | new ConcurrentHashMap<ObjectClass,DITContentRule>(); |
| | | ditStructureRulesByID = |
| | | new ConcurrentHashMap<Integer,DITStructureRule>(); |
| | | ditStructureRulesByNameForm = |
| | | new ConcurrentHashMap<NameForm,DITStructureRule>(); |
| | | nameFormsByOC = new ConcurrentHashMap<ObjectClass,NameForm>(); |
| | | nameFormsByName = new ConcurrentHashMap<String,NameForm>(); |
| | | |
| | | |
| | | syntaxSet = new LinkedHashSet<AttributeValue>(); |
| | | attributeTypeSet = new LinkedHashSet<AttributeValue>(); |
| | | ditContentRuleSet = new LinkedHashSet<AttributeValue>(); |
| | | ditStructureRuleSet = new LinkedHashSet<AttributeValue>(); |
| | | matchingRuleSet = new LinkedHashSet<AttributeValue>(); |
| | | matchingRuleUseSet = new LinkedHashSet<AttributeValue>(); |
| | | nameFormSet = new LinkedHashSet<AttributeValue>(); |
| | | objectClassSet = new LinkedHashSet<AttributeValue>(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the attribute type definitions for this schema, as a |
| | | * mapping between the lowercase names and OIDs for the attribute |
| | | * type and the attribute type itself. Each attribute type may be |
| | | * associated with multiple keys (once for the OID and again for |
| | | * each name). The contents of the returned mapping must not be |
| | | * altered. |
| | | * |
| | | * @return The attribute type definitions for this schema. |
| | | */ |
| | | public final ConcurrentHashMap<String,AttributeType> |
| | | getAttributeTypes() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAttributeTypes"); |
| | | |
| | | return attributeTypes; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of defined attribute types for this schema. |
| | | * |
| | | * @return The set of defined attribute types for this schema. |
| | | */ |
| | | public final LinkedHashSet<AttributeValue> getAttributeTypeSet() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAttributeTypeSet"); |
| | | |
| | | return attributeTypeSet; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the attribute type definition with the specified name |
| | | * or OID. |
| | | * |
| | | * @param lowerName The name or OID of the attribute type to |
| | | * retrieve, formatted in all lowercase |
| | | * characters. |
| | | * |
| | | * @return The requested attribute type, or <CODE>null</CODE> if no |
| | | * type is registered with the provided name or OID. |
| | | */ |
| | | public final AttributeType getAttributeType(String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAttributeType", |
| | | String.valueOf(lowerName)); |
| | | |
| | | return attributeTypes.get(lowerName); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided attribute type definition with this |
| | | * schema. |
| | | * |
| | | * @param attributeType The attribute type to register with |
| | | * this schema. |
| | | * @param overwriteExisting Indicates whether to overwrite an |
| | | * existing mapping if there are any |
| | | * conflicts (i.e., another attribute |
| | | * type with the same OID or name). |
| | | * |
| | | * @throws DirectoryException If a conflict is encountered and the |
| | | * <CODE>overwriteExisting</CODE> flag |
| | | * is set to <CODE>false</CODE> |
| | | */ |
| | | public final void registerAttributeType(AttributeType attributeType, |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerAttributeType", |
| | | String.valueOf(attributeType), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | synchronized (attributeTypes) |
| | | { |
| | | if (! overwriteExisting) |
| | | { |
| | | String oid = toLowerCase(attributeType.getOID()); |
| | | if (attributeTypes.containsKey(oid)) |
| | | { |
| | | AttributeType conflictingType = attributeTypes.get(oid); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_ATTRIBUTE_OID; |
| | | String message = |
| | | getMessage(msgID, attributeType.getNameOrOID(), oid, |
| | | conflictingType.getNameOrOID()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | |
| | | for (String name : attributeType.getNormalizedNames()) |
| | | { |
| | | if (attributeTypes.containsKey(name)) |
| | | { |
| | | AttributeType conflictingType = attributeTypes.get(name); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_ATTRIBUTE_NAME; |
| | | String message = |
| | | getMessage(msgID, attributeType.getNameOrOID(), name, |
| | | conflictingType.getNameOrOID()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | } |
| | | } |
| | | |
| | | attributeTypes.put(toLowerCase(attributeType.getOID()), |
| | | attributeType); |
| | | |
| | | for (String name : attributeType.getNormalizedNames()) |
| | | { |
| | | attributeTypes.put(name, attributeType); |
| | | } |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = attributeType.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | attributeTypeSet.add(new AttributeValue(rawValue, normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided attribute type definition with this |
| | | * schema. |
| | | * |
| | | * @param attributeType The attribute type to deregister with this |
| | | * schema. |
| | | */ |
| | | public final void deregisterAttributeType( |
| | | AttributeType attributeType) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterAttributeType", |
| | | String.valueOf(attributeType)); |
| | | |
| | | synchronized (attributeTypes) |
| | | { |
| | | attributeTypes.remove(toLowerCase(attributeType.getOID()), |
| | | attributeType); |
| | | |
| | | for (String name : attributeType.getNormalizedNames()) |
| | | { |
| | | attributeTypes.remove(name, attributeType); |
| | | } |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = attributeType.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | attributeTypeSet.remove(new AttributeValue(rawValue, |
| | | normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the objectclass definitions for this schema, as a |
| | | * mapping between the lowercase names and OIDs for the objectclass |
| | | * and the objectclass itself. Each objectclass may be associated |
| | | * with multiple keys (once for the OID and again for each name). |
| | | * The contents of the returned mapping must not be altered. |
| | | * |
| | | * @return The objectclass definitions for this schema. |
| | | */ |
| | | public final ConcurrentHashMap<String,ObjectClass> |
| | | getObjectClasses() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getObjectClasses"); |
| | | |
| | | return objectClasses; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of defined objectclasses for this schema. |
| | | * |
| | | * @return The set of defined objectclasses for this schema. |
| | | */ |
| | | public final LinkedHashSet<AttributeValue> getObjectClassSet() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getObjectClassSet"); |
| | | |
| | | return objectClassSet; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the objectclass definition with the specified name or |
| | | * OID. |
| | | * |
| | | * @param lowerName The name or OID of the objectclass to |
| | | * retrieve, formatted in all lowercase |
| | | * characters. |
| | | * |
| | | * @return The requested objectclass, or <CODE>null</CODE> if no |
| | | * class is registered with the provided name or OID. |
| | | */ |
| | | public final ObjectClass getObjectClass(String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getObjectClass", |
| | | String.valueOf(lowerName)); |
| | | |
| | | return objectClasses.get(lowerName); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided objectclass definition with this schema. |
| | | * |
| | | * @param objectClass The objectclass to register with this |
| | | * schema. |
| | | * @param overwriteExisting Indicates whether to overwrite an |
| | | * existing mapping if there are any |
| | | * conflicts (i.e., another objectclass |
| | | * with the same OID or name). |
| | | * |
| | | * @throws DirectoryException If a conflict is encountered and the |
| | | * <CODE>overwriteExisting</CODE> flag |
| | | * is set to <CODE>false</CODE>. |
| | | */ |
| | | public final void registerObjectClass(ObjectClass objectClass, |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerObjectClass", |
| | | String.valueOf(objectClass), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | synchronized (objectClasses) |
| | | { |
| | | if (! overwriteExisting) |
| | | { |
| | | String oid = toLowerCase(objectClass.getOID()); |
| | | if (objectClasses.containsKey(oid)) |
| | | { |
| | | ObjectClass conflictingClass = objectClasses.get(oid); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_OBJECTCLASS_OID; |
| | | String message = |
| | | getMessage(msgID, objectClass.getNameOrOID(), |
| | | oid, conflictingClass.getNameOrOID()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | |
| | | for (String name : objectClass.getNormalizedNames()) |
| | | { |
| | | if (objectClasses.containsKey(name)) |
| | | { |
| | | ObjectClass conflictingClass = objectClasses.get(name); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_OBJECTCLASS_NAME; |
| | | String message = |
| | | getMessage(msgID, objectClass.getNameOrOID(), name, |
| | | conflictingClass.getNameOrOID()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | } |
| | | } |
| | | |
| | | objectClasses.put(toLowerCase(objectClass.getOID()), |
| | | objectClass); |
| | | |
| | | for (String name : objectClass.getNormalizedNames()) |
| | | { |
| | | objectClasses.put(name, objectClass); |
| | | } |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = objectClass.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | objectClassSet.add(new AttributeValue(rawValue, normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided objectclass definition with this schema. |
| | | * |
| | | * @param objectClass The objectclass to deregister with this |
| | | * schema. |
| | | */ |
| | | public final void deregisterObjectClass(ObjectClass objectClass) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterObjectClass", |
| | | String.valueOf(objectClass)); |
| | | |
| | | synchronized (objectClasses) |
| | | { |
| | | objectClasses.remove(toLowerCase(objectClass.getOID()), |
| | | objectClass); |
| | | |
| | | for (String name : objectClass.getNormalizedNames()) |
| | | { |
| | | objectClasses.remove(name, objectClass); |
| | | } |
| | | |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = objectClass.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | objectClassSet.remove(new AttributeValue(rawValue, normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the attribute syntax definitions for this schema, as a |
| | | * mapping between the OID for the syntax and the syntax itself. |
| | | * Each syntax should only be present once, since its only key is |
| | | * its OID. The contents of the returned mapping must not be |
| | | * altered. |
| | | * |
| | | * @return The attribute syntax definitions for this schema. |
| | | */ |
| | | public final ConcurrentHashMap<String,AttributeSyntax> getSyntaxes() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSyntaxes"); |
| | | |
| | | return syntaxes; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of defined attribute syntaxes for this schema. |
| | | * |
| | | * @return The set of defined attribute syntaxes for this schema. |
| | | */ |
| | | public final LinkedHashSet<AttributeValue> getSyntaxSet() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSyntaxSet"); |
| | | |
| | | return syntaxSet; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the attribute syntax definition with the OID. |
| | | * |
| | | * @param lowerName The OID of the attribute syntax to retrieve, |
| | | * formatted in all lowercase characters. |
| | | * |
| | | * @return The requested attribute syntax, or <CODE>null</CODE> if |
| | | * no syntax is registered with the provided OID. |
| | | */ |
| | | public final AttributeSyntax getSyntax(String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSyntax", |
| | | String.valueOf(lowerName)); |
| | | |
| | | return syntaxes.get(lowerName); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided attribute syntax definition with this |
| | | * schema. |
| | | * |
| | | * @param syntax The attribute syntax to register with |
| | | * this schema. |
| | | * @param overwriteExisting Indicates whether to overwrite an |
| | | * existing mapping if there are any |
| | | * conflicts (i.e., another attribute |
| | | * syntax with the same OID). |
| | | * |
| | | * @throws DirectoryException If a conflict is encountered and the |
| | | * <CODE>overwriteExisting</CODE> flag |
| | | * is set to <CODE>false</CODE> |
| | | */ |
| | | public final void registerSyntax(AttributeSyntax syntax, |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerSyntax", |
| | | String.valueOf(syntax), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | synchronized (syntaxes) |
| | | { |
| | | if (! overwriteExisting) |
| | | { |
| | | String oid = toLowerCase(syntax.getOID()); |
| | | if (syntaxes.containsKey(oid)) |
| | | { |
| | | AttributeSyntax conflictingSyntax = syntaxes.get(oid); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_SYNTAX_OID; |
| | | String message = |
| | | getMessage(msgID, syntax.getSyntaxName(), |
| | | oid, conflictingSyntax.getSyntaxName()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | } |
| | | |
| | | syntaxes.put(toLowerCase(syntax.getOID()), syntax); |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = syntax.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | syntaxSet.add(new AttributeValue(rawValue, normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided attribute syntax definition with this |
| | | * schema. |
| | | * |
| | | * @param syntax The attribute syntax to deregister with this |
| | | * schema. |
| | | */ |
| | | public final void deregisterSyntax(AttributeSyntax syntax) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterSyntax", |
| | | String.valueOf(syntax)); |
| | | |
| | | synchronized (syntaxes) |
| | | { |
| | | syntaxes.remove(toLowerCase(syntax.getOID()), syntax); |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = syntax.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | syntaxSet.remove(new AttributeValue(rawValue, normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the entire set of matching rule definitions for this |
| | | * schema, as a mapping between the lowercase names and OIDs for the |
| | | * matching rule and the matching rule itself. Each matching rule |
| | | * may be associated with multiple keys (once for the OID and again |
| | | * for each name). This should be a superset of the sets of |
| | | * approximate, equality, ordering, and substring matching rules. |
| | | * The contents of the returned mapping must not be altered. |
| | | * |
| | | * @return The matching rule definitions for this schema. |
| | | */ |
| | | public final ConcurrentHashMap<String,MatchingRule> |
| | | getMatchingRules() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMatchingRules"); |
| | | |
| | | return matchingRules; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of defined matching rules for this schema. |
| | | * |
| | | * @return The set of defined matching rules for this schema. |
| | | */ |
| | | public final LinkedHashSet<AttributeValue> getMatchingRuleSet() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMatchingRuleSet"); |
| | | |
| | | return matchingRuleSet; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the matching rule definition with the specified name or |
| | | * OID. |
| | | * |
| | | * @param lowerName The name or OID of the matching rule to |
| | | * retrieve, formatted in all lowercase |
| | | * characters. |
| | | * |
| | | * @return The requested matching rule, or <CODE>null</CODE> if no |
| | | * rule is registered with the provided name or OID. |
| | | */ |
| | | public final MatchingRule getMatchingRule(String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMatchingRule", |
| | | String.valueOf(lowerName)); |
| | | |
| | | return matchingRules.get(lowerName); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided matching rule definition with this schema. |
| | | * |
| | | * @param matchingRule The matching rule to register with |
| | | * this schema. |
| | | * @param overwriteExisting Indicates whether to overwrite an |
| | | * existing mapping if there are any |
| | | * conflicts (i.e., |
| | | * another matching rule with the same |
| | | * OID or name). |
| | | * |
| | | * @throws DirectoryException If a conflict is encountered and the |
| | | * <CODE>overwriteExisting</CODE> flag |
| | | * is set to <CODE>false</CODE> |
| | | */ |
| | | public final void registerMatchingRule(MatchingRule matchingRule, |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerMatchingRule", |
| | | String.valueOf(matchingRule), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | if (matchingRule instanceof ApproximateMatchingRule) |
| | | { |
| | | registerApproximateMatchingRule( |
| | | (ApproximateMatchingRule) matchingRule, overwriteExisting); |
| | | } |
| | | else if (matchingRule instanceof EqualityMatchingRule) |
| | | { |
| | | registerEqualityMatchingRule( |
| | | (EqualityMatchingRule) matchingRule, overwriteExisting); |
| | | } |
| | | else if (matchingRule instanceof OrderingMatchingRule) |
| | | { |
| | | registerOrderingMatchingRule( |
| | | (OrderingMatchingRule) matchingRule, overwriteExisting); |
| | | } |
| | | else if (matchingRule instanceof SubstringMatchingRule) |
| | | { |
| | | registerSubstringMatchingRule( |
| | | (SubstringMatchingRule) matchingRule, overwriteExisting); |
| | | } |
| | | else |
| | | { |
| | | synchronized (matchingRules) |
| | | { |
| | | if (! overwriteExisting) |
| | | { |
| | | String oid = toLowerCase(matchingRule.getOID()); |
| | | if (matchingRules.containsKey(oid)) |
| | | { |
| | | MatchingRule conflictingRule = matchingRules.get(oid); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_MR_OID; |
| | | String message = |
| | | getMessage(msgID, matchingRule.getNameOrOID(), oid, |
| | | conflictingRule.getNameOrOID()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | |
| | | String name = matchingRule.getName(); |
| | | if (name != null) |
| | | { |
| | | name = toLowerCase(name); |
| | | if (matchingRules.containsKey(name)) |
| | | { |
| | | MatchingRule conflictingRule = matchingRules.get(name); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_MR_NAME; |
| | | String message = |
| | | getMessage(msgID, matchingRule.getOID(), name, |
| | | conflictingRule.getOID()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | } |
| | | } |
| | | |
| | | matchingRules.put(toLowerCase(matchingRule.getOID()), |
| | | matchingRule); |
| | | |
| | | String name = matchingRule.getName(); |
| | | if (name != null) |
| | | { |
| | | matchingRules.put(toLowerCase(name), matchingRule); |
| | | } |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would |
| | | // use a very expensive matching rule (OID first component |
| | | // match) that would kill performance. |
| | | String valueString = matchingRule.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | matchingRuleSet.add(new AttributeValue(rawValue, normValue)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided matching rule definition with this |
| | | * schema. |
| | | * |
| | | * @param matchingRule The matching rule to deregister with this |
| | | * schema. |
| | | */ |
| | | public final void deregisterMatchingRule(MatchingRule matchingRule) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterMatchingRule", |
| | | String.valueOf(matchingRule)); |
| | | |
| | | if (matchingRule instanceof ApproximateMatchingRule) |
| | | { |
| | | deregisterApproximateMatchingRule( |
| | | (ApproximateMatchingRule) matchingRule); |
| | | } |
| | | else if (matchingRule instanceof EqualityMatchingRule) |
| | | { |
| | | deregisterEqualityMatchingRule( |
| | | (EqualityMatchingRule) matchingRule); |
| | | } |
| | | else if (matchingRule instanceof OrderingMatchingRule) |
| | | { |
| | | deregisterOrderingMatchingRule( |
| | | (OrderingMatchingRule) matchingRule); |
| | | } |
| | | else if (matchingRule instanceof SubstringMatchingRule) |
| | | { |
| | | deregisterSubstringMatchingRule( |
| | | (SubstringMatchingRule) matchingRule); |
| | | } |
| | | else |
| | | { |
| | | synchronized (matchingRules) |
| | | { |
| | | matchingRules.remove(toLowerCase(matchingRule.getOID()), |
| | | matchingRule); |
| | | |
| | | String name = matchingRule.getName(); |
| | | if (name != null) |
| | | { |
| | | matchingRules.remove(toLowerCase(name), matchingRule); |
| | | } |
| | | |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would |
| | | // use a very expensive matching rule (OID first component |
| | | // match) that would kill performance. |
| | | String valueString = matchingRule.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | matchingRuleSet.remove(new AttributeValue(rawValue, |
| | | normValue)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the approximate matching rule definitions for this |
| | | * schema, as a mapping between the lowercase names and OIDs for the |
| | | * matching rule and the matching rule itself. Each matching rule |
| | | * may be associated with multiple keys (once for the OID and again |
| | | * for each name). The contents of the returned mapping must not be |
| | | * altered. |
| | | * |
| | | * @return The approximate matching rule definitions for this |
| | | * schema. |
| | | */ |
| | | public final ConcurrentHashMap<String,ApproximateMatchingRule> |
| | | getApproximateMatchingRules() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getApproximateMatchingRules"); |
| | | |
| | | return approximateMatchingRules; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the approximate matching rule definition with the |
| | | * specified name or OID. |
| | | * |
| | | * @param lowerName The name or OID of the matching rule to |
| | | * retrieve, formatted in all lowercase |
| | | * characters. |
| | | * |
| | | * @return The requested matching rule, or <CODE>null</CODE> if no |
| | | * approximate matching rule is registered with the |
| | | * provided name or OID. |
| | | */ |
| | | public final ApproximateMatchingRule |
| | | getApproximateMatchingRule(String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getApproximateMatchingRule", |
| | | String.valueOf(lowerName)); |
| | | |
| | | return approximateMatchingRules.get(lowerName); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided approximate matching rule with this |
| | | * schema. |
| | | * |
| | | * @param matchingRule The approximate matching rule to |
| | | * register. |
| | | * @param overwriteExisting Indicates whether to overwrite an |
| | | * existing mapping if there are any |
| | | * conflicts (i.e., another matching rule |
| | | * with the same OID or name). |
| | | * |
| | | * @throws DirectoryException If a conflict is encountered and the |
| | | * <CODE>overwriteExisting</CODE> flag |
| | | * is set to <CODE>false</CODE> |
| | | */ |
| | | public final void registerApproximateMatchingRule( |
| | | ApproximateMatchingRule matchingRule, |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerApproximateMatchingRule", |
| | | String.valueOf(matchingRule), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | |
| | | synchronized (matchingRules) |
| | | { |
| | | if (! overwriteExisting) |
| | | { |
| | | String oid = toLowerCase(matchingRule.getOID()); |
| | | if (matchingRules.containsKey(oid)) |
| | | { |
| | | MatchingRule conflictingRule = matchingRules.get(oid); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_MR_OID; |
| | | String message = |
| | | getMessage(msgID, matchingRule.getNameOrOID(), oid, |
| | | conflictingRule.getNameOrOID()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | |
| | | String name = matchingRule.getName(); |
| | | if (name != null) |
| | | { |
| | | name = toLowerCase(name); |
| | | if (matchingRules.containsKey(name)) |
| | | { |
| | | MatchingRule conflictingRule = matchingRules.get(name); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_MR_NAME; |
| | | String message = |
| | | getMessage(msgID, matchingRule.getOID(), name, |
| | | conflictingRule.getOID()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | } |
| | | } |
| | | |
| | | String oid = toLowerCase(matchingRule.getOID()); |
| | | approximateMatchingRules.put(oid, matchingRule); |
| | | matchingRules.put(oid, matchingRule); |
| | | |
| | | String name = matchingRule.getName(); |
| | | if (name != null) |
| | | { |
| | | name = toLowerCase(name); |
| | | approximateMatchingRules.put(name, matchingRule); |
| | | matchingRules.put(name, matchingRule); |
| | | } |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = matchingRule.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | matchingRuleSet.add(new AttributeValue(rawValue, normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided approximate matching rule definition |
| | | * with this schema. |
| | | * |
| | | * @param matchingRule The approximate matching rule to deregister |
| | | * with this schema. |
| | | */ |
| | | public final void deregisterApproximateMatchingRule( |
| | | ApproximateMatchingRule matchingRule) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterApproximateMatchingRule", |
| | | String.valueOf(matchingRule)); |
| | | |
| | | synchronized (matchingRules) |
| | | { |
| | | String oid = matchingRule.getOID(); |
| | | approximateMatchingRules.remove(oid, matchingRule); |
| | | matchingRules.remove(oid, matchingRule); |
| | | |
| | | String name = matchingRule.getName(); |
| | | if (name != null) |
| | | { |
| | | name = toLowerCase(name); |
| | | approximateMatchingRules.remove(name, matchingRule); |
| | | matchingRules.remove(name, matchingRule); |
| | | } |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = matchingRule.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | matchingRuleSet.remove(new AttributeValue(rawValue, normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the equality matching rule definitions for this schema, |
| | | * as a mapping between the lowercase names and OIDs for the |
| | | * matching rule and the matching rule itself. Each matching rule |
| | | * may be associated with multiple keys (once for the OID and again |
| | | * for each name). The contents of the returned mapping must not be |
| | | * altered. |
| | | * |
| | | * @return The equality matching rule definitions for this schema. |
| | | */ |
| | | public final ConcurrentHashMap<String,EqualityMatchingRule> |
| | | getEqualityMatchingRules() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getEqualityMatchingRules"); |
| | | |
| | | return equalityMatchingRules; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the equality matching rule definition with the |
| | | * specified name or OID. |
| | | * |
| | | * @param lowerName The name or OID of the matching rule to |
| | | * retrieve, formatted in all lowercase |
| | | * characters. |
| | | * |
| | | * @return The requested matching rule, or <CODE>null</CODE> if no |
| | | * equality matching rule is registered with the provided |
| | | * name or OID. |
| | | */ |
| | | public final EqualityMatchingRule getEqualityMatchingRule( |
| | | String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getEqualityMatchingRule", |
| | | String.valueOf(lowerName)); |
| | | |
| | | return equalityMatchingRules.get(lowerName); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided equality matching rule with this schema. |
| | | * |
| | | * @param matchingRule The equality matching rule to |
| | | * register. |
| | | * @param overwriteExisting Indicates whether to overwrite an |
| | | * existing mapping if there are any |
| | | * conflicts (i.e., another matching rule |
| | | * with the same OID or name). |
| | | * |
| | | * @throws DirectoryException If a conflict is encountered and the |
| | | * <CODE>overwriteExisting</CODE> flag |
| | | * is set to <CODE>false</CODE> |
| | | */ |
| | | public final void registerEqualityMatchingRule( |
| | | EqualityMatchingRule matchingRule, |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerEqualityMatchingRule", |
| | | String.valueOf(matchingRule), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | |
| | | synchronized (matchingRules) |
| | | { |
| | | if (! overwriteExisting) |
| | | { |
| | | String oid = toLowerCase(matchingRule.getOID()); |
| | | if (matchingRules.containsKey(oid)) |
| | | { |
| | | MatchingRule conflictingRule = matchingRules.get(oid); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_MR_OID; |
| | | String message = |
| | | getMessage(msgID, matchingRule.getNameOrOID(), oid, |
| | | conflictingRule.getNameOrOID()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | |
| | | String name = matchingRule.getName(); |
| | | if (name != null) |
| | | { |
| | | name = toLowerCase(name); |
| | | if (matchingRules.containsKey(name)) |
| | | { |
| | | MatchingRule conflictingRule = matchingRules.get(name); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_MR_NAME; |
| | | String message = |
| | | getMessage(msgID, matchingRule.getOID(), name, |
| | | conflictingRule.getOID()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | } |
| | | } |
| | | |
| | | String oid = toLowerCase(matchingRule.getOID()); |
| | | equalityMatchingRules.put(oid, matchingRule); |
| | | matchingRules.put(oid, matchingRule); |
| | | |
| | | String name = matchingRule.getName(); |
| | | if (name != null) |
| | | { |
| | | name = toLowerCase(name); |
| | | equalityMatchingRules.put(name, matchingRule); |
| | | matchingRules.put(name, matchingRule); |
| | | } |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = matchingRule.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | matchingRuleSet.add(new AttributeValue(rawValue, normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided equality matching rule definition with |
| | | * this schema. |
| | | * |
| | | * @param matchingRule The equality matching rule to deregister |
| | | * with this schema. |
| | | */ |
| | | public final void deregisterEqualityMatchingRule( |
| | | EqualityMatchingRule matchingRule) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterEqualityMatchingRule", |
| | | String.valueOf(matchingRule)); |
| | | |
| | | synchronized (matchingRules) |
| | | { |
| | | String oid = matchingRule.getOID(); |
| | | equalityMatchingRules.remove(oid, matchingRule); |
| | | matchingRules.remove(oid, matchingRule); |
| | | |
| | | String name = matchingRule.getName(); |
| | | if (name != null) |
| | | { |
| | | name = toLowerCase(name); |
| | | equalityMatchingRules.remove(name, matchingRule); |
| | | matchingRules.remove(name, matchingRule); |
| | | } |
| | | |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = matchingRule.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | matchingRuleSet.remove(new AttributeValue(rawValue, normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the ordering matching rule definitions for this schema, |
| | | * as a mapping between the lowercase names and OIDs for the |
| | | * matching rule and the matching rule itself. Each matching rule |
| | | * may be associated with multiple keys (once for the OID and again |
| | | * for each name). The contents of the returned mapping must not be |
| | | * altered. |
| | | * |
| | | * @return The ordering matching rule definitions for this schema. |
| | | */ |
| | | public final ConcurrentHashMap<String,OrderingMatchingRule> |
| | | getOrderingMatchingRules() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getOrderingMatchingRules"); |
| | | |
| | | return orderingMatchingRules; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the ordering matching rule definition with the |
| | | * specified name or OID. |
| | | * |
| | | * @param lowerName The name or OID of the matching rule to |
| | | * retrieve, formatted in all lowercase |
| | | * characters. |
| | | * |
| | | * @return The requested matching rule, or <CODE>null</CODE> if no |
| | | * ordering matching rule is registered with the provided |
| | | * name or OID. |
| | | */ |
| | | public final OrderingMatchingRule getOrderingMatchingRule( |
| | | String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getOrderingMatchingRule", |
| | | String.valueOf(lowerName)); |
| | | |
| | | return orderingMatchingRules.get(lowerName); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided ordering matching rule with this schema. |
| | | * |
| | | * @param matchingRule The ordering matching rule to |
| | | * register. |
| | | * @param overwriteExisting Indicates whether to overwrite an |
| | | * existing mapping if there are any |
| | | * conflicts (i.e., another matching rule |
| | | * with the same OID or name). |
| | | * |
| | | * @throws DirectoryException If a conflict is encountered and the |
| | | * <CODE>overwriteExisting</CODE> flag |
| | | * is set to <CODE>false</CODE> |
| | | */ |
| | | public final void registerOrderingMatchingRule( |
| | | OrderingMatchingRule matchingRule, |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerOrderingMatchingRule", |
| | | String.valueOf(matchingRule), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | |
| | | synchronized (matchingRules) |
| | | { |
| | | if (! overwriteExisting) |
| | | { |
| | | String oid = toLowerCase(matchingRule.getOID()); |
| | | if (matchingRules.containsKey(oid)) |
| | | { |
| | | MatchingRule conflictingRule = matchingRules.get(oid); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_MR_OID; |
| | | String message = |
| | | getMessage(msgID, matchingRule.getNameOrOID(), oid, |
| | | conflictingRule.getNameOrOID()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | |
| | | String name = matchingRule.getName(); |
| | | if (name != null) |
| | | { |
| | | name = toLowerCase(name); |
| | | if (matchingRules.containsKey(name)) |
| | | { |
| | | MatchingRule conflictingRule = matchingRules.get(name); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_MR_NAME; |
| | | String message = |
| | | getMessage(msgID, matchingRule.getOID(), name, |
| | | conflictingRule.getOID()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | } |
| | | } |
| | | |
| | | String oid = toLowerCase(matchingRule.getOID()); |
| | | orderingMatchingRules.put(oid, matchingRule); |
| | | matchingRules.put(oid, matchingRule); |
| | | |
| | | String name = matchingRule.getName(); |
| | | if (name != null) |
| | | { |
| | | name = toLowerCase(name); |
| | | orderingMatchingRules.put(name, matchingRule); |
| | | matchingRules.put(name, matchingRule); |
| | | } |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = matchingRule.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | matchingRuleSet.add(new AttributeValue(rawValue, normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided ordering matching rule definition with |
| | | * this schema. |
| | | * |
| | | * @param matchingRule The ordering matching rule to deregister |
| | | * with this schema. |
| | | */ |
| | | public final void deregisterOrderingMatchingRule( |
| | | OrderingMatchingRule matchingRule) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterOrderingMatchingRule", |
| | | String.valueOf(matchingRule)); |
| | | |
| | | synchronized (matchingRules) |
| | | { |
| | | String oid = matchingRule.getOID(); |
| | | orderingMatchingRules.remove(oid, matchingRule); |
| | | matchingRules.remove(oid, matchingRule); |
| | | |
| | | String name = matchingRule.getName(); |
| | | if (name != null) |
| | | { |
| | | name = toLowerCase(name); |
| | | orderingMatchingRules.remove(name, matchingRule); |
| | | matchingRules.remove(name, matchingRule); |
| | | } |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = matchingRule.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | matchingRuleSet.remove(new AttributeValue(rawValue, normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the substring matching rule definitions for this |
| | | * schema, as a mapping between the lowercase names and OIDs for the |
| | | * matching rule and the matching rule itself. Each matching rule |
| | | * may be associated with multiple keys (once for the OID and again |
| | | * for each name). The contents of the returned mapping must not be |
| | | * altered. |
| | | * |
| | | * @return The substring matching rule definitions for this schema. |
| | | */ |
| | | public final ConcurrentHashMap<String,SubstringMatchingRule> |
| | | getSubstringMatchingRules() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSubstringMatchingRules"); |
| | | |
| | | return substringMatchingRules; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the substring matching rule definition with the |
| | | * specified name or OID. |
| | | * |
| | | * @param lowerName The name or OID of the matching rule to |
| | | * retrieve, formatted in all lowercase |
| | | * characters. |
| | | * |
| | | * @return The requested matching rule, or <CODE>null</CODE> if no |
| | | * substring matching rule is registered with the provided |
| | | * name or OID. |
| | | */ |
| | | public final SubstringMatchingRule getSubstringMatchingRule( |
| | | String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSubstringMatchingRule", |
| | | String.valueOf(lowerName)); |
| | | |
| | | return substringMatchingRules.get(lowerName); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided substring matching rule with this schema. |
| | | * |
| | | * @param matchingRule The substring matching rule to |
| | | * register. |
| | | * @param overwriteExisting Indicates whether to overwrite an |
| | | * existing mapping if there are any |
| | | * conflicts (i.e., another matching rule |
| | | * with the same OID or name). |
| | | * |
| | | * @throws DirectoryException If a conflict is encountered and the |
| | | * <CODE>overwriteExisting</CODE> flag |
| | | * is set to <CODE>false</CODE> |
| | | */ |
| | | public final void registerSubstringMatchingRule( |
| | | SubstringMatchingRule matchingRule, |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerSubstringMatchingRule", |
| | | String.valueOf(matchingRule), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | |
| | | synchronized (matchingRules) |
| | | { |
| | | if (! overwriteExisting) |
| | | { |
| | | String oid = toLowerCase(matchingRule.getOID()); |
| | | if (matchingRules.containsKey(oid)) |
| | | { |
| | | MatchingRule conflictingRule = matchingRules.get(oid); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_MR_OID; |
| | | String message = |
| | | getMessage(msgID, matchingRule.getNameOrOID(), oid, |
| | | conflictingRule.getNameOrOID()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | |
| | | String name = matchingRule.getName(); |
| | | if (name != null) |
| | | { |
| | | name = toLowerCase(name); |
| | | if (matchingRules.containsKey(name)) |
| | | { |
| | | MatchingRule conflictingRule = matchingRules.get(name); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_MR_NAME; |
| | | String message = |
| | | getMessage(msgID, matchingRule.getOID(), name, |
| | | conflictingRule.getOID()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | } |
| | | } |
| | | |
| | | String oid = toLowerCase(matchingRule.getOID()); |
| | | substringMatchingRules.put(oid, matchingRule); |
| | | matchingRules.put(oid, matchingRule); |
| | | |
| | | String name = matchingRule.getName(); |
| | | if (name != null) |
| | | { |
| | | name = toLowerCase(name); |
| | | substringMatchingRules.put(name, matchingRule); |
| | | matchingRules.put(name, matchingRule); |
| | | } |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = matchingRule.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | matchingRuleSet.add(new AttributeValue(rawValue, normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided substring matching rule definition with |
| | | * this schema. |
| | | * |
| | | * @param matchingRule The substring matching rule to deregister |
| | | * with this schema. |
| | | */ |
| | | public final void deregisterSubstringMatchingRule( |
| | | SubstringMatchingRule matchingRule) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterSubstringMatchingRule", |
| | | String.valueOf(matchingRule)); |
| | | |
| | | synchronized (matchingRules) |
| | | { |
| | | String oid = matchingRule.getOID(); |
| | | substringMatchingRules.remove(oid, matchingRule); |
| | | matchingRules.remove(oid, matchingRule); |
| | | |
| | | String name = matchingRule.getName(); |
| | | if (name != null) |
| | | { |
| | | name = toLowerCase(name); |
| | | substringMatchingRules.remove(name, matchingRule); |
| | | matchingRules.remove(name, matchingRule); |
| | | } |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = matchingRule.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | matchingRuleSet.remove(new AttributeValue(rawValue, normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the matching rule use definitions for this schema, as a |
| | | * mapping between the matching rule for the matching rule use |
| | | * definition and the matching rule use itself. Each matching rule |
| | | * use should only be present once, since its only key is its |
| | | * matching rule. The contents of the returned mapping must not be |
| | | * altered. |
| | | * |
| | | * @return The matching rule use definitions for this schema. |
| | | */ |
| | | public final ConcurrentHashMap<MatchingRule,MatchingRuleUse> |
| | | getMatchingRuleUses() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMatchingRuleUses"); |
| | | |
| | | return matchingRuleUses; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of defined matching rule uses for this schema. |
| | | * |
| | | * @return The set of defined matching rule uses for this schema. |
| | | */ |
| | | public final LinkedHashSet<AttributeValue> getMatchingRuleUseSet() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMatchingRuleUseSet"); |
| | | |
| | | return matchingRuleUseSet; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the matching rule use definition for the specified |
| | | * matching rule. |
| | | * |
| | | * @param matchingRule The matching rule for which to retrieve the |
| | | * matching rule use definition. |
| | | * |
| | | * @return The matching rule use definition, or <CODE>null</CODE> |
| | | * if none exists for the specified matching rule. |
| | | */ |
| | | public final MatchingRuleUse getMatchingRuleUse( |
| | | MatchingRule matchingRule) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMatchingRuleUse", |
| | | String.valueOf(matchingRule)); |
| | | |
| | | return matchingRuleUses.get(matchingRule); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided matching rule use definition with this |
| | | * schema. |
| | | * |
| | | * @param matchingRuleUse The matching rule use definition to |
| | | * register. |
| | | * @param overwriteExisting Indicates whether to overwrite an |
| | | * existing mapping if there are any |
| | | * conflicts (i.e., another matching rule |
| | | * use with the same matching rule). |
| | | * |
| | | * @throws DirectoryException If a conflict is encountered and the |
| | | * <CODE>overwriteExisting</CODE> flag |
| | | * is set to <CODE>false</CODE> |
| | | */ |
| | | public final void registerMatchingRuleUse( |
| | | MatchingRuleUse matchingRuleUse, |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerMatchingRuleUse", |
| | | String.valueOf(matchingRuleUse), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | synchronized (matchingRuleUses) |
| | | { |
| | | MatchingRule matchingRule = matchingRuleUse.getMatchingRule(); |
| | | |
| | | if (! overwriteExisting) |
| | | { |
| | | if (matchingRuleUses.containsKey(matchingRule)) |
| | | { |
| | | MatchingRuleUse conflictingUse = |
| | | matchingRuleUses.get(matchingRule); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_MATCHING_RULE_USE; |
| | | String message = |
| | | getMessage(msgID, matchingRuleUse.getName(), |
| | | matchingRule.getNameOrOID(), |
| | | conflictingUse.getName()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | } |
| | | |
| | | matchingRuleUses.put(matchingRule, matchingRuleUse); |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = matchingRuleUse.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | matchingRuleUseSet.add(new AttributeValue(rawValue, normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided matching rule use definition with this |
| | | * schema. |
| | | * |
| | | * @param matchingRuleUse The matching rule use to deregister with |
| | | * this schema. |
| | | */ |
| | | public final void deregisterMatchingRuleUse( |
| | | MatchingRuleUse matchingRuleUse) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterMatchingRuleUse", |
| | | String.valueOf(matchingRuleUse)); |
| | | |
| | | synchronized (matchingRuleUses) |
| | | { |
| | | matchingRuleUses.remove(matchingRuleUse.getMatchingRule(), |
| | | matchingRuleUse); |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = matchingRuleUse.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | matchingRuleUseSet.remove(new AttributeValue(rawValue, |
| | | normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DIT content rule definitions for this schema, as a |
| | | * mapping between the objectclass for the rule and the DIT content |
| | | * rule itself. Each DIT content rule should only be present once, |
| | | * since its only key is its objectclass. The contents of the |
| | | * returned mapping must not be altered. |
| | | * |
| | | * @return The DIT content rule definitions for this schema. |
| | | */ |
| | | public final ConcurrentHashMap<ObjectClass,DITContentRule> |
| | | getDITContentRules() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDITContentRules"); |
| | | |
| | | return ditContentRules; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of defined DIT content rules for this schema. |
| | | * |
| | | * @return The set of defined DIT content rules for this schema. |
| | | */ |
| | | public final LinkedHashSet<AttributeValue> getDITContentRuleSet() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDITContentRuleSet"); |
| | | |
| | | return ditContentRuleSet; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DIT content rule definition for the specified |
| | | * objectclass. |
| | | * |
| | | * @param objectClass The objectclass for the DIT content rule to |
| | | * retrieve. |
| | | * |
| | | * @return The requested DIT content rule, or <CODE>null</CODE> if |
| | | * no DIT content rule is registered with the provided |
| | | * objectclass. |
| | | */ |
| | | public final DITContentRule getDITContentRule( |
| | | ObjectClass objectClass) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDITContentRule", |
| | | String.valueOf(objectClass)); |
| | | |
| | | return ditContentRules.get(objectClass); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided DIT content rule definition with this |
| | | * schema. |
| | | * |
| | | * @param ditContentRule The DIT content rule to register. |
| | | * @param overwriteExisting Indicates whether to overwrite an |
| | | * existing mapping if there are any |
| | | * conflicts (i.e., another DIT content |
| | | * rule with the same objectclass). |
| | | * |
| | | * @throws DirectoryException If a conflict is encountered and the |
| | | * <CODE>overwriteExisting</CODE> flag |
| | | * is set to <CODE>false</CODE> |
| | | */ |
| | | public final void registerDITContentRule( |
| | | DITContentRule ditContentRule, |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerDITContentRule", |
| | | String.valueOf(ditContentRule), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | synchronized (ditContentRules) |
| | | { |
| | | ObjectClass objectClass = ditContentRule.getStructuralClass(); |
| | | |
| | | if (! overwriteExisting) |
| | | { |
| | | if (ditContentRules.containsKey(objectClass)) |
| | | { |
| | | DITContentRule conflictingRule = |
| | | ditContentRules.get(objectClass); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_DIT_CONTENT_RULE; |
| | | String message = getMessage(msgID, ditContentRule.getName(), |
| | | objectClass.getNameOrOID(), |
| | | conflictingRule.getName()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | } |
| | | |
| | | ditContentRules.put(objectClass, ditContentRule); |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = ditContentRule.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | ditContentRuleSet.add(new AttributeValue(rawValue, normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided DIT content rule definition with this |
| | | * schema. |
| | | * |
| | | * @param ditContentRule The DIT content rule to deregister with |
| | | * this schema. |
| | | */ |
| | | public final void deregisterDITContentRule( |
| | | DITContentRule ditContentRule) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterDITContentRule", |
| | | String.valueOf(ditContentRule)); |
| | | |
| | | synchronized (ditContentRules) |
| | | { |
| | | ditContentRules.remove(ditContentRule.getStructuralClass(), |
| | | ditContentRule); |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = ditContentRule.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | ditContentRuleSet.remove(new AttributeValue(rawValue, |
| | | normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of defined DIT structure rules for this schema. |
| | | * |
| | | * @return The set of defined DIT structure rules for this schema. |
| | | */ |
| | | public final LinkedHashSet<AttributeValue> getDITStructureRuleSet() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDITStructureRuleSet"); |
| | | |
| | | return ditStructureRuleSet; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DIT structure rule definitions for this schema, as |
| | | * a mapping between the rule ID for the rule and the DIT structure |
| | | * rule itself. Each DIT structure rule should only be present |
| | | * once, since its only key is its rule ID. The contents of the |
| | | * returned mapping must not be altered. |
| | | * |
| | | * @return The DIT structure rule definitions for this schema. |
| | | */ |
| | | public final ConcurrentHashMap<Integer,DITStructureRule> |
| | | getDITStructureRulesByID() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDITStructureRulesByID"); |
| | | |
| | | return ditStructureRulesByID; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DIT structure rule definitions for this schema, as |
| | | * a mapping between the name form for the rule and the DIT |
| | | * structure rule itself. Each DIT structure rule should only be |
| | | * present once, since its only key is its name form. The contents |
| | | * of the returned mapping must not be altered. |
| | | * |
| | | * @return The DIT structure rule definitions for this schema. |
| | | */ |
| | | public final ConcurrentHashMap<NameForm,DITStructureRule> |
| | | getDITStructureRulesByNameForm() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDITStructureRulesByNameForm"); |
| | | |
| | | return ditStructureRulesByNameForm; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DIT structure rule definition with the provided |
| | | * rule ID. |
| | | * |
| | | * @param ruleID The rule ID for the DIT structure rule to |
| | | * retrieve. |
| | | * |
| | | * @return The requested DIT structure rule, or <CODE>null</CODE> |
| | | * if no DIT structure rule is registered with the provided |
| | | * rule ID. |
| | | */ |
| | | public final DITStructureRule getDITStructureRule(int ruleID) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDITStructureRule", |
| | | String.valueOf(ruleID)); |
| | | |
| | | return ditStructureRulesByID.get(ruleID); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DIT structure rule definition for the provided name |
| | | * form. |
| | | * |
| | | * @param nameForm The name form for the DIT structure rule to |
| | | * retrieve. |
| | | * |
| | | * @return The requested DIT structure rule, or <CODE>null</CODE> |
| | | * if no DIT structure rule is registered with the provided |
| | | * name form. |
| | | */ |
| | | public final DITStructureRule getDITStructureRule(NameForm nameForm) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDITStructureRule", |
| | | String.valueOf(nameForm)); |
| | | |
| | | return ditStructureRulesByNameForm.get(nameForm); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided DIT structure rule definition with this |
| | | * schema. |
| | | * |
| | | * @param ditStructureRule The DIT structure rule to register. |
| | | * @param overwriteExisting Indicates whether to overwrite an |
| | | * existing mapping if there are any |
| | | * conflicts (i.e., another DIT structure |
| | | * rule with the same name form). |
| | | * |
| | | * @throws DirectoryException If a conflict is encountered and the |
| | | * <CODE>overwriteExisting</CODE> flag |
| | | * is set to <CODE>false</CODE> |
| | | */ |
| | | public final void registerDITStructureRule( |
| | | DITStructureRule ditStructureRule, |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "ditStructureRule", |
| | | String.valueOf(ditStructureRule), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | synchronized (ditStructureRulesByNameForm) |
| | | { |
| | | NameForm nameForm = ditStructureRule.getNameForm(); |
| | | int ruleID = ditStructureRule.getRuleID(); |
| | | |
| | | if (! overwriteExisting) |
| | | { |
| | | if (ditStructureRulesByNameForm.containsKey(nameForm)) |
| | | { |
| | | DITStructureRule conflictingRule = |
| | | ditStructureRulesByNameForm.get(nameForm); |
| | | |
| | | int msgID = |
| | | MSGID_SCHEMA_CONFLICTING_DIT_STRUCTURE_RULE_NAME_FORM; |
| | | String message = |
| | | getMessage(msgID, ditStructureRule.getNameOrRuleID(), |
| | | nameForm.getNameOrOID(), |
| | | conflictingRule.getNameOrRuleID()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | |
| | | if (ditStructureRulesByID.containsKey(ruleID)) |
| | | { |
| | | DITStructureRule conflictingRule = |
| | | ditStructureRulesByID.get(ruleID); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_DIT_STRUCTURE_RULE_ID; |
| | | String message = |
| | | getMessage(msgID, ditStructureRule.getNameOrRuleID(), |
| | | ruleID, conflictingRule.getNameOrRuleID()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | } |
| | | |
| | | ditStructureRulesByNameForm.put(nameForm, ditStructureRule); |
| | | ditStructureRulesByID.put(ruleID, ditStructureRule); |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = ditStructureRule.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | ditStructureRuleSet.add(new AttributeValue(rawValue, |
| | | normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided DIT structure rule definition with this |
| | | * schema. |
| | | * |
| | | * @param ditStructureRule The DIT structure rule to deregister |
| | | * with this schema. |
| | | */ |
| | | public final void deregisterDITStructureRule( |
| | | DITStructureRule ditStructureRule) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterDITStructureRule", |
| | | String.valueOf(ditStructureRule)); |
| | | |
| | | synchronized (ditStructureRulesByNameForm) |
| | | { |
| | | ditStructureRulesByNameForm.remove( |
| | | ditStructureRule.getNameForm(), ditStructureRule); |
| | | ditStructureRulesByID.remove(ditStructureRule.getRuleID(), |
| | | ditStructureRule); |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = ditStructureRule.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | ditStructureRuleSet.remove(new AttributeValue(rawValue, |
| | | normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of defined name forms for this schema. |
| | | * |
| | | * @return The set of defined name forms for this schema. |
| | | */ |
| | | public final LinkedHashSet<AttributeValue> getNameFormSet() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getNameFormSet"); |
| | | |
| | | return nameFormSet; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the name form definitions for this schema, as a mapping |
| | | * between the objectclass for the name form and the name form |
| | | * itself. Each name form should only be present once, since its |
| | | * only key is its objectclass. The contents of the returned |
| | | * mapping must not be altered. |
| | | * |
| | | * @return The name form definitions for this schema. |
| | | */ |
| | | public final ConcurrentHashMap<ObjectClass,NameForm> |
| | | getNameFormsByObjectClass() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getNameForms"); |
| | | |
| | | return nameFormsByOC; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the name form definitions for this schema, as a mapping |
| | | * between the names/OID for the name form and the name form itself. |
| | | * Each name form may be present multiple times with different names |
| | | * and its OID. The contents of the returned mapping must not be |
| | | * altered. |
| | | * |
| | | * @return The name form definitions for this schema. |
| | | */ |
| | | public final ConcurrentHashMap<String,NameForm> |
| | | getNameFormsByNameOrOID() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getNameForms"); |
| | | |
| | | return nameFormsByName; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the name form definition for the specified objectclass. |
| | | * |
| | | * @param objectClass The objectclass for the name form to |
| | | * retrieve. |
| | | * |
| | | * @return The requested name form, or <CODE>null</CODE> if no name |
| | | * form is registered with the provided objectClass. |
| | | */ |
| | | public final NameForm getNameForm(ObjectClass objectClass) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getNameForm", |
| | | String.valueOf(objectClass)); |
| | | |
| | | return nameFormsByOC.get(objectClass); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the name form definition with the provided name or OID. |
| | | * |
| | | * @param lowerName The name or OID of the name form to retrieve, |
| | | * formatted in all lowercase characters. |
| | | * |
| | | * @return The requested name form, or <CODE>null</CODE> if no name |
| | | * form is registered with the provided name or OID. |
| | | */ |
| | | public final NameForm getNameForm(String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getNameForm", |
| | | String.valueOf(lowerName)); |
| | | |
| | | return nameFormsByName.get(lowerName); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided name form definition with this schema. |
| | | * |
| | | * @param nameForm The name form definition to register. |
| | | * @param overwriteExisting Indicates whether to overwrite an |
| | | * existing mapping if there are any |
| | | * conflicts (i.e., another name form |
| | | * with the same objectclass). |
| | | * |
| | | * @throws DirectoryException If a conflict is encountered and the |
| | | * <CODE>overwriteExisting</CODE> flag |
| | | * is set to <CODE>false</CODE> |
| | | */ |
| | | public final void registerNameForm(NameForm nameForm, |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerNameForm", |
| | | String.valueOf(nameForm), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | synchronized (nameFormsByOC) |
| | | { |
| | | ObjectClass objectClass = nameForm.getStructuralClass(); |
| | | |
| | | if (! overwriteExisting) |
| | | { |
| | | if (nameFormsByOC.containsKey(objectClass)) |
| | | { |
| | | NameForm conflictingNameForm = |
| | | nameFormsByOC.get(objectClass); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_NAME_FORM_OC; |
| | | String message = |
| | | getMessage(msgID, nameForm.getNameOrOID(), |
| | | objectClass.getNameOrOID(), |
| | | conflictingNameForm.getNameOrOID()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | |
| | | String oid = toLowerCase(nameForm.getOID()); |
| | | if (nameFormsByName.containsKey(oid)) |
| | | { |
| | | NameForm conflictingNameForm = nameFormsByName.get(oid); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_NAME_FORM_OID; |
| | | String message = |
| | | getMessage(msgID, nameForm.getNameOrOID(), oid, |
| | | conflictingNameForm.getNameOrOID()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | |
| | | for (String name : nameForm.getNames().keySet()) |
| | | { |
| | | if (nameFormsByName.containsKey(name)) |
| | | { |
| | | NameForm conflictingNameForm = nameFormsByName.get(name); |
| | | |
| | | int msgID = MSGID_SCHEMA_CONFLICTING_NAME_FORM_NAME; |
| | | String message = |
| | | getMessage(msgID, nameForm.getNameOrOID(), oid, |
| | | conflictingNameForm.getNameOrOID()); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message, |
| | | msgID); |
| | | } |
| | | } |
| | | } |
| | | |
| | | nameFormsByOC.put(objectClass, nameForm); |
| | | nameFormsByName.put(toLowerCase(nameForm.getOID()), nameForm); |
| | | |
| | | for (String name : nameForm.getNames().keySet()) |
| | | { |
| | | nameFormsByName.put(name, nameForm); |
| | | } |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = nameForm.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | nameFormSet.add(new AttributeValue(rawValue, normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided name form definition with this schema. |
| | | * |
| | | * @param nameForm The name form definition to deregister. |
| | | */ |
| | | public final void deregisterNameForm(NameForm nameForm) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterNameForm", |
| | | String.valueOf(nameForm)); |
| | | |
| | | synchronized (nameFormsByOC) |
| | | { |
| | | nameFormsByOC.remove(nameForm.getStructuralClass(), nameForm); |
| | | nameFormsByName.remove(toLowerCase(nameForm.getOID()), |
| | | nameForm); |
| | | |
| | | for (String name : nameForm.getNames().keySet()) |
| | | { |
| | | nameFormsByName.remove(name, nameForm); |
| | | } |
| | | |
| | | // We'll use an attribute value including the normalized value |
| | | // rather than the attribute type because otherwise it would use |
| | | // a very expensive matching rule (OID first component match) |
| | | // that would kill performance. |
| | | String valueString = nameForm.toString(); |
| | | ASN1OctetString rawValue = new ASN1OctetString(valueString); |
| | | ASN1OctetString normValue = |
| | | new ASN1OctetString(toLowerCase(valueString)); |
| | | nameFormSet.remove(new AttributeValue(rawValue, normValue)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new <CODE>Schema</CODE> object that is a duplicate of |
| | | * this one. It elements may be added and removed from the |
| | | * duplicate without impacting this version. |
| | | * |
| | | * @return A new <CODE>Schema</CODE> object that is a duplicate of |
| | | * this one. |
| | | */ |
| | | public final Schema duplicate() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "duplicate"); |
| | | |
| | | Schema dupSchema = new Schema(); |
| | | |
| | | dupSchema.attributeTypes.putAll(attributeTypes); |
| | | dupSchema.objectClasses.putAll(objectClasses); |
| | | dupSchema.syntaxes.putAll(syntaxes); |
| | | dupSchema.matchingRules.putAll(matchingRules); |
| | | dupSchema.approximateMatchingRules.putAll( |
| | | approximateMatchingRules); |
| | | dupSchema.equalityMatchingRules.putAll(equalityMatchingRules); |
| | | dupSchema.orderingMatchingRules.putAll(orderingMatchingRules); |
| | | dupSchema.substringMatchingRules.putAll(substringMatchingRules); |
| | | dupSchema.matchingRuleUses.putAll(matchingRuleUses); |
| | | dupSchema.ditContentRules.putAll(ditContentRules); |
| | | dupSchema.ditStructureRulesByID.putAll(ditStructureRulesByID); |
| | | dupSchema.ditStructureRulesByNameForm.putAll( |
| | | ditStructureRulesByNameForm); |
| | | dupSchema.nameFormsByOC.putAll(nameFormsByOC); |
| | | dupSchema.nameFormsByName.putAll(nameFormsByName); |
| | | dupSchema.syntaxSet.addAll(syntaxSet); |
| | | dupSchema.attributeTypeSet.addAll(attributeTypeSet); |
| | | dupSchema.ditContentRuleSet.addAll(ditContentRuleSet); |
| | | dupSchema.ditStructureRuleSet.addAll(ditStructureRuleSet); |
| | | dupSchema.matchingRuleSet.addAll(matchingRuleSet); |
| | | dupSchema.matchingRuleUseSet.addAll(matchingRuleUseSet); |
| | | dupSchema.nameFormSet.addAll(nameFormSet); |
| | | dupSchema.objectClassSet.addAll(objectClassSet); |
| | | |
| | | return dupSchema; |
| | | } |
| | | } |
| | | |
| | |
| | | import java.util.Set; |
| | | |
| | | import org.opends.server.api.MatchingRule; |
| | | import org.opends.server.core.DirectoryException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.OperationType; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * plugins for operations that are currently in the middle of their |
| | | * "core" processing (e.g., for examining search result entries or |
| | | * references before they are sent to the client). Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface InProgressOperation |
| | | { |
| | | /** |
| | | * Retrieves the operation type for this operation. |
| | | * |
| | | * @return The operation type for this operation. |
| | | */ |
| | | public OperationType getOperationType(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the client connection with which this operation is |
| | | * associated. |
| | | * |
| | | * @return The client connection with which this operation is |
| | | * associated. |
| | | */ |
| | | public ClientConnection getClientConnection(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the unique identifier that is assigned to the client |
| | | * connection that submitted this operation. |
| | | * |
| | | * @return The unique identifier that is assigned to the client |
| | | * connection that submitted this operation. |
| | | */ |
| | | public long getConnectionID(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the operation ID for this operation. |
| | | * |
| | | * @return The operation ID for this operation. |
| | | */ |
| | | public long getOperationID(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the message ID assigned to this operation. |
| | | * |
| | | * @return The message ID assigned to this operation. |
| | | */ |
| | | public int getMessageID(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of controls included in the request from the |
| | | * client. The contents of this list must not be altered. |
| | | * |
| | | * @return The set of controls included in the request from the |
| | | * client. |
| | | */ |
| | | public List<Control> getRequestControls(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of controls to include in the response to the |
| | | * client. The contents of this list must not be altered. |
| | | * |
| | | * @return The set of controls to include in the response to the |
| | | * client. |
| | | */ |
| | | public List<Control> getResponseControls(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Adds the provided control to the set of controls to include in |
| | | * the response to the client. |
| | | * |
| | | * @param control The control to add to the set of controls to |
| | | * include in the response to the client. |
| | | */ |
| | | public void addResponseControl(Control control); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Removes the provided control from the set of controls to include |
| | | * in the response to the client. |
| | | * |
| | | * @param control The control to remove from the set of controls |
| | | * to include in the response to the client. |
| | | */ |
| | | public void removeResponseControl(Control control); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the result code for this operation. |
| | | * |
| | | * @return The result code associated for this operation, or |
| | | * <CODE>UNDEFINED</CODE> if the operation has not yet |
| | | * completed. |
| | | */ |
| | | public ResultCode getResultCode(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the result code for this operation. |
| | | * |
| | | * @param resultCode The result code for this operation. |
| | | */ |
| | | public void setResultCode(ResultCode resultCode); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the error message for this operation. Its contents may |
| | | * be altered by the caller. |
| | | * |
| | | * @return The error message for this operation. |
| | | */ |
| | | public StringBuilder getErrorMessage(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the error message for this operation. |
| | | * |
| | | * @param errorMessage The error message for this operation. |
| | | */ |
| | | public void setErrorMessage(StringBuilder errorMessage); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Appends the provided message to the error message buffer. If the |
| | | * buffer has not yet been created, then this will create it first |
| | | * and then add the provided message. |
| | | * |
| | | * @param message The message to append to the error message |
| | | * buffer. |
| | | */ |
| | | public void appendErrorMessage(String message); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the additional log message for this operation, which |
| | | * should be written to the log but not included in the response to |
| | | * the client. The contents of this buffer may be altered by the |
| | | * caller. |
| | | * |
| | | * @return The additional log message for this operation. |
| | | */ |
| | | public StringBuilder getAdditionalLogMessage(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the additional log message for this operation, which |
| | | * should be written to the log but not included in the response to |
| | | * the client. |
| | | * |
| | | * @param additionalLogMessage The additional log message for this |
| | | * operation. |
| | | */ |
| | | public void setAdditionalLogMessage( |
| | | StringBuilder additionalLogMessage); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Appends the provided message to the additional log information |
| | | * for this operation. |
| | | * |
| | | * @param message The message that should be appended to the |
| | | * additional log information for this operation. |
| | | */ |
| | | public void appendAdditionalLogMessage(String message); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the matched DN for this operation. |
| | | * |
| | | * @return The matched DN for this operation, or <CODE>null</CODE> |
| | | * if the operation has not yet completed or does not have |
| | | * a matched DN. |
| | | */ |
| | | public DN getMatchedDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the matched DN for this operation. |
| | | * |
| | | * @param matchedDN The matched DN for this operation. |
| | | */ |
| | | public void setMatchedDN(DN matchedDN); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of referral URLs for this operation. Its |
| | | * contents must not be altered by the caller. |
| | | * |
| | | * @return The set of referral URLs for this operation, or |
| | | * <CODE>null</CODE> if the operation is not yet complete |
| | | * or does not have a set of referral URLs. |
| | | */ |
| | | public List<String> getReferralURLs(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the set of referral URLs for this operation. |
| | | * |
| | | * @param referralURLs The set of referral URLs for this |
| | | * operation. |
| | | */ |
| | | public void setReferralURLs(List<String> referralURLs); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Sets the response elements for this operation based on the |
| | | * information contained in the provided |
| | | * <CODE>DirectoryException</CODE> object. |
| | | * |
| | | * @param directoryException The exception containing the |
| | | * information to use for the response |
| | | * elements. |
| | | */ |
| | | public void setResponseData(DirectoryException directoryException); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether this is an internal operation rather than one |
| | | * that was requested by an external client. |
| | | * |
| | | * @return <CODE>true</CODE> if this is an internal operation, or |
| | | * <CODE>false</CODE> if it is not. |
| | | */ |
| | | public boolean isInternalOperation(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether this is a synchronization operation rather than |
| | | * one that was requested by an external client. |
| | | * |
| | | * @return <CODE>true</CODE> if this is a data synchronization |
| | | * operation, or <CODE>false</CODE> if it is not. |
| | | */ |
| | | public boolean isSynchronizationOperation(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the authorization DN for this operation. In many |
| | | * cases, it will be the same as the DN of the authenticated user |
| | | * for the underlying connection, or the null DN if no |
| | | * authentication has been performed on that connection. However, |
| | | * it may be some other value if special processing has been |
| | | * requested (e.g., the operation included a proxied authorization |
| | | * control). |
| | | * |
| | | * @return The authorization DN for this operation. |
| | | */ |
| | | public DN getAuthorizationDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of attachments defined for this operation, as a |
| | | * mapping between the attachment name and the associated object. |
| | | * |
| | | * @return The set of attachments defined for this operation. |
| | | */ |
| | | public Map<String,Object> getAttachments(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the attachment with the specified name. |
| | | * |
| | | * @param name The name for the attachment to retrieve. It will |
| | | * be treated in a case-sensitive manner. |
| | | * |
| | | * @return The requested attachment object, or <CODE>null</CODE> if |
| | | * it does not exist. |
| | | */ |
| | | public Object getAttachment(String name); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Removes the attachment with the specified name. |
| | | * |
| | | * @param name The name for the attachment to remove. It will be |
| | | * treated in a case-sensitive manner. |
| | | * |
| | | * @return The attachment that was removed, or <CODE>null</CODE> if |
| | | * it does not exist. |
| | | */ |
| | | public Object removeAttachment(String name); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Sets the value of the specified attachment. If an attachment |
| | | * already exists with the same name, it will be replaced. |
| | | * Otherwise, a new attachment will be added. |
| | | * |
| | | * @param name The name to use for the attachment. |
| | | * @param value The value to use for the attachment. |
| | | * |
| | | * @return The former value held by the attachment with the given |
| | | * name, or <CODE>null</CODE> if there was previously no |
| | | * such attachment. |
| | | */ |
| | | public Object setAttachment(String name, Object value); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing started for this operation. |
| | | * |
| | | * @return The time that processing started for this operation. |
| | | */ |
| | | public long getProcessingStartTime(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the cancel request that has been issued for this |
| | | * operation, if there is one. |
| | | * |
| | | * @return The cancel request that has been issued for this |
| | | * operation, or <CODE>null</CODE> if there has not been |
| | | * any request to cancel. |
| | | */ |
| | | public CancelRequest getCancelRequest(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a string representation of this operation. |
| | | * |
| | | * @return A string representation of this operation. |
| | | */ |
| | | public String toString(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Appends a string representation of this operation to the provided |
| | | * buffer. |
| | | * |
| | | * @param buffer The buffer into which a string representation of |
| | | * this operation should be appended. |
| | | */ |
| | | public void toString(StringBuilder buffer); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * post-operation plugins for abandon operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PostOperationAbandonOperation |
| | | extends PostOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the message ID of the operation that should be |
| | | * abandoned. |
| | | * |
| | | * @return The message ID of the operation that should be |
| | | * abandoned. |
| | | */ |
| | | public int getIDToAbandon(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.opends.server.protocols.ldap.LDAPAttribute; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ObjectClass; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * post-operation plugins for add operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PostOperationAddOperation |
| | | extends PostOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the DN of the entry to add in a raw, unparsed form as |
| | | * it was included in the request. This may or may not actually |
| | | * contain a valid DN, since no validation will have been performed |
| | | * on it. |
| | | * |
| | | * @return The DN of the entry in a raw, unparsed form. |
| | | */ |
| | | public ByteString getRawEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of attributes in their raw, unparsed form as |
| | | * read from the client request. Some of these attributes may be |
| | | * invalid as no validation will have been performed on them. The |
| | | * returned list must not be altered by the caller. |
| | | * |
| | | * @return The set of attributes in their raw, unparsed form as |
| | | * read from the client request. |
| | | */ |
| | | public List<LDAPAttribute> getRawAttributes(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DN of the entry to add. |
| | | * |
| | | * @return The DN of the entry to add. |
| | | */ |
| | | public DN getEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of processed objectclasses for the entry to |
| | | * add. The contents of the returned map must not be altered by the |
| | | * caller. |
| | | * |
| | | * @return The set of processed objectclasses for the entry to add. |
| | | */ |
| | | public Map<ObjectClass,String> getObjectClasses(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of processed user attributes for the entry to |
| | | * add. The contents of the returned map must not be altered by the |
| | | * caller. |
| | | * |
| | | * @return The set of processed user attributes for the entry to |
| | | * add. |
| | | */ |
| | | public Map<AttributeType,List<Attribute>> getUserAttributes(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of processed operational attributes for the |
| | | * entry to add. The contents of the returned map must not be |
| | | * altered by the caller. |
| | | * |
| | | * @return The set of processed operational attributes for the |
| | | * entry to add. |
| | | */ |
| | | public Map<AttributeType,List<Attribute>> |
| | | getOperationalAttributes(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the entry to be added to the server. The contents of |
| | | * the returned entry must not be altered by the caller. |
| | | * |
| | | * @return The entry to be added to the server. |
| | | */ |
| | | public Entry getEntryToAdd(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AuthenticationType; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * post-operation plugins for bind operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PostOperationBindOperation |
| | | extends PostOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the authentication type for this bind operation. |
| | | * |
| | | * @return The authentication type for this bind operation. |
| | | */ |
| | | public AuthenticationType getAuthenticationType(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the raw, unprocessed bind DN for this bind operation as |
| | | * contained in the client request. The value may not actually |
| | | * contain a valid DN, as no validation will have been performed. |
| | | * |
| | | * @return The raw, unprocessed bind DN for this bind operation as |
| | | * contained in the client request. |
| | | */ |
| | | public ByteString getRawBindDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the bind DN for this bind operation. |
| | | * |
| | | * @return The bind DN for this bind operation. |
| | | */ |
| | | public DN getBindDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the simple authentication password for this bind |
| | | * operation. |
| | | * |
| | | * @return The simple authentication password for this bind |
| | | * operation. |
| | | */ |
| | | public ByteString getSimplePassword(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the SASL mechanism for this bind operation. |
| | | * |
| | | * @return The SASL mechanism for this bind operation, or |
| | | * <CODE>null</CODE> if the bind does not use SASL |
| | | * authentication. |
| | | */ |
| | | public String getSASLMechanism(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the SASL credentials for this bind operation. |
| | | * |
| | | * @return The SASL credentials for this bind operation, or |
| | | * <CODE>null</CODE> if there are none or if the bind does |
| | | * not use SASL authentication. |
| | | */ |
| | | public ASN1OctetString getSASLCredentials(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of server SASL credentials to include in the |
| | | * bind response. |
| | | * |
| | | * @return The set of server SASL credentials to include in the |
| | | * bind response, or <CODE>null</CODE> if there are none. |
| | | */ |
| | | public ASN1OctetString getServerSASLCredentials(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the set of server SASL credentials to include in the |
| | | * bind response. |
| | | * |
| | | * @param serverSASLCredentials The set of server SASL credentials |
| | | * to include in the bind response. |
| | | */ |
| | | public void setServerSASLCredentials(ASN1OctetString |
| | | serverSASLCredentials); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the user entry associated with the SASL authentication |
| | | * attempt. This should be set by any SASL mechanism in which the |
| | | * processing was able to get far enough to make this determination, |
| | | * regardless of whether the authentication was ultimately |
| | | * successful. |
| | | * |
| | | * @return The user entry associated with the SASL authentication |
| | | * attempt, or <CODE>null</CODE> if it was not a SASL |
| | | * authentication or the SASL processing was not able to |
| | | * map the request to a user. |
| | | */ |
| | | public Entry getSASLAuthUserEntry(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a human-readable message providing the reason that the |
| | | * authentication failed, if available. |
| | | * |
| | | * @return A human-readable message providing the reason that the |
| | | * authentication failed, or <CODE>null</CODE> if none is |
| | | * available. |
| | | */ |
| | | public String getAuthFailureReason(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the unique identifier for the authentication failure |
| | | * reason, if available. |
| | | * |
| | | * @return The unique identifier for the authentication failure |
| | | * reason, or zero if none is available. |
| | | */ |
| | | public int getAuthFailureID(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the reason that the authentication failed. |
| | | * |
| | | * @param id The unique identifier for the authentication |
| | | * failure reason. |
| | | * @param reason A human-readable message providing the reason |
| | | * that the authentication failed. |
| | | */ |
| | | public void setAuthFailureReason(int id, String reason); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the user entry DN for this bind operation. It will |
| | | * only be available if the bind processing has proceeded far enough |
| | | * to identify the user attempting to authenticate. |
| | | * |
| | | * @return The user entry DN for this bind operation, or |
| | | * <CODE>null</CODE> if the bind processing has not |
| | | * progressed far enough to identify the user or if the |
| | | * user DN could not be determined. |
| | | */ |
| | | public DN getUserEntryDN(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * post-operation plugins for compare operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PostOperationCompareOperation |
| | | extends PostOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | * |
| | | * @return The raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | */ |
| | | public ByteString getRawEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DN of the entry to compare. |
| | | * |
| | | * @return The DN of the entry to compare. |
| | | */ |
| | | public DN getEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the raw attribute type for this compare operation. |
| | | * |
| | | * @return The raw attribute type for this compare operation. |
| | | */ |
| | | public String getRawAttributeType(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the attribute type for this compare operation. |
| | | * |
| | | * @return The attribute type for this compare operation. |
| | | */ |
| | | public AttributeType getAttributeType(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the assertion value for this compare operation. |
| | | * |
| | | * @return The assertion value for this compare operation. |
| | | */ |
| | | public ByteString getAssertionValue(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the entry to target with the compare operation. |
| | | * |
| | | * @return The entry to target with the compare operation. |
| | | */ |
| | | public Entry getEntryToCompare(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * post-operation plugins for delete operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PostOperationDeleteOperation |
| | | extends PostOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | * |
| | | * @return The raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | */ |
| | | public ByteString getRawEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DN of the entry to delete. |
| | | * |
| | | * @return The DN of the entry to delete. |
| | | */ |
| | | public DN getEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the entry to be deleted. |
| | | * |
| | | * @return The entry to be deleted. |
| | | */ |
| | | public Entry getEntryToDelete(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * post-operation plugins for extended operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PostOperationExtendedOperation |
| | | extends PostOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the OID for the request associated with this extended |
| | | * operation. |
| | | * |
| | | * @return The OID for the request associated with this extended |
| | | * operation. |
| | | */ |
| | | public String getRequestOID(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the value for the request associated with this extended |
| | | * operation. |
| | | * |
| | | * @return The value for the request associated with this extended |
| | | * operation. |
| | | */ |
| | | public ASN1OctetString getRequestValue(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID to include in the response to the client. |
| | | * |
| | | * @return The OID to include in the response to the client. |
| | | */ |
| | | public String getResponseOID(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the OID to include in the response to the client. |
| | | * |
| | | * @param responseOID The OID to include in the response to the |
| | | * client. |
| | | */ |
| | | public void setResponseOID(String responseOID); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the value to include in the response to the client. |
| | | * |
| | | * @return The value to include in the response to the client. |
| | | */ |
| | | public ASN1OctetString getResponseValue(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the value to include in the response to the client. |
| | | * |
| | | * @param responseValue The value to include in the response to |
| | | * the client. |
| | | */ |
| | | public void setResponseValue(ASN1OctetString responseValue); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.Modification; |
| | | import org.opends.server.types.RDN; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * post-operation plugins for modify DN operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PostOperationModifyDNOperation |
| | | extends PostOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the raw, unprocessed entry DN as included in the client |
| | | * request. The DN that is returned may or may not be a valid DN, |
| | | * since no validation will have been performed upon it. |
| | | * |
| | | * @return The raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | */ |
| | | public ByteString getRawEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DN of the entry to rename. This should not be |
| | | * called by pre-parse plugins because the processed DN will not be |
| | | * available yet. Instead, they should call the |
| | | * <CODE>getRawEntryDN</CODE> method. |
| | | * |
| | | * @return The DN of the entry to rename, or <CODE>null</CODE> if |
| | | * the raw entry DN has not yet been processed. |
| | | */ |
| | | public DN getEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the raw, unprocessed newRDN as included in the request |
| | | * from the client. This may or may not contain a valid RDN, as no |
| | | * validation will have been performed on it. |
| | | * |
| | | * @return The raw, unprocessed newRDN as included in the request |
| | | * from the client. |
| | | */ |
| | | public ByteString getRawNewRDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the new RDN to use for the entry. This should not be |
| | | * called by pre-parse plugins, because the processed newRDN will |
| | | * not yet be available. Pre-parse plugins should instead use the |
| | | * <CODE>getRawNewRDN</CODE> method. |
| | | * |
| | | * @return The new RDN to use for the entry, or <CODE>null</CODE> |
| | | * if the raw newRDN has not yet been processed. |
| | | */ |
| | | public RDN getNewRDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the current RDN value should be removed from |
| | | * the entry. |
| | | * |
| | | * @return <CODE>true</CODE> if the current RDN value should be |
| | | * removed from the entry, or <CODE>false</CODE> if not. |
| | | */ |
| | | public boolean deleteOldRDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the raw, unprocessed newSuperior from the client |
| | | * request. This may or may not contain a valid DN, as no |
| | | * validation will have been performed on it. |
| | | * |
| | | * @return The raw, unprocessed newSuperior from the client |
| | | * request, or <CODE>null</CODE> if there is none. |
| | | */ |
| | | public ByteString getRawNewSuperior(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the newSuperior DN for the entry. This should not be |
| | | * called by pre-parse plugins, because the processed DN will not |
| | | * yet be available at that time. Instead, they should use the |
| | | * <CODE>getRawNewSuperior</CODE> method. |
| | | * |
| | | * @return The newSuperior DN for the entry, or <CODE>null</CODE> |
| | | * if there is no newSuperior DN for this request or if the |
| | | * raw newSuperior has not yet been processed. |
| | | */ |
| | | public DN getNewSuperior(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of modifications applied to attributes of the |
| | | * target entry in the course of processing this modify DN |
| | | * operation. This will include attribute-level changes from the |
| | | * modify DN itself (e.g., removing old RDN values if deleteOldRDN |
| | | * is set, or adding new RDN values that don't already exist), but |
| | | * it may also be used by pre-operation plugins to cause additional |
| | | * changes in the entry. In this case, those plugins may add |
| | | * modifications to this list through the |
| | | * <CODE>addModification</CODE> method (the list returned from this |
| | | * method should not be modified directly) if any changes should be |
| | | * processed in addition to the core modify DN processing. Backends |
| | | * may read this list to identify which attribute-level changes were |
| | | * applied in order to more easily apply updates to attribute |
| | | * indexes. |
| | | * |
| | | * @return The set of modifications applied to attributes during |
| | | * the course of the modify DN processing, or |
| | | * <CODE>null</CODE> if that information is not yet |
| | | * available (e.g., during pre-parse plugins). |
| | | */ |
| | | public List<Modification> getModifications(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the current entry, before it is renamed. This will not |
| | | * be available to pre-parse plugins or during the conflict |
| | | * resolution portion of the synchronization processing. |
| | | * |
| | | * @return The current entry, or <CODE>null</CODE> if it is not yet |
| | | * available. |
| | | */ |
| | | public Entry getOriginalEntry(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the new entry, as it will appear after it is renamed. |
| | | * This will not be available to pre-parse plugins or during the |
| | | * conflict resolution portion of the synchronization processing. |
| | | * |
| | | * @return The updated entry, or <CODE>null</CODE> if it is not yet |
| | | * available. |
| | | */ |
| | | public Entry getUpdatedEntry(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.protocols.ldap.LDAPModification; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.Modification; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * post-operation plugins for modify operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PostOperationModifyOperation |
| | | extends PostOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the raw, unprocessed entry DN as included in the client |
| | | * request. The DN that is returned may or may not be a valid DN, |
| | | * since no validation will have been performed upon it. |
| | | * |
| | | * @return The raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | */ |
| | | public ByteString getRawEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DN of the entry to modify. |
| | | * |
| | | * @return The DN of the entry to modify. |
| | | */ |
| | | public DN getEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of raw, unprocessed modifications as included |
| | | * in the client request. Note that this may contain one or more |
| | | * invalid modifications, as no validation will have been performed |
| | | * on this information. The list returned must not be altered by |
| | | * the caller. |
| | | * |
| | | * @return The set of raw, unprocessed modifications as included |
| | | * in the client request. |
| | | */ |
| | | public List<LDAPModification> getRawModifications(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of modifications for this modify operation. |
| | | Its contents should not be altered. |
| | | * |
| | | * @return The set of modifications for this modify operation. |
| | | */ |
| | | public List<Modification> getModifications(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the current entry before any modifications are applied. |
| | | * It should not be modified by the caller. |
| | | * |
| | | * @return The current entry before any modifications are applied. |
| | | */ |
| | | public Entry getCurrentEntry(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the modified entry that is to be written to the |
| | | * backend. It should not be modified by the caller. |
| | | * |
| | | * @return The modified entry that is to be written to the backend. |
| | | */ |
| | | public Entry getModifiedEntry(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of clear-text current passwords for the user, |
| | | * if available. This will only be available if the modify |
| | | * operation contains one or more delete elements that target the |
| | | * password attribute and provide the values to delete in the clear. |
| | | * This list should not be altered by the caller. |
| | | * |
| | | * @return The set of clear-text current password values as |
| | | * provided in the modify request, or <CODE>null</CODE> if |
| | | * there were none. |
| | | */ |
| | | public List<AttributeValue> getCurrentPasswords(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of clear-text new passwords for the user, if |
| | | * available. This will only be available if the modify operation |
| | | * contains one or more add or replace elements that target the |
| | | * password attribute and provide the values in the clear. This |
| | | * list should not be altered by the caller. |
| | | * |
| | | * @return The set of clear-text new passwords as provided in the |
| | | * modify request, or <CODE>null</CODE> if there were none. |
| | | */ |
| | | public List<AttributeValue> getNewPasswords(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.OperationType; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * post-operation plugins for all types of operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PostOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the operation type for this operation. |
| | | * |
| | | * @return The operation type for this operation. |
| | | */ |
| | | public OperationType getOperationType(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the client connection with which this operation is |
| | | * associated. |
| | | * |
| | | * @return The client connection with which this operation is |
| | | * associated. |
| | | */ |
| | | public ClientConnection getClientConnection(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the unique identifier that is assigned to the client |
| | | * connection that submitted this operation. |
| | | * |
| | | * @return The unique identifier that is assigned to the client |
| | | * connection that submitted this operation. |
| | | */ |
| | | public long getConnectionID(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the operation ID for this operation. |
| | | * |
| | | * @return The operation ID for this operation. |
| | | */ |
| | | public long getOperationID(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the message ID assigned to this operation. |
| | | * |
| | | * @return The message ID assigned to this operation. |
| | | */ |
| | | public int getMessageID(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of controls included in the request from the |
| | | * client. The contents of this list must not be altered. |
| | | * |
| | | * @return The set of controls included in the request from the |
| | | * client. |
| | | */ |
| | | public List<Control> getRequestControls(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of controls to include in the response to the |
| | | * client. The contents of this list must not be altered. |
| | | * |
| | | * @return The set of controls to include in the response to the |
| | | * client. |
| | | */ |
| | | public List<Control> getResponseControls(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Adds the provided control to the set of controls to include in |
| | | * the response to the client. |
| | | * |
| | | * @param control The control to add to the set of controls to |
| | | * include in the response to the client. |
| | | */ |
| | | public void addResponseControl(Control control); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Removes the provided control from the set of controls to include |
| | | * in the response to the client. |
| | | * |
| | | * @param control The control to remove from the set of controls |
| | | * to include in the response to the client. |
| | | */ |
| | | public void removeResponseControl(Control control); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the result code for this operation. |
| | | * |
| | | * @return The result code associated for this operation, or |
| | | * <CODE>UNDEFINED</CODE> if the operation has not yet |
| | | * completed. |
| | | */ |
| | | public ResultCode getResultCode(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the result code for this operation. |
| | | * |
| | | * @param resultCode The result code for this operation. |
| | | */ |
| | | public void setResultCode(ResultCode resultCode); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the error message for this operation. Its contents may |
| | | * be altered by the caller. |
| | | * |
| | | * @return The error message for this operation. |
| | | */ |
| | | public StringBuilder getErrorMessage(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the error message for this operation. |
| | | * |
| | | * @param errorMessage The error message for this operation. |
| | | */ |
| | | public void setErrorMessage(StringBuilder errorMessage); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Appends the provided message to the error message buffer. If the |
| | | * buffer has not yet been created, then this will create it first |
| | | * and then add the provided message. |
| | | * |
| | | * @param message The message to append to the error message |
| | | * buffer. |
| | | */ |
| | | public void appendErrorMessage(String message); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the additional log message for this operation, which |
| | | * should be written to the log but not included in the response to |
| | | * the client. The contents of this buffer may be altered by the |
| | | * caller. |
| | | * |
| | | * @return The additional log message for this operation. |
| | | */ |
| | | public StringBuilder getAdditionalLogMessage(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the additional log message for this operation, which |
| | | * should be written to the log but not included in the response to |
| | | * the client. |
| | | * |
| | | * @param additionalLogMessage The additional log message for this |
| | | * operation. |
| | | */ |
| | | public void setAdditionalLogMessage( |
| | | StringBuilder additionalLogMessage); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Appends the provided message to the additional log information |
| | | * for this operation. |
| | | * |
| | | * @param message The message that should be appended to the |
| | | * additional log information for this operation. |
| | | */ |
| | | public void appendAdditionalLogMessage(String message); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the matched DN for this operation. |
| | | * |
| | | * @return The matched DN for this operation, or <CODE>null</CODE> |
| | | * if the operation has not yet completed or does not have |
| | | * a matched DN. |
| | | */ |
| | | public DN getMatchedDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the matched DN for this operation. |
| | | * |
| | | * @param matchedDN The matched DN for this operation. |
| | | */ |
| | | public void setMatchedDN(DN matchedDN); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of referral URLs for this operation. Its |
| | | * contents must not be altered by the caller. |
| | | * |
| | | * @return The set of referral URLs for this operation, or |
| | | * <CODE>null</CODE> if the operation is not yet complete |
| | | * or does not have a set of referral URLs. |
| | | */ |
| | | public List<String> getReferralURLs(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the set of referral URLs for this operation. |
| | | * |
| | | * @param referralURLs The set of referral URLs for this |
| | | * operation. |
| | | */ |
| | | public void setReferralURLs(List<String> referralURLs); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Sets the response elements for this operation based on the |
| | | * information contained in the provided |
| | | * <CODE>DirectoryException</CODE> object. |
| | | * |
| | | * @param directoryException The exception containing the |
| | | * information to use for the response |
| | | * elements. |
| | | */ |
| | | public void setResponseData(DirectoryException directoryException); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether this is an internal operation rather than one |
| | | * that was requested by an external client. |
| | | * |
| | | * @return <CODE>true</CODE> if this is an internal operation, or |
| | | * <CODE>false</CODE> if it is not. |
| | | */ |
| | | public boolean isInternalOperation(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether this is a synchronization operation rather than |
| | | * one that was requested by an external client. |
| | | * |
| | | * @return <CODE>true</CODE> if this is a data synchronization |
| | | * operation, or <CODE>false</CODE> if it is not. |
| | | */ |
| | | public boolean isSynchronizationOperation(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the authorization DN for this operation. In many |
| | | * cases, it will be the same as the DN of the authenticated user |
| | | * for the underlying connection, or the null DN if no |
| | | * authentication has been performed on that connection. However, |
| | | * it may be some other value if special processing has been |
| | | * requested (e.g., the operation included a proxied authorization |
| | | * control). |
| | | * |
| | | * @return The authorization DN for this operation. |
| | | */ |
| | | public DN getAuthorizationDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of attachments defined for this operation, as a |
| | | * mapping between the attachment name and the associated object. |
| | | * |
| | | * @return The set of attachments defined for this operation. |
| | | */ |
| | | public Map<String,Object> getAttachments(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the attachment with the specified name. |
| | | * |
| | | * @param name The name for the attachment to retrieve. It will |
| | | * be treated in a case-sensitive manner. |
| | | * |
| | | * @return The requested attachment object, or <CODE>null</CODE> if |
| | | * it does not exist. |
| | | */ |
| | | public Object getAttachment(String name); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Removes the attachment with the specified name. |
| | | * |
| | | * @param name The name for the attachment to remove. It will be |
| | | * treated in a case-sensitive manner. |
| | | * |
| | | * @return The attachment that was removed, or <CODE>null</CODE> if |
| | | * it does not exist. |
| | | */ |
| | | public Object removeAttachment(String name); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Sets the value of the specified attachment. If an attachment |
| | | * already exists with the same name, it will be replaced. |
| | | * Otherwise, a new attachment will be added. |
| | | * |
| | | * @param name The name to use for the attachment. |
| | | * @param value The value to use for the attachment. |
| | | * |
| | | * @return The former value held by the attachment with the given |
| | | * name, or <CODE>null</CODE> if there was previously no |
| | | * such attachment. |
| | | */ |
| | | public Object setAttachment(String name, Object value); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing started for this operation. |
| | | * |
| | | * @return The time that processing started for this operation. |
| | | */ |
| | | public long getProcessingStartTime(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a string representation of this operation. |
| | | * |
| | | * @return A string representation of this operation. |
| | | */ |
| | | public String toString(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Appends a string representation of this operation to the provided |
| | | * buffer. |
| | | * |
| | | * @param buffer The buffer into which a string representation of |
| | | * this operation should be appended. |
| | | */ |
| | | public void toString(StringBuilder buffer); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import java.util.LinkedHashSet; |
| | | |
| | | import org.opends.server.protocols.ldap.LDAPFilter; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DereferencePolicy; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.SearchScope; |
| | | import org.opends.server.types.SearchFilter; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * post-operation plugins for search operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PostOperationSearchOperation |
| | | extends PostOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the raw, unprocessed base DN as included in the request |
| | | * from the client. This may or may not contain a valid DN, as no |
| | | * validation will have been performed. |
| | | * |
| | | * @return The raw, unprocessed base DN as included in the request |
| | | * from the client. |
| | | */ |
| | | public ByteString getRawBaseDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the base DN for this search operation. |
| | | * |
| | | * @return The base DN for this search operation. |
| | | */ |
| | | public DN getBaseDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the scope for this search operation. |
| | | * |
| | | * @return The scope for this search operation. |
| | | */ |
| | | public SearchScope getScope(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the alias dereferencing policy for this search |
| | | * operation. |
| | | * |
| | | * @return The alias dereferencing policy for this search |
| | | * operation. |
| | | */ |
| | | public DereferencePolicy getDerefPolicy(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the size limit for this search operation. |
| | | * |
| | | * @return The size limit for this search operation. |
| | | */ |
| | | public int getSizeLimit(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time limit for this search operation. |
| | | * |
| | | * @return The time limit for this search operation. |
| | | */ |
| | | public int getTimeLimit(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the typesOnly flag for this search operation. |
| | | * |
| | | * @return The typesOnly flag for this search operation. |
| | | */ |
| | | public boolean getTypesOnly(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the raw, unprocessed search filter as included in the |
| | | * request from the client. It may or may not contain a valid |
| | | * filter (e.g., unsupported attribute types or values with an |
| | | * invalid syntax) because no validation will have been performed on |
| | | * it. |
| | | * |
| | | * @return The raw, unprocessed search filter as included in the |
| | | * request from the client. |
| | | */ |
| | | public LDAPFilter getRawFilter(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the filter for this search operation. |
| | | * |
| | | * @return The filter for this search operation. |
| | | */ |
| | | public SearchFilter getFilter(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of requested attributes for this search |
| | | * operation. Its contents should not be be altered. |
| | | * |
| | | * @return The set of requested attributes for this search |
| | | * operation. |
| | | */ |
| | | public LinkedHashSet<String> getAttributes(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the number of entries sent to the client for this |
| | | * search operation. |
| | | * |
| | | * @return The number of entries sent to the client for this search |
| | | * operation. |
| | | */ |
| | | public int getEntriesSent(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the number of search references sent to the client for |
| | | * this search operation. |
| | | * |
| | | * @return The number of search references sent to the client for |
| | | * this search operation. |
| | | */ |
| | | public int getReferencesSent(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * post-operation plugins for unbind operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PostOperationUnbindOperation |
| | | extends PostOperationOperation |
| | | { |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.opends.server.protocols.ldap.LDAPAttribute; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ObjectClass; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * post-response plugins for add operations. Note that this interface |
| | | * is intended only to define an API for use by plugins and is not |
| | | * intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PostResponseAddOperation |
| | | extends PostResponseOperation |
| | | { |
| | | /** |
| | | * Retrieves the DN of the entry to add in a raw, unparsed form as |
| | | * it was included in the request. This may or may not actually |
| | | * contain a valid DN, since no validation will have been performed |
| | | * on it. |
| | | * |
| | | * @return The DN of the entry in a raw, unparsed form. |
| | | */ |
| | | public ByteString getRawEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of attributes in their raw, unparsed form as |
| | | * read from the client request. Some of these attributes may be |
| | | * invalid as no validation will have been performed on them. The |
| | | * returned list must not be altered by the caller. |
| | | * |
| | | * @return The set of attributes in their raw, unparsed form as |
| | | * read from the client request. |
| | | */ |
| | | public List<LDAPAttribute> getRawAttributes(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DN of the entry to add. |
| | | * |
| | | * @return The DN of the entry to add. |
| | | */ |
| | | public DN getEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of processed objectclasses for the entry to |
| | | * add. The contents of the returned map must not be altered by the |
| | | * caller. |
| | | * |
| | | * @return The set of processed objectclasses for the entry to add. |
| | | */ |
| | | public Map<ObjectClass,String> getObjectClasses(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of processed user attributes for the entry to |
| | | * add. The contents of the returned map must not be altered by the |
| | | * caller. |
| | | * |
| | | * @return The set of processed user attributes for the entry to |
| | | * add. |
| | | */ |
| | | public Map<AttributeType,List<Attribute>> getUserAttributes(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of processed operational attributes for the |
| | | * entry to add. The contents of the returned map must not be |
| | | * altered by the caller. |
| | | * |
| | | * @return The set of processed operational attributes for the |
| | | * entry to add. |
| | | */ |
| | | public Map<AttributeType,List<Attribute>> |
| | | getOperationalAttributes(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the entry to be added to the server. The contents of |
| | | * the returned entry must not be altered by the caller. |
| | | * |
| | | * @return The entry to be added to the server. |
| | | */ |
| | | public Entry getEntryToAdd(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AuthenticationType; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * post-response plugins for bind operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PostResponseBindOperation |
| | | extends PostOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the authentication type for this bind operation. |
| | | * |
| | | * @return The authentication type for this bind operation. |
| | | */ |
| | | public AuthenticationType getAuthenticationType(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the raw, unprocessed bind DN for this bind operation as |
| | | * contained in the client request. The value may not actually |
| | | * contain a valid DN, as no validation will have been performed. |
| | | * |
| | | * @return The raw, unprocessed bind DN for this bind operation as |
| | | * contained in the client request. |
| | | */ |
| | | public ByteString getRawBindDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the bind DN for this bind operation. |
| | | * |
| | | * @return The bind DN for this bind operation. |
| | | */ |
| | | public DN getBindDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the simple authentication password for this bind |
| | | * operation. |
| | | * |
| | | * @return The simple authentication password for this bind |
| | | * operation. |
| | | */ |
| | | public ByteString getSimplePassword(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the SASL mechanism for this bind operation. |
| | | * |
| | | * @return The SASL mechanism for this bind operation, or |
| | | * <CODE>null</CODE> if the bind does not use SASL |
| | | * authentication. |
| | | */ |
| | | public String getSASLMechanism(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the SASL credentials for this bind operation. |
| | | * |
| | | * @return The SASL credentials for this bind operation, or |
| | | * <CODE>null</CODE> if there are none or if the bind does |
| | | * not use SASL authentication. |
| | | */ |
| | | public ASN1OctetString getSASLCredentials(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of server SASL credentials to include in the |
| | | * bind response. |
| | | * |
| | | * @return The set of server SASL credentials to include in the |
| | | * bind response, or <CODE>null</CODE> if there are none. |
| | | */ |
| | | public ASN1OctetString getServerSASLCredentials(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the user entry associated with the SASL authentication |
| | | * attempt. This should be set by any SASL mechanism in which the |
| | | * processing was able to get far enough to make this determination, |
| | | * regardless of whether the authentication was ultimately |
| | | * successful. |
| | | * |
| | | * @return The user entry associated with the SASL authentication |
| | | * attempt, or <CODE>null</CODE> if it was not a SASL |
| | | * authentication or the SASL processing was not able to |
| | | * map the request to a user. |
| | | */ |
| | | public Entry getSASLAuthUserEntry(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a human-readable message providing the reason that the |
| | | * authentication failed, if available. |
| | | * |
| | | * @return A human-readable message providing the reason that the |
| | | * authentication failed, or <CODE>null</CODE> if none is |
| | | * available. |
| | | */ |
| | | public String getAuthFailureReason(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the unique identifier for the authentication failure |
| | | * reason, if available. |
| | | * |
| | | * @return The unique identifier for the authentication failure |
| | | * reason, or zero if none is available. |
| | | */ |
| | | public int getAuthFailureID(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the user entry DN for this bind operation. It will |
| | | * only be available if the bind processing has proceeded far enough |
| | | * to identify the user attempting to authenticate. |
| | | * |
| | | * @return The user entry DN for this bind operation, or |
| | | * <CODE>null</CODE> if the bind processing has not |
| | | * progressed far enough to identify the user or if the |
| | | * user DN could not be determined. |
| | | */ |
| | | public DN getUserEntryDN(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * post-response plugins for compare operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PostResponseCompareOperation |
| | | extends PostResponseOperation |
| | | { |
| | | /** |
| | | * Retrieves the raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | * |
| | | * @return The raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | */ |
| | | public ByteString getRawEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DN of the entry to compare. |
| | | * |
| | | * @return The DN of the entry to compare. |
| | | */ |
| | | public DN getEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the raw attribute type for this compare operation. |
| | | * |
| | | * @return The raw attribute type for this compare operation. |
| | | */ |
| | | public String getRawAttributeType(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the attribute type for this compare operation. |
| | | * |
| | | * @return The attribute type for this compare operation. |
| | | */ |
| | | public AttributeType getAttributeType(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the assertion value for this compare operation. |
| | | * |
| | | * @return The assertion value for this compare operation. |
| | | */ |
| | | public ByteString getAssertionValue(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the entry to target with the compare operation. |
| | | * |
| | | * @return The entry to target with the compare operation. |
| | | */ |
| | | public Entry getEntryToCompare(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * post-response plugins for delete operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PostResponseDeleteOperation |
| | | extends PostResponseOperation |
| | | { |
| | | /** |
| | | * Retrieves the raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | * |
| | | * @return The raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | */ |
| | | public ByteString getRawEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DN of the entry to delete. |
| | | * |
| | | * @return The DN of the entry to delete. |
| | | */ |
| | | public DN getEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the entry to be deleted. |
| | | * |
| | | * @return The entry to be deleted. |
| | | */ |
| | | public Entry getEntryToDelete(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * post-response plugins for extended operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PostResponseExtendedOperation |
| | | extends PostOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the OID for the request associated with this extended |
| | | * operation. |
| | | * |
| | | * @return The OID for the request associated with this extended |
| | | * operation. |
| | | */ |
| | | public String getRequestOID(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the value for the request associated with this extended |
| | | * operation. |
| | | * |
| | | * @return The value for the request associated with this extended |
| | | * operation. |
| | | */ |
| | | public ASN1OctetString getRequestValue(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID to include in the response to the client. |
| | | * |
| | | * @return The OID to include in the response to the client. |
| | | */ |
| | | public String getResponseOID(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the value to include in the response to the client. |
| | | * |
| | | * @return The value to include in the response to the client. |
| | | */ |
| | | public ASN1OctetString getResponseValue(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.Modification; |
| | | import org.opends.server.types.RDN; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * post-response plugins for modify DN operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PostResponseModifyDNOperation |
| | | extends PostResponseOperation |
| | | { |
| | | /** |
| | | * Retrieves the raw, unprocessed entry DN as included in the client |
| | | * request. The DN that is returned may or may not be a valid DN, |
| | | * since no validation will have been performed upon it. |
| | | * |
| | | * @return The raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | */ |
| | | public ByteString getRawEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DN of the entry to rename. This should not be |
| | | * called by pre-parse plugins because the processed DN will not be |
| | | * available yet. Instead, they should call the |
| | | * <CODE>getRawEntryDN</CODE> method. |
| | | * |
| | | * @return The DN of the entry to rename, or <CODE>null</CODE> if |
| | | * the raw entry DN has not yet been processed. |
| | | */ |
| | | public DN getEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the raw, unprocessed newRDN as included in the request |
| | | * from the client. This may or may not contain a valid RDN, as no |
| | | * validation will have been performed on it. |
| | | * |
| | | * @return The raw, unprocessed newRDN as included in the request |
| | | * from the client. |
| | | */ |
| | | public ByteString getRawNewRDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the new RDN to use for the entry. This should not be |
| | | * called by pre-parse plugins, because the processed newRDN will |
| | | * not yet be available. Pre-parse plugins should instead use the |
| | | * <CODE>getRawNewRDN</CODE> method. |
| | | * |
| | | * @return The new RDN to use for the entry, or <CODE>null</CODE> |
| | | * if the raw newRDN has not yet been processed. |
| | | */ |
| | | public RDN getNewRDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the current RDN value should be removed from |
| | | * the entry. |
| | | * |
| | | * @return <CODE>true</CODE> if the current RDN value should be |
| | | * removed from the entry, or <CODE>false</CODE> if not. |
| | | */ |
| | | public boolean deleteOldRDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the raw, unprocessed newSuperior from the client |
| | | * request. This may or may not contain a valid DN, as no |
| | | * validation will have been performed on it. |
| | | * |
| | | * @return The raw, unprocessed newSuperior from the client |
| | | * request, or <CODE>null</CODE> if there is none. |
| | | */ |
| | | public ByteString getRawNewSuperior(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the newSuperior DN for the entry. This should not be |
| | | * called by pre-parse plugins, because the processed DN will not |
| | | * yet be available at that time. Instead, they should use the |
| | | * <CODE>getRawNewSuperior</CODE> method. |
| | | * |
| | | * @return The newSuperior DN for the entry, or <CODE>null</CODE> |
| | | * if there is no newSuperior DN for this request or if the |
| | | * raw newSuperior has not yet been processed. |
| | | */ |
| | | public DN getNewSuperior(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of modifications applied to attributes of the |
| | | * target entry in the course of processing this modify DN |
| | | * operation. This will include attribute-level changes from the |
| | | * modify DN itself (e.g., removing old RDN values if deleteOldRDN |
| | | * is set, or adding new RDN values that don't already exist), but |
| | | * it may also be used by pre-operation plugins to cause additional |
| | | * changes in the entry. In this case, those plugins may add |
| | | * modifications to this list through the |
| | | * <CODE>addModification</CODE> method (the list returned from this |
| | | * method should not be modified directly) if any changes should be |
| | | * processed in addition to the core modify DN processing. Backends |
| | | * may read this list to identify which attribute-level changes were |
| | | * applied in order to more easily apply updates to attribute |
| | | * indexes. |
| | | * |
| | | * @return The set of modifications applied to attributes during |
| | | * the course of the modify DN processing, or |
| | | * <CODE>null</CODE> if that information is not yet |
| | | * available (e.g., during pre-parse plugins). |
| | | */ |
| | | public List<Modification> getModifications(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the current entry, before it is renamed. This will not |
| | | * be available to pre-parse plugins or during the conflict |
| | | * resolution portion of the synchronization processing. |
| | | * |
| | | * @return The current entry, or <CODE>null</CODE> if it is not yet |
| | | * available. |
| | | */ |
| | | public Entry getOriginalEntry(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the new entry, as it will appear after it is renamed. |
| | | * This will not be available to pre-parse plugins or during the |
| | | * conflict resolution portion of the synchronization processing. |
| | | * |
| | | * @return The updated entry, or <CODE>null</CODE> if it is not yet |
| | | * available. |
| | | */ |
| | | public Entry getUpdatedEntry(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.protocols.ldap.LDAPModification; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.Modification; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * post-response plugins for modify operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PostResponseModifyOperation |
| | | extends PostResponseOperation |
| | | { |
| | | /** |
| | | * Retrieves the raw, unprocessed entry DN as included in the client |
| | | * request. The DN that is returned may or may not be a valid DN, |
| | | * since no validation will have been performed upon it. |
| | | * |
| | | * @return The raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | */ |
| | | public ByteString getRawEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DN of the entry to modify. |
| | | * |
| | | * @return The DN of the entry to modify. |
| | | */ |
| | | public DN getEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of raw, unprocessed modifications as included |
| | | * in the client request. Note that this may contain one or more |
| | | * invalid modifications, as no validation will have been performed |
| | | * on this information. The list returned must not be altered by |
| | | * the caller. |
| | | * |
| | | * @return The set of raw, unprocessed modifications as included |
| | | * in the client request. |
| | | */ |
| | | public List<LDAPModification> getRawModifications(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of modifications for this modify operation. |
| | | Its contents should not be altered. |
| | | * |
| | | * @return The set of modifications for this modify operation. |
| | | */ |
| | | public List<Modification> getModifications(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the current entry before any modifications are applied. |
| | | * It should not be modified by the caller. |
| | | * |
| | | * @return The current entry before any modifications are applied. |
| | | */ |
| | | public Entry getCurrentEntry(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the modified entry that is to be written to the |
| | | * backend. It should not be modified by the caller. |
| | | * |
| | | * @return The modified entry that is to be written to the backend. |
| | | */ |
| | | public Entry getModifiedEntry(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of clear-text current passwords for the user, |
| | | * if available. This will only be available if the modify |
| | | * operation contains one or more delete elements that target the |
| | | * password attribute and provide the values to delete in the clear. |
| | | * This list should not be altered by the caller. |
| | | * |
| | | * @return The set of clear-text current password values as |
| | | * provided in the modify request, or <CODE>null</CODE> if |
| | | * there were none. |
| | | */ |
| | | public List<AttributeValue> getCurrentPasswords(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of clear-text new passwords for the user, if |
| | | * available. This will only be available if the modify operation |
| | | * contains one or more add or replace elements that target the |
| | | * password attribute and provide the values in the clear. This |
| | | * list should not be altered by the caller. |
| | | * |
| | | * @return The set of clear-text new passwords as provided in the |
| | | * modify request, or <CODE>null</CODE> if there were none. |
| | | */ |
| | | public List<AttributeValue> getNewPasswords(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.OperationType; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * post-response plugins for all types of operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PostResponseOperation |
| | | { |
| | | /** |
| | | * Retrieves the operation type for this operation. |
| | | * |
| | | * @return The operation type for this operation. |
| | | */ |
| | | public OperationType getOperationType(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the client connection with which this operation is |
| | | * associated. |
| | | * |
| | | * @return The client connection with which this operation is |
| | | * associated. |
| | | */ |
| | | public ClientConnection getClientConnection(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the unique identifier that is assigned to the client |
| | | * connection that submitted this operation. |
| | | * |
| | | * @return The unique identifier that is assigned to the client |
| | | * connection that submitted this operation. |
| | | */ |
| | | public long getConnectionID(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the operation ID for this operation. |
| | | * |
| | | * @return The operation ID for this operation. |
| | | */ |
| | | public long getOperationID(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the message ID assigned to this operation. |
| | | * |
| | | * @return The message ID assigned to this operation. |
| | | */ |
| | | public int getMessageID(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of controls included in the request from the |
| | | * client. The contents of this list must not be altered. |
| | | * |
| | | * @return The set of controls included in the request from the |
| | | * client. |
| | | */ |
| | | public List<Control> getRequestControls(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of controls to include in the response to the |
| | | * client. The contents of this list must not be altered. |
| | | * |
| | | * @return The set of controls to include in the response to the |
| | | * client. |
| | | */ |
| | | public List<Control> getResponseControls(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the result code for this operation. |
| | | * |
| | | * @return The result code associated for this operation, or |
| | | * <CODE>UNDEFINED</CODE> if the operation has not yet |
| | | * completed. |
| | | */ |
| | | public ResultCode getResultCode(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the error message for this operation. Its contents may |
| | | * be altered by the caller. |
| | | * |
| | | * @return The error message for this operation. |
| | | */ |
| | | public StringBuilder getErrorMessage(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the additional log message for this operation, which |
| | | * should be written to the log but not included in the response to |
| | | * the client. The contents of this buffer may be altered by the |
| | | * caller. |
| | | * |
| | | * @return The additional log message for this operation. |
| | | */ |
| | | public StringBuilder getAdditionalLogMessage(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the matched DN for this operation. |
| | | * |
| | | * @return The matched DN for this operation, or <CODE>null</CODE> |
| | | * if the operation has not yet completed or does not have |
| | | * a matched DN. |
| | | */ |
| | | public DN getMatchedDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of referral URLs for this operation. Its |
| | | * contents must not be altered by the caller. |
| | | * |
| | | * @return The set of referral URLs for this operation, or |
| | | * <CODE>null</CODE> if the operation is not yet complete |
| | | * or does not have a set of referral URLs. |
| | | */ |
| | | public List<String> getReferralURLs(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether this is an internal operation rather than one |
| | | * that was requested by an external client. |
| | | * |
| | | * @return <CODE>true</CODE> if this is an internal operation, or |
| | | * <CODE>false</CODE> if it is not. |
| | | */ |
| | | public boolean isInternalOperation(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether this is a synchronization operation rather than |
| | | * one that was requested by an external client. |
| | | * |
| | | * @return <CODE>true</CODE> if this is a data synchronization |
| | | * operation, or <CODE>false</CODE> if it is not. |
| | | */ |
| | | public boolean isSynchronizationOperation(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the authorization DN for this operation. In many |
| | | * cases, it will be the same as the DN of the authenticated user |
| | | * for the underlying connection, or the null DN if no |
| | | * authentication has been performed on that connection. However, |
| | | * it may be some other value if special processing has been |
| | | * requested (e.g., the operation included a proxied authorization |
| | | * control). |
| | | * |
| | | * @return The authorization DN for this operation. |
| | | */ |
| | | public DN getAuthorizationDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of attachments defined for this operation, as a |
| | | * mapping between the attachment name and the associated object. |
| | | * |
| | | * @return The set of attachments defined for this operation. |
| | | */ |
| | | public Map<String,Object> getAttachments(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the attachment with the specified name. |
| | | * |
| | | * @param name The name for the attachment to retrieve. It will |
| | | * be treated in a case-sensitive manner. |
| | | * |
| | | * @return The requested attachment object, or <CODE>null</CODE> if |
| | | * it does not exist. |
| | | */ |
| | | public Object getAttachment(String name); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Removes the attachment with the specified name. |
| | | * |
| | | * @param name The name for the attachment to remove. It will be |
| | | * treated in a case-sensitive manner. |
| | | * |
| | | * @return The attachment that was removed, or <CODE>null</CODE> if |
| | | * it does not exist. |
| | | */ |
| | | public Object removeAttachment(String name); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Sets the value of the specified attachment. If an attachment |
| | | * already exists with the same name, it will be replaced. |
| | | * Otherwise, a new attachment will be added. |
| | | * |
| | | * @param name The name to use for the attachment. |
| | | * @param value The value to use for the attachment. |
| | | * |
| | | * @return The former value held by the attachment with the given |
| | | * name, or <CODE>null</CODE> if there was previously no |
| | | * such attachment. |
| | | */ |
| | | public Object setAttachment(String name, Object value); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing started for this operation. |
| | | * |
| | | * @return The time that processing started for this operation. |
| | | */ |
| | | public long getProcessingStartTime(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing stopped for this operation. |
| | | * This will actually hold a time immediately before the response |
| | | * was sent to the client. |
| | | * |
| | | * @return The time that processing stopped for this operation. |
| | | */ |
| | | public long getProcessingStopTime(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the length of time in milliseconds that the server |
| | | * spent processing this operation. |
| | | * |
| | | * @return The length of time in milliseconds that the server spent |
| | | * processing this operation. |
| | | */ |
| | | public long getProcessingTime(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a string representation of this operation. |
| | | * |
| | | * @return A string representation of this operation. |
| | | */ |
| | | public String toString(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Appends a string representation of this operation to the provided |
| | | * buffer. |
| | | * |
| | | * @param buffer The buffer into which a string representation of |
| | | * this operation should be appended. |
| | | */ |
| | | public void toString(StringBuilder buffer); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import java.util.LinkedHashSet; |
| | | |
| | | import org.opends.server.protocols.ldap.LDAPFilter; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DereferencePolicy; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.SearchScope; |
| | | import org.opends.server.types.SearchFilter; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * post-response plugins for search operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PostResponseSearchOperation |
| | | extends PostResponseOperation |
| | | { |
| | | /** |
| | | * Retrieves the raw, unprocessed base DN as included in the request |
| | | * from the client. This may or may not contain a valid DN, as no |
| | | * validation will have been performed. |
| | | * |
| | | * @return The raw, unprocessed base DN as included in the request |
| | | * from the client. |
| | | */ |
| | | public ByteString getRawBaseDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the base DN for this search operation. |
| | | * |
| | | * @return The base DN for this search operation. |
| | | */ |
| | | public DN getBaseDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the scope for this search operation. |
| | | * |
| | | * @return The scope for this search operation. |
| | | */ |
| | | public SearchScope getScope(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the alias dereferencing policy for this search |
| | | * operation. |
| | | * |
| | | * @return The alias dereferencing policy for this search |
| | | * operation. |
| | | */ |
| | | public DereferencePolicy getDerefPolicy(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the size limit for this search operation. |
| | | * |
| | | * @return The size limit for this search operation. |
| | | */ |
| | | public int getSizeLimit(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time limit for this search operation. |
| | | * |
| | | * @return The time limit for this search operation. |
| | | */ |
| | | public int getTimeLimit(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the typesOnly flag for this search operation. |
| | | * |
| | | * @return The typesOnly flag for this search operation. |
| | | */ |
| | | public boolean getTypesOnly(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the raw, unprocessed search filter as included in the |
| | | * request from the client. It may or may not contain a valid |
| | | * filter (e.g., unsupported attribute types or values with an |
| | | * invalid syntax) because no validation will have been performed on |
| | | * it. |
| | | * |
| | | * @return The raw, unprocessed search filter as included in the |
| | | * request from the client. |
| | | */ |
| | | public LDAPFilter getRawFilter(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the filter for this search operation. |
| | | * |
| | | * @return The filter for this search operation. |
| | | */ |
| | | public SearchFilter getFilter(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of requested attributes for this search |
| | | * operation. Its contents should not be be altered. |
| | | * |
| | | * @return The set of requested attributes for this search |
| | | * operation. |
| | | */ |
| | | public LinkedHashSet<String> getAttributes(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the number of entries sent to the client for this |
| | | * search operation. |
| | | * |
| | | * @return The number of entries sent to the client for this search |
| | | * operation. |
| | | */ |
| | | public int getEntriesSent(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the number of search references sent to the client for |
| | | * this search operation. |
| | | * |
| | | * @return The number of search references sent to the client for |
| | | * this search operation. |
| | | */ |
| | | public int getReferencesSent(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.opends.server.protocols.ldap.LDAPAttribute; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ObjectClass; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * pre-operation plugins for add operations. Note that this interface |
| | | * is intended only to define an API for use by plugins and is not |
| | | * intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PreOperationAddOperation |
| | | extends PreOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the DN of the entry to add in a raw, unparsed form as |
| | | * it was included in the request. This may or may not actually |
| | | * contain a valid DN, since no validation will have been performed |
| | | * on it. |
| | | * |
| | | * @return The DN of the entry in a raw, unparsed form. |
| | | */ |
| | | public ByteString getRawEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of attributes in their raw, unparsed form as |
| | | * read from the client request. Some of these attributes may be |
| | | * invalid as no validation will have been performed on them. The |
| | | * returned list must not be altered by the caller. |
| | | * |
| | | * @return The set of attributes in their raw, unparsed form as |
| | | * read from the client request. |
| | | */ |
| | | public List<LDAPAttribute> getRawAttributes(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DN of the entry to add. |
| | | * |
| | | * @return The DN of the entry to add. |
| | | */ |
| | | public DN getEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of processed objectclasses for the entry to |
| | | * add. The contents of the returned map must not be altered by the |
| | | * caller. |
| | | * |
| | | * @return The set of processed objectclasses for the entry to add. |
| | | */ |
| | | public Map<ObjectClass,String> getObjectClasses(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Adds the provided objectclass to the entry to add. Note that |
| | | * pre-operation plugin processing is invoked after access control |
| | | * and schema validation, so plugins should be careful to only make |
| | | * changes that will not violate either schema or access control |
| | | * rules. |
| | | * |
| | | * @param objectClass The objectclass to add to the entry. |
| | | * @param name The name to use for the objectclass. |
| | | */ |
| | | public void addObjectClass(ObjectClass objectClass, String name); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Removes the provided objectclass from the entry to add. Note |
| | | * that pre-operation plugin processing is invoked after access |
| | | * control and schema validation, so plugins should be careful to |
| | | * only make changes that will not violate either schema or access |
| | | * control rules. |
| | | * |
| | | * @param objectClass The objectclass to remove from the entry. |
| | | */ |
| | | public void removeObjectClass(ObjectClass objectClass); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of processed user attributes for the entry to |
| | | * add. The contents of the returned map must not be altered by the |
| | | * caller. |
| | | * |
| | | * @return The set of processed user attributes for the entry to |
| | | * add. |
| | | */ |
| | | public Map<AttributeType,List<Attribute>> getUserAttributes(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of processed operational attributes for the |
| | | * entry to add. The contents of the returned map must not be |
| | | * altered by the caller. |
| | | * |
| | | * @return The set of processed operational attributes for the |
| | | * entry to add. |
| | | */ |
| | | public Map<AttributeType,List<Attribute>> |
| | | getOperationalAttributes(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Sets the specified attribute in the entry to add, overwriting any |
| | | * existing attribute of the specified type if necessary. Note that |
| | | * pre-operation plugin processing is invoked after access control |
| | | * and schema validation, so plugins should be careful to only make |
| | | * changes that will not violate either schema or access control |
| | | * rules. |
| | | * |
| | | * @param attributeType The attribute type for the attribute. |
| | | * @param attributeList The attribute list for the provided |
| | | * attribute type. |
| | | */ |
| | | public void setAttribute(AttributeType attributeType, |
| | | List<Attribute> attributeList); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Removes the specified attribute from the entry to add. Note that |
| | | * pre-operation processing is invoked after access control and |
| | | * schema validation, so plugins should be careful to only make |
| | | * changes that will not violate either schema or access control |
| | | * rules. |
| | | * |
| | | * @param attributeType The attribute tyep for the attribute to |
| | | * remove. |
| | | */ |
| | | public void removeAttribute(AttributeType attributeType); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the entry to be added to the server. The contents of |
| | | * the returned entry must not be altered by the caller. |
| | | * |
| | | * @return The entry to be added to the server. |
| | | */ |
| | | public Entry getEntryToAdd(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.AuthenticationType; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DN; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * pre-operation plugins for bind operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PreOperationBindOperation |
| | | extends PreOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the authentication type for this bind operation. |
| | | * |
| | | * @return The authentication type for this bind operation. |
| | | */ |
| | | public AuthenticationType getAuthenticationType(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the raw, unprocessed bind DN for this bind operation as |
| | | * contained in the client request. The value may not actually |
| | | * contain a valid DN, as no validation will have been performed. |
| | | * |
| | | * @return The raw, unprocessed bind DN for this bind operation as |
| | | * contained in the client request. |
| | | */ |
| | | public ByteString getRawBindDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the bind DN for this bind operation. |
| | | * |
| | | * @return The bind DN for this bind operation. |
| | | */ |
| | | public DN getBindDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the simple authentication password for this bind |
| | | * operation. |
| | | * |
| | | * @return The simple authentication password for this bind |
| | | * operation. |
| | | */ |
| | | public ByteString getSimplePassword(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the SASL mechanism for this bind operation. |
| | | * |
| | | * @return The SASL mechanism for this bind operation, or |
| | | * <CODE>null</CODE> if the bind does not use SASL |
| | | * authentication. |
| | | */ |
| | | public String getSASLMechanism(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the SASL credentials for this bind operation. |
| | | * |
| | | * @return The SASL credentials for this bind operation, or |
| | | * <CODE>null</CODE> if there are none or if the bind does |
| | | * not use SASL authentication. |
| | | */ |
| | | public ASN1OctetString getSASLCredentials(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the set of server SASL credentials to include in the |
| | | * bind response. |
| | | * |
| | | * @param serverSASLCredentials The set of server SASL credentials |
| | | * to include in the bind response. |
| | | */ |
| | | public void setServerSASLCredentials(ASN1OctetString |
| | | serverSASLCredentials); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the reason that the authentication failed. |
| | | * |
| | | * @param id The unique identifier for the authentication |
| | | * failure reason. |
| | | * @param reason A human-readable message providing the reason |
| | | * that the authentication failed. |
| | | */ |
| | | public void setAuthFailureReason(int id, String reason); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the user entry DN for this bind operation. It will |
| | | * only be available for simple bind operations (and may be |
| | | * different than the bind DN from the client request). |
| | | * |
| | | * @return The user entry DN for this bind operation, or |
| | | * <CODE>null</CODE> if the bind processing has not |
| | | * progressed far enough to identify the user or if the |
| | | * user DN could not be determined. |
| | | */ |
| | | public DN getUserEntryDN(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * pre-operation plugins for compare operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PreOperationCompareOperation |
| | | extends PreOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | * |
| | | * @return The raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | */ |
| | | public ByteString getRawEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DN of the entry to compare. |
| | | * |
| | | * @return The DN of the entry to compare. |
| | | */ |
| | | public DN getEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the raw attribute type for this compare operation. |
| | | * |
| | | * @return The raw attribute type for this compare operation. |
| | | */ |
| | | public String getRawAttributeType(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the attribute type for this compare operation. |
| | | * |
| | | * @return The attribute type for this compare operation. |
| | | */ |
| | | public AttributeType getAttributeType(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the assertion value for this compare operation. |
| | | * |
| | | * @return The assertion value for this compare operation. |
| | | */ |
| | | public ByteString getAssertionValue(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the assertion value for this compare operation. |
| | | * |
| | | * @param assertionValue The assertion value for this compare |
| | | * operation. |
| | | */ |
| | | public void setAssertionValue(ByteString assertionValue); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the entry to target with the compare operation. |
| | | * |
| | | * @return The entry to target with the compare operation. |
| | | */ |
| | | public Entry getEntryToCompare(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * pre-operation plugins for delete operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PreOperationDeleteOperation |
| | | extends PreOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | * |
| | | * @return The raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | */ |
| | | public ByteString getRawEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DN of the entry to delete. |
| | | * |
| | | * @return The DN of the entry to delete. |
| | | */ |
| | | public DN getEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the entry to be deleted. |
| | | * |
| | | * @return The entry to be deleted. |
| | | */ |
| | | public Entry getEntryToDelete(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * pre-operation plugins for extended operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PreOperationExtendedOperation |
| | | extends PreOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the OID for the request associated with this extended |
| | | * operation. |
| | | * |
| | | * @return The OID for the request associated with this extended |
| | | * operation. |
| | | */ |
| | | public String getRequestOID(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the value for the request associated with this extended |
| | | * operation. |
| | | * |
| | | * @return The value for the request associated with this extended |
| | | * operation. |
| | | */ |
| | | public ASN1OctetString getRequestValue(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the OID to include in the response to the client. |
| | | * |
| | | * @param responseOID The OID to include in the response to the |
| | | * client. |
| | | */ |
| | | public void setResponseOID(String responseOID); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the value to include in the response to the client. |
| | | * |
| | | * @param responseValue The value to include in the response to |
| | | * the client. |
| | | */ |
| | | public void setResponseValue(ASN1OctetString responseValue); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.Modification; |
| | | import org.opends.server.types.RDN; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * pre-operation plugins for modify DN operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PreOperationModifyDNOperation |
| | | extends PreOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the raw, unprocessed entry DN as included in the client |
| | | * request. The DN that is returned may or may not be a valid DN, |
| | | * since no validation will have been performed upon it. |
| | | * |
| | | * @return The raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | */ |
| | | public ByteString getRawEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DN of the entry to rename. This should not be |
| | | * called by pre-parse plugins because the processed DN will not be |
| | | * available yet. Instead, they should call the |
| | | * <CODE>getRawEntryDN</CODE> method. |
| | | * |
| | | * @return The DN of the entry to rename, or <CODE>null</CODE> if |
| | | * the raw entry DN has not yet been processed. |
| | | */ |
| | | public DN getEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the raw, unprocessed newRDN as included in the request |
| | | * from the client. This may or may not contain a valid RDN, as no |
| | | * validation will have been performed on it. |
| | | * |
| | | * @return The raw, unprocessed newRDN as included in the request |
| | | * from the client. |
| | | */ |
| | | public ByteString getRawNewRDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the new RDN to use for the entry. This should not be |
| | | * called by pre-parse plugins, because the processed newRDN will |
| | | * not yet be available. Pre-parse plugins should instead use the |
| | | * <CODE>getRawNewRDN</CODE> method. |
| | | * |
| | | * @return The new RDN to use for the entry, or <CODE>null</CODE> |
| | | * if the raw newRDN has not yet been processed. |
| | | */ |
| | | public RDN getNewRDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the current RDN value should be removed from |
| | | * the entry. |
| | | * |
| | | * @return <CODE>true</CODE> if the current RDN value should be |
| | | * removed from the entry, or <CODE>false</CODE> if not. |
| | | */ |
| | | public boolean deleteOldRDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the raw, unprocessed newSuperior from the client |
| | | * request. This may or may not contain a valid DN, as no |
| | | * validation will have been performed on it. |
| | | * |
| | | * @return The raw, unprocessed newSuperior from the client |
| | | * request, or <CODE>null</CODE> if there is none. |
| | | */ |
| | | public ByteString getRawNewSuperior(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the newSuperior DN for the entry. This should not be |
| | | * called by pre-parse plugins, because the processed DN will not |
| | | * yet be available at that time. Instead, they should use the |
| | | * <CODE>getRawNewSuperior</CODE> method. |
| | | * |
| | | * @return The newSuperior DN for the entry, or <CODE>null</CODE> |
| | | * if there is no newSuperior DN for this request or if the |
| | | * raw newSuperior has not yet been processed. |
| | | */ |
| | | public DN getNewSuperior(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of modifications applied to attributes of the |
| | | * target entry in the course of processing this modify DN |
| | | * operation. This will include attribute-level changes from the |
| | | * modify DN itself (e.g., removing old RDN values if deleteOldRDN |
| | | * is set, or adding new RDN values that don't already exist), but |
| | | * it may also be used by pre-operation plugins to cause additional |
| | | * changes in the entry. In this case, those plugins may add |
| | | * modifications to this list through the |
| | | * <CODE>addModification</CODE> method (the list returned from this |
| | | * method should not be modified directly) if any changes should be |
| | | * processed in addition to the core modify DN processing. Backends |
| | | * may read this list to identify which attribute-level changes were |
| | | * applied in order to more easily apply updates to attribute |
| | | * indexes. |
| | | * |
| | | * @return The set of modifications applied to attributes during |
| | | * the course of the modify DN processing, or |
| | | * <CODE>null</CODE> if that information is not yet |
| | | * available (e.g., during pre-parse plugins). |
| | | */ |
| | | public List<Modification> getModifications(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Adds the provided modification to the set of modifications to be |
| | | * applied as part of the update. This should only be called by |
| | | * pre-operation plugins. |
| | | * |
| | | * @param modification The modification to add to the set of |
| | | * modifications to apply to the entry. |
| | | */ |
| | | public void addModification(Modification modification); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the current entry, before it is renamed. This will not |
| | | * be available to pre-parse plugins or during the conflict |
| | | * resolution portion of the synchronization processing. |
| | | * |
| | | * @return The current entry, or <CODE>null</CODE> if it is not yet |
| | | * available. |
| | | */ |
| | | public Entry getOriginalEntry(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the new entry, as it will appear after it is renamed. |
| | | * This will not be available to pre-parse plugins or during the |
| | | * conflict resolution portion of the synchronization processing. |
| | | * |
| | | * @return The updated entry, or <CODE>null</CODE> if it is not yet |
| | | * available. |
| | | */ |
| | | public Entry getUpdatedEntry(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.protocols.ldap.LDAPModification; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.Modification; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * pre-operation plugins for modify operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PreOperationModifyOperation |
| | | extends PreOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the raw, unprocessed entry DN as included in the client |
| | | * request. The DN that is returned may or may not be a valid DN, |
| | | * since no validation will have been performed upon it. |
| | | * |
| | | * @return The raw, unprocessed entry DN as included in the client |
| | | * request. |
| | | */ |
| | | public ByteString getRawEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DN of the entry to modify. |
| | | * |
| | | * @return The DN of the entry to modify. |
| | | */ |
| | | public DN getEntryDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of raw, unprocessed modifications as included |
| | | * in the client request. Note that this may contain one or more |
| | | * invalid modifications, as no validation will have been performed |
| | | * on this information. The list returned must not be altered by |
| | | * the caller. |
| | | * |
| | | * @return The set of raw, unprocessed modifications as included |
| | | * in the client request. |
| | | */ |
| | | public List<LDAPModification> getRawModifications(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of modifications for this modify operation. |
| | | Its contents should not be altered. |
| | | * |
| | | * @return The set of modifications for this modify operation. |
| | | */ |
| | | public List<Modification> getModifications(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Adds the provided modification to the set of modifications to |
| | | * this modify operation. Note that this will be called after the |
| | | * schema and access control processing, so the caller must be |
| | | * careful to avoid making any changes that will violate schema or |
| | | * access control constraints. |
| | | * |
| | | * @param modification The modification to add to the set of |
| | | * changes for this modify operation. |
| | | * |
| | | * @throws DirectoryException If an unexpected problem occurs |
| | | * while applying the modification to |
| | | * the entry. |
| | | */ |
| | | public void addModification(Modification modification) |
| | | throws DirectoryException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the current entry before any modifications are applied. |
| | | * It should not be modified by the caller. |
| | | * |
| | | * @return The current entry before any modifications are applied. |
| | | */ |
| | | public Entry getCurrentEntry(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the modified entry that is to be written to the |
| | | * backend. This entry should not be modified directly, but should |
| | | * only be altered through the <CODE>addModification</CODE> method. |
| | | * |
| | | * @return The modified entry that is to be written to the backend. |
| | | */ |
| | | public Entry getModifiedEntry(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of clear-text current passwords for the user, |
| | | * if available. This will only be available if the modify |
| | | * operation contains one or more delete elements that target the |
| | | * password attribute and provide the values to delete in the clear. |
| | | * This list should not be altered by the caller. |
| | | * |
| | | * @return The set of clear-text current password values as |
| | | * provided in the modify request, or <CODE>null</CODE> if |
| | | * there were none. |
| | | */ |
| | | public List<AttributeValue> getCurrentPasswords(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of clear-text new passwords for the user, if |
| | | * available. This will only be available if the modify operation |
| | | * contains one or more add or replace elements that target the |
| | | * password attribute and provide the values in the clear. This |
| | | * list should not be altered by the caller. |
| | | * |
| | | * @return The set of clear-text new passwords as provided in the |
| | | * modify request, or <CODE>null</CODE> if there were none. |
| | | */ |
| | | public List<AttributeValue> getNewPasswords(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.OperationType; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * pre-operation plugins for all types of operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PreOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the operation type for this operation. |
| | | * |
| | | * @return The operation type for this operation. |
| | | */ |
| | | public OperationType getOperationType(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the client connection with which this operation is |
| | | * associated. |
| | | * |
| | | * @return The client connection with which this operation is |
| | | * associated. |
| | | */ |
| | | public ClientConnection getClientConnection(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the unique identifier that is assigned to the client |
| | | * connection that submitted this operation. |
| | | * |
| | | * @return The unique identifier that is assigned to the client |
| | | * connection that submitted this operation. |
| | | */ |
| | | public long getConnectionID(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the operation ID for this operation. |
| | | * |
| | | * @return The operation ID for this operation. |
| | | */ |
| | | public long getOperationID(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the message ID assigned to this operation. |
| | | * |
| | | * @return The message ID assigned to this operation. |
| | | */ |
| | | public int getMessageID(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of controls included in the request from the |
| | | * client. The contents of this list must not be altered. |
| | | * |
| | | * @return The set of controls included in the request from the |
| | | * client. |
| | | */ |
| | | public List<Control> getRequestControls(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of controls to include in the response to the |
| | | * client. The contents of this list must not be altered. |
| | | * |
| | | * @return The set of controls to include in the response to the |
| | | * client. |
| | | */ |
| | | public List<Control> getResponseControls(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Adds the provided control to the set of controls to include in |
| | | * the response to the client. |
| | | * |
| | | * @param control The control to add to the set of controls to |
| | | * include in the response to the client. |
| | | */ |
| | | public void addResponseControl(Control control); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Removes the provided control from the set of controls to include |
| | | * in the response to the client. |
| | | * |
| | | * @param control The control to remove from the set of controls |
| | | * to include in the response to the client. |
| | | */ |
| | | public void removeResponseControl(Control control); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the result code for this operation. |
| | | * |
| | | * @return The result code associated for this operation, or |
| | | * <CODE>UNDEFINED</CODE> if the operation has not yet |
| | | * completed. |
| | | */ |
| | | public ResultCode getResultCode(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the result code for this operation. |
| | | * |
| | | * @param resultCode The result code for this operation. |
| | | */ |
| | | public void setResultCode(ResultCode resultCode); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the error message for this operation. Its contents may |
| | | * be altered by the caller. |
| | | * |
| | | * @return The error message for this operation. |
| | | */ |
| | | public StringBuilder getErrorMessage(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the error message for this operation. |
| | | * |
| | | * @param errorMessage The error message for this operation. |
| | | */ |
| | | public void setErrorMessage(StringBuilder errorMessage); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Appends the provided message to the error message buffer. If the |
| | | * buffer has not yet been created, then this will create it first |
| | | * and then add the provided message. |
| | | * |
| | | * @param message The message to append to the error message |
| | | * buffer. |
| | | */ |
| | | public void appendErrorMessage(String message); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the additional log message for this operation, which |
| | | * should be written to the log but not included in the response to |
| | | * the client. The contents of this buffer may be altered by the |
| | | * caller. |
| | | * |
| | | * @return The additional log message for this operation. |
| | | */ |
| | | public StringBuilder getAdditionalLogMessage(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the additional log message for this operation, which |
| | | * should be written to the log but not included in the response to |
| | | * the client. |
| | | * |
| | | * @param additionalLogMessage The additional log message for this |
| | | * operation. |
| | | */ |
| | | public void setAdditionalLogMessage( |
| | | StringBuilder additionalLogMessage); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Appends the provided message to the additional log information |
| | | * for this operation. |
| | | * |
| | | * @param message The message that should be appended to the |
| | | * additional log information for this operation. |
| | | */ |
| | | public void appendAdditionalLogMessage(String message); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the matched DN for this operation. |
| | | * |
| | | * @return The matched DN for this operation, or <CODE>null</CODE> |
| | | * if the operation has not yet completed or does not have |
| | | * a matched DN. |
| | | */ |
| | | public DN getMatchedDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the matched DN for this operation. |
| | | * |
| | | * @param matchedDN The matched DN for this operation. |
| | | */ |
| | | public void setMatchedDN(DN matchedDN); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of referral URLs for this operation. Its |
| | | * contents must not be altered by the caller. |
| | | * |
| | | * @return The set of referral URLs for this operation, or |
| | | * <CODE>null</CODE> if the operation is not yet complete |
| | | * or does not have a set of referral URLs. |
| | | */ |
| | | public List<String> getReferralURLs(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the set of referral URLs for this operation. |
| | | * |
| | | * @param referralURLs The set of referral URLs for this |
| | | * operation. |
| | | */ |
| | | public void setReferralURLs(List<String> referralURLs); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Sets the response elements for this operation based on the |
| | | * information contained in the provided |
| | | * <CODE>DirectoryException</CODE> object. |
| | | * |
| | | * @param directoryException The exception containing the |
| | | * information to use for the response |
| | | * elements. |
| | | */ |
| | | public void setResponseData(DirectoryException directoryException); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether this is an internal operation rather than one |
| | | * that was requested by an external client. |
| | | * |
| | | * @return <CODE>true</CODE> if this is an internal operation, or |
| | | * <CODE>false</CODE> if it is not. |
| | | */ |
| | | public boolean isInternalOperation(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether this is a synchronization operation rather than |
| | | * one that was requested by an external client. |
| | | * |
| | | * @return <CODE>true</CODE> if this is a data synchronization |
| | | * operation, or <CODE>false</CODE> if it is not. |
| | | */ |
| | | public boolean isSynchronizationOperation(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the authorization DN for this operation. In many |
| | | * cases, it will be the same as the DN of the authenticated user |
| | | * for the underlying connection, or the null DN if no |
| | | * authentication has been performed on that connection. However, |
| | | * it may be some other value if special processing has been |
| | | * requested (e.g., the operation included a proxied authorization |
| | | * control). |
| | | * |
| | | * @return The authorization DN for this operation. |
| | | */ |
| | | public DN getAuthorizationDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of attachments defined for this operation, as a |
| | | * mapping between the attachment name and the associated object. |
| | | * |
| | | * @return The set of attachments defined for this operation. |
| | | */ |
| | | public Map<String,Object> getAttachments(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the attachment with the specified name. |
| | | * |
| | | * @param name The name for the attachment to retrieve. It will |
| | | * be treated in a case-sensitive manner. |
| | | * |
| | | * @return The requested attachment object, or <CODE>null</CODE> if |
| | | * it does not exist. |
| | | */ |
| | | public Object getAttachment(String name); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Removes the attachment with the specified name. |
| | | * |
| | | * @param name The name for the attachment to remove. It will be |
| | | * treated in a case-sensitive manner. |
| | | * |
| | | * @return The attachment that was removed, or <CODE>null</CODE> if |
| | | * it does not exist. |
| | | */ |
| | | public Object removeAttachment(String name); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Sets the value of the specified attachment. If an attachment |
| | | * already exists with the same name, it will be replaced. |
| | | * Otherwise, a new attachment will be added. |
| | | * |
| | | * @param name The name to use for the attachment. |
| | | * @param value The value to use for the attachment. |
| | | * |
| | | * @return The former value held by the attachment with the given |
| | | * name, or <CODE>null</CODE> if there was previously no |
| | | * such attachment. |
| | | */ |
| | | public Object setAttachment(String name, Object value); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that processing started for this operation. |
| | | * |
| | | * @return The time that processing started for this operation. |
| | | */ |
| | | public long getProcessingStartTime(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the cancel request that has been issued for this |
| | | * operation, if there is one. |
| | | * |
| | | * @return The cancel request that has been issued for this |
| | | * operation, or <CODE>null</CODE> if there has not been |
| | | * any request to cancel. |
| | | */ |
| | | public CancelRequest getCancelRequest(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a string representation of this operation. |
| | | * |
| | | * @return A string representation of this operation. |
| | | */ |
| | | public String toString(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Appends a string representation of this operation to the provided |
| | | * buffer. |
| | | * |
| | | * @param buffer The buffer into which a string representation of |
| | | * this operation should be appended. |
| | | */ |
| | | public void toString(StringBuilder buffer); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | import java.util.LinkedHashSet; |
| | | |
| | | import org.opends.server.protocols.ldap.LDAPFilter; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DereferencePolicy; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.SearchScope; |
| | | import org.opends.server.types.SearchFilter; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * pre-operation plugins for search operations. Note that this |
| | | * interface is intended only to define an API for use by plugins and |
| | | * is not intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PreOperationSearchOperation |
| | | extends PreOperationOperation |
| | | { |
| | | /** |
| | | * Retrieves the raw, unprocessed base DN as included in the request |
| | | * from the client. This may or may not contain a valid DN, as no |
| | | * validation will have been performed. |
| | | * |
| | | * @return The raw, unprocessed base DN as included in the request |
| | | * from the client. |
| | | */ |
| | | public ByteString getRawBaseDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the base DN for this search operation. |
| | | * |
| | | * @return The base DN for this search operation. |
| | | */ |
| | | public DN getBaseDN(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the scope for this search operation. |
| | | * |
| | | * @return The scope for this search operation. |
| | | */ |
| | | public SearchScope getScope(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the alias dereferencing policy for this search |
| | | * operation. |
| | | * |
| | | * @return The alias dereferencing policy for this search |
| | | * operation. |
| | | */ |
| | | public DereferencePolicy getDerefPolicy(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the size limit for this search operation. |
| | | * |
| | | * @return The size limit for this search operation. |
| | | */ |
| | | public int getSizeLimit(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time limit for this search operation. |
| | | * |
| | | * @return The time limit for this search operation. |
| | | */ |
| | | public int getTimeLimit(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the typesOnly flag for this search operation. |
| | | * |
| | | * @return The typesOnly flag for this search operation. |
| | | */ |
| | | public boolean getTypesOnly(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the raw, unprocessed search filter as included in the |
| | | * request from the client. It may or may not contain a valid |
| | | * filter (e.g., unsupported attribute types or values with an |
| | | * invalid syntax) because no validation will have been performed on |
| | | * it. |
| | | * |
| | | * @return The raw, unprocessed search filter as included in the |
| | | * request from the client. |
| | | */ |
| | | public LDAPFilter getRawFilter(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the filter for this search operation. |
| | | * |
| | | * @return The filter for this search operation. |
| | | */ |
| | | public SearchFilter getFilter(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of requested attributes for this search |
| | | * operation. Its contents should not be be altered. |
| | | * |
| | | * @return The set of requested attributes for this search |
| | | * operation. |
| | | */ |
| | | public LinkedHashSet<String> getAttributes(); |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying * information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.types.operation; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines a set of methods that are available for use by |
| | | * pre-parse plugins for abandon operations. Note that this interface |
| | | * is intended only to define an API for use by plugins and is not |
| | | * intended to be implemented by any custom classes. |
| | | */ |
| | | public interface PreParseAbandonOperation |
| | | extends PreParseOperation |
| | | { |
| | | /** |
| | | * Retrieves the message ID of the operation that should be |
| | | * abandoned. |
| | | * |
| | | * @return The message ID of the operation that should be |
| | | * abandoned. |
| | | */ |
| | | public int getIDToAbandon(); |
| | | } |
| | | |
| opends/src/server/org/opends/server/types/operation/PreParseAddOperation.java
opends/src/server/org/opends/server/types/operation/PreParseBindOperation.java
opends/src/server/org/opends/server/types/operation/PreParseCompareOperation.java
opends/src/server/org/opends/server/types/operation/PreParseDeleteOperation.java
opends/src/server/org/opends/server/types/operation/PreParseExtendedOperation.java
opends/src/server/org/opends/server/types/operation/PreParseModifyDNOperation.java
opends/src/server/org/opends/server/types/operation/PreParseModifyOperation.java
opends/src/server/org/opends/server/types/operation/PreParseOperation.java
opends/src/server/org/opends/server/types/operation/PreParseSearchOperation.java
opends/src/server/org/opends/server/types/operation/PreParseUnbindOperation.java
opends/src/server/org/opends/server/types/operation/SearchEntrySearchOperation.java
opends/src/server/org/opends/server/types/operation/SearchReferenceSearchOperation.java
opends/src/server/org/opends/server/types/operation/package-info.java
opends/src/server/org/opends/server/util/LDIFReader.java
opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
opends/tests/unit-tests-testng/src/server/org/opends/server/backends/jeb/TestBackendImpl.java
opends/tests/unit-tests-testng/src/server/org/opends/server/changelog/UpdateComparatorTest.java
opends/tests/unit-tests-testng/src/server/org/opends/server/core/AbandonOperationTestCase.java
opends/tests/unit-tests-testng/src/server/org/opends/server/core/BindOperationTestCase.java
opends/tests/unit-tests-testng/src/server/org/opends/server/core/PasswordPolicyTestCase.java
opends/tests/unit-tests-testng/src/server/org/opends/server/core/TestAbsoluteSubtreeSpecification.java
opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/CRAMMD5SASLMechanismHandlerTestCase.java
opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandlerTestCase.java
opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/ErrorLogAccountStatusNotificationHandlerTestCase.java
opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/ExactMatchIdentityMapperTestCase.java
opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/ExternalSASLMechanismHandlerTestCase.java
opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/FileBasedKeyManagerProviderTestCase.java
opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/FileBasedTrustManagerProviderTestCase.java
opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/LengthBasedPasswordValidatorTestCase.java
opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/PasswordModifyExtendedOperationTestCase.java
opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/PasswordStorageSchemeTestCase.java
opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/RandomPasswordGeneratorTestCase.java
opends/tests/unit-tests-testng/src/server/org/opends/server/plugins/DelayPreOpPlugin.java
opends/tests/unit-tests-testng/src/server/org/opends/server/plugins/DisconnectClientPlugin.java
opends/tests/unit-tests-testng/src/server/org/opends/server/plugins/InvocationCounterPlugin.java
opends/tests/unit-tests-testng/src/server/org/opends/server/plugins/ShortCircuitPlugin.java
opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/internal/InternalClientConnectionTestCase.java
opends/tests/unit-tests-testng/src/server/org/opends/server/schema/EqualityMatchingRuleTest.java
opends/tests/unit-tests-testng/src/server/org/opends/server/schema/OrderingMatchingRuleTest.java
opends/tests/unit-tests-testng/src/server/org/opends/server/synchronization/ServerStateTest.java
opends/tests/unit-tests-testng/src/server/org/opends/server/synchronization/SynchronizationMsgTest.java
opends/tests/unit-tests-testng/src/server/org/opends/server/synchronization/UpdateOperationTest.java
opends/tests/unit-tests-testng/src/server/org/opends/server/tasks/LdifFileWriter.java
opends/tests/unit-tests-testng/src/server/org/opends/server/types/DirectoryExceptionTestCase.java
opends/tests/unit-tests-testng/src/server/org/opends/server/types/InitializationExceptionTestCase.java
opends/tests/unit-tests-testng/src/server/org/opends/server/types/TestDN.java
opends/tests/unit-tests-testng/src/server/org/opends/server/types/TestEntry.java |