| | |
| | | */ |
| | | public PluginConfigManager() |
| | | { |
| | | |
| | | pluginLock = new ReentrantLock(); |
| | | |
| | | startupPlugins = new DirectoryServerPlugin[0]; |
| | |
| | | public void initializePluginConfig(Set<PluginType> pluginTypes) |
| | | throws ConfigException, InitializationException |
| | | { |
| | | |
| | | |
| | | registeredPlugins.clear(); |
| | | |
| | | |
| | |
| | | */ |
| | | public ConcurrentHashMap<DN,DirectoryServerPlugin> getRegisteredPlugins() |
| | | { |
| | | |
| | | return registeredPlugins; |
| | | } |
| | | |
| | |
| | | */ |
| | | public DirectoryServerPlugin getRegisteredPlugin(DN pluginDN) |
| | | { |
| | | |
| | | return registeredPlugins.get(pluginDN); |
| | | } |
| | | |
| | |
| | | public boolean configChangeIsAcceptable(ConfigEntry configEntry, |
| | | StringBuilder unacceptableReason) |
| | | { |
| | | |
| | | |
| | | // Make sure that the entry has an appropriate objectclass for a plugin. |
| | | if (! configEntry.hasObjectClass(OC_PLUGIN)) |
| | | { |
| | |
| | | */ |
| | | public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry) |
| | | { |
| | | |
| | | |
| | | DN configEntryDN = configEntry.getDN(); |
| | | ResultCode resultCode = ResultCode.SUCCESS; |
| | | boolean adminActionRequired = false; |
| | |
| | | public boolean configAddIsAcceptable(ConfigEntry configEntry, |
| | | StringBuilder unacceptableReason) |
| | | { |
| | | |
| | | |
| | | // NYI |
| | | return false; |
| | | } |
| | |
| | | */ |
| | | public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry) |
| | | { |
| | | |
| | | |
| | | ResultCode resultCode = ResultCode.SUCCESS; |
| | | boolean adminActionRequired = false; |
| | | ArrayList<String> messages = new ArrayList<String>(); |
| | |
| | | public boolean configDeleteIsAcceptable(ConfigEntry configEntry, |
| | | StringBuilder unacceptableReason) |
| | | { |
| | | |
| | | |
| | | // NYI |
| | | return false; |
| | | } |
| | |
| | | */ |
| | | public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry) |
| | | { |
| | | |
| | | |
| | | ResultCode resultCode = ResultCode.SUCCESS; |
| | | boolean adminActionRequired = false; |
| | | ArrayList<String> messages = new ArrayList<String>(); |
| | |
| | | private void registerPlugin(DirectoryServerPlugin plugin, DN pluginEntryDN, |
| | | HashSet<PluginType> pluginTypes) |
| | | { |
| | | |
| | | pluginLock.lock(); |
| | | |
| | | try |
| | |
| | | private DirectoryServerPlugin[] addPlugin(DirectoryServerPlugin[] pluginArray, |
| | | DirectoryServerPlugin plugin) |
| | | { |
| | | |
| | | DirectoryServerPlugin[] newPlugins = |
| | | new DirectoryServerPlugin[pluginArray.length+1]; |
| | | System.arraycopy(pluginArray, 0, newPlugins, 0, pluginArray.length); |
| | |
| | | */ |
| | | private void deregisterPlugin(DN configEntryDN) |
| | | { |
| | | |
| | | pluginLock.lock(); |
| | | |
| | | try |
| | |
| | | removePlugin(DirectoryServerPlugin[] pluginArray, |
| | | DirectoryServerPlugin plugin) |
| | | { |
| | | |
| | | int slot = -1; |
| | | int length = pluginArray.length; |
| | | for (int i=0; i < length; i++) |
| | |
| | | */ |
| | | public StartupPluginResult invokeStartupPlugins() |
| | | { |
| | | |
| | | |
| | | StartupPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : startupPlugins) |
| | |
| | | */ |
| | | public void invokeShutdownPlugins(String reason) |
| | | { |
| | | |
| | | |
| | | for (DirectoryServerPlugin p : shutdownPlugins) |
| | | { |
| | | try |
| | |
| | | public PostConnectPluginResult invokePostConnectPlugins(ClientConnection |
| | | clientConnection) |
| | | { |
| | | |
| | | |
| | | PostConnectPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : postConnectPlugins) |
| | |
| | | DisconnectReason disconnectReason, |
| | | int messageID, String message) |
| | | { |
| | | |
| | | |
| | | PostDisconnectPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : postDisconnectPlugins) |
| | |
| | | public LDIFPluginResult invokeLDIFImportPlugins(LDIFImportConfig importConfig, |
| | | Entry entry) |
| | | { |
| | | |
| | | LDIFPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : ldifImportPlugins) |
| | |
| | | public LDIFPluginResult invokeLDIFExportPlugins(LDIFExportConfig exportConfig, |
| | | Entry entry) |
| | | { |
| | | |
| | | LDIFPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : ldifExportPlugins) |
| | |
| | | public PreParsePluginResult invokePreParseAbandonPlugins( |
| | | AbandonOperation abandonOperation) |
| | | { |
| | | |
| | | PreParsePluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : preParseAbandonPlugins) |
| | |
| | | public PreParsePluginResult invokePreParseAddPlugins(AddOperation |
| | | addOperation) |
| | | { |
| | | |
| | | PreParsePluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : preParseAddPlugins) |
| | |
| | | public PreParsePluginResult invokePreParseBindPlugins( |
| | | BindOperation bindOperation) |
| | | { |
| | | |
| | | PreParsePluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : preParseBindPlugins) |
| | |
| | | public PreParsePluginResult invokePreParseComparePlugins( |
| | | CompareOperation compareOperation) |
| | | { |
| | | |
| | | PreParsePluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : preParseComparePlugins) |
| | |
| | | public PreParsePluginResult invokePreParseDeletePlugins( |
| | | DeleteOperation deleteOperation) |
| | | { |
| | | |
| | | PreParsePluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : preParseDeletePlugins) |
| | |
| | | public PreParsePluginResult invokePreParseExtendedPlugins( |
| | | ExtendedOperation extendedOperation) |
| | | { |
| | | |
| | | PreParsePluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : preParseExtendedPlugins) |
| | |
| | | public PreParsePluginResult invokePreParseModifyPlugins( |
| | | ModifyOperation modifyOperation) |
| | | { |
| | | |
| | | PreParsePluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : preParseModifyPlugins) |
| | |
| | | public PreParsePluginResult invokePreParseModifyDNPlugins( |
| | | ModifyDNOperation modifyDNOperation) |
| | | { |
| | | |
| | | PreParsePluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : preParseModifyDNPlugins) |
| | |
| | | public PreParsePluginResult invokePreParseSearchPlugins( |
| | | SearchOperation searchOperation) |
| | | { |
| | | |
| | | PreParsePluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : preParseSearchPlugins) |
| | |
| | | public PreParsePluginResult invokePreParseUnbindPlugins( |
| | | UnbindOperation unbindOperation) |
| | | { |
| | | |
| | | PreParsePluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : preParseUnbindPlugins) |
| | |
| | | public PreOperationPluginResult invokePreOperationAddPlugins( |
| | | AddOperation addOperation) |
| | | { |
| | | |
| | | PreOperationPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : preOperationAddPlugins) |
| | |
| | | public PreOperationPluginResult invokePreOperationBindPlugins( |
| | | BindOperation bindOperation) |
| | | { |
| | | |
| | | PreOperationPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : preOperationBindPlugins) |
| | |
| | | public PreOperationPluginResult invokePreOperationComparePlugins( |
| | | CompareOperation compareOperation) |
| | | { |
| | | |
| | | PreOperationPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : preOperationComparePlugins) |
| | |
| | | public PreOperationPluginResult invokePreOperationDeletePlugins( |
| | | DeleteOperation deleteOperation) |
| | | { |
| | | |
| | | PreOperationPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : preOperationDeletePlugins) |
| | |
| | | public PreOperationPluginResult invokePreOperationExtendedPlugins( |
| | | ExtendedOperation extendedOperation) |
| | | { |
| | | |
| | | PreOperationPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : preOperationExtendedPlugins) |
| | |
| | | public PreOperationPluginResult invokePreOperationModifyPlugins( |
| | | ModifyOperation modifyOperation) |
| | | { |
| | | |
| | | PreOperationPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : preOperationModifyPlugins) |
| | |
| | | public PreOperationPluginResult invokePreOperationModifyDNPlugins( |
| | | ModifyDNOperation modifyDNOperation) |
| | | { |
| | | |
| | | PreOperationPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : preOperationModifyDNPlugins) |
| | |
| | | public PreOperationPluginResult invokePreOperationSearchPlugins( |
| | | SearchOperation searchOperation) |
| | | { |
| | | |
| | | PreOperationPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : preOperationSearchPlugins) |
| | |
| | | public PostOperationPluginResult invokePostOperationAbandonPlugins( |
| | | AbandonOperation abandonOperation) |
| | | { |
| | | |
| | | PostOperationPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : postOperationAbandonPlugins) |
| | |
| | | public PostOperationPluginResult invokePostOperationAddPlugins( |
| | | AddOperation addOperation) |
| | | { |
| | | |
| | | PostOperationPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : postOperationAddPlugins) |
| | |
| | | public PostOperationPluginResult invokePostOperationBindPlugins( |
| | | BindOperation bindOperation) |
| | | { |
| | | |
| | | PostOperationPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : postOperationBindPlugins) |
| | |
| | | public PostOperationPluginResult invokePostOperationComparePlugins( |
| | | CompareOperation compareOperation) |
| | | { |
| | | |
| | | PostOperationPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : postOperationComparePlugins) |
| | |
| | | public PostOperationPluginResult invokePostOperationDeletePlugins( |
| | | DeleteOperation deleteOperation) |
| | | { |
| | | |
| | | PostOperationPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : postOperationDeletePlugins) |
| | |
| | | public PostOperationPluginResult invokePostOperationExtendedPlugins( |
| | | ExtendedOperation extendedOperation) |
| | | { |
| | | |
| | | PostOperationPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : postOperationExtendedPlugins) |
| | |
| | | public PostOperationPluginResult invokePostOperationModifyPlugins( |
| | | ModifyOperation modifyOperation) |
| | | { |
| | | |
| | | PostOperationPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : postOperationModifyPlugins) |
| | |
| | | public PostOperationPluginResult invokePostOperationModifyDNPlugins( |
| | | ModifyDNOperation modifyDNOperation) |
| | | { |
| | | |
| | | PostOperationPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : postOperationModifyDNPlugins) |
| | |
| | | public PostOperationPluginResult invokePostOperationSearchPlugins( |
| | | SearchOperation searchOperation) |
| | | { |
| | | |
| | | PostOperationPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : postOperationSearchPlugins) |
| | |
| | | public PostOperationPluginResult invokePostOperationUnbindPlugins( |
| | | UnbindOperation unbindOperation) |
| | | { |
| | | |
| | | PostOperationPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : postOperationUnbindPlugins) |
| | |
| | | public PostResponsePluginResult invokePostResponseAddPlugins( |
| | | AddOperation addOperation) |
| | | { |
| | | |
| | | PostResponsePluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : postResponseAddPlugins) |
| | |
| | | public PostResponsePluginResult invokePostResponseBindPlugins( |
| | | BindOperation bindOperation) |
| | | { |
| | | |
| | | PostResponsePluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : postResponseBindPlugins) |
| | |
| | | public PostResponsePluginResult invokePostResponseComparePlugins( |
| | | CompareOperation compareOperation) |
| | | { |
| | | |
| | | PostResponsePluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : postResponseComparePlugins) |
| | |
| | | public PostResponsePluginResult invokePostResponseDeletePlugins( |
| | | DeleteOperation deleteOperation) |
| | | { |
| | | |
| | | PostResponsePluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : postResponseDeletePlugins) |
| | |
| | | public PostResponsePluginResult invokePostResponseExtendedPlugins( |
| | | ExtendedOperation extendedOperation) |
| | | { |
| | | |
| | | PostResponsePluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : postResponseExtendedPlugins) |
| | |
| | | public PostResponsePluginResult invokePostResponseModifyPlugins( |
| | | ModifyOperation modifyOperation) |
| | | { |
| | | |
| | | PostResponsePluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : postResponseModifyPlugins) |
| | |
| | | public PostResponsePluginResult invokePostResponseModifyDNPlugins( |
| | | ModifyDNOperation modifyDNOperation) |
| | | { |
| | | |
| | | PostResponsePluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : postResponseModifyDNPlugins) |
| | |
| | | public PostResponsePluginResult invokePostResponseSearchPlugins( |
| | | SearchOperation searchOperation) |
| | | { |
| | | |
| | | PostResponsePluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : postResponseSearchPlugins) |
| | |
| | | SearchOperation searchOperation, |
| | | SearchResultEntry searchEntry) |
| | | { |
| | | |
| | | SearchEntryPluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : searchResultEntryPlugins) |
| | |
| | | SearchOperation searchOperation, |
| | | SearchResultReference searchReference) |
| | | { |
| | | |
| | | SearchReferencePluginResult result = null; |
| | | |
| | | for (DirectoryServerPlugin p : searchResultReferencePlugins) |
| | |
| | | invokeIntermediateResponsePlugins( |
| | | IntermediateResponse intermediateResponse) |
| | | { |
| | | |
| | | IntermediateResponsePluginResult result = null; |
| | | Operation operation = intermediateResponse.getOperation(); |
| | | |