| | |
| | | |
| | | import org.opends.server.admin.std.server.PluginCfg; |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.api.plugin.DirectoryServerPlugin; |
| | | import org.opends.server.api.plugin.PluginType; |
| | | import org.opends.server.api.plugin.IntermediateResponsePluginResult; |
| | | import org.opends.server.api.plugin.LDIFPluginResult; |
| | | import org.opends.server.api.plugin.PostConnectPluginResult; |
| | | import org.opends.server.api.plugin.PostDisconnectPluginResult; |
| | | import org.opends.server.api.plugin.PostOperationPluginResult; |
| | | import org.opends.server.api.plugin.PostResponsePluginResult; |
| | | import org.opends.server.api.plugin.PreOperationPluginResult; |
| | | import org.opends.server.api.plugin.PreParsePluginResult; |
| | | import org.opends.server.api.plugin.SearchEntryPluginResult; |
| | | import org.opends.server.api.plugin.SearchReferencePluginResult; |
| | | import org.opends.server.api.plugin.StartupPluginResult; |
| | | import org.opends.server.api.plugin.SubordinateModifyDNPluginResult; |
| | | import org.opends.server.api.plugin.*; |
| | | import org.opends.server.types.DisconnectReason; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.IntermediateResponse; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PreParsePluginResult |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseAbandonOperation abandonOperation) |
| | | { |
| | | preParseCounter.incrementAndGet(); |
| | | return PreParsePluginResult.SUCCESS; |
| | | return PluginResult.PreParse.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PreParsePluginResult doPreParse(PreParseAddOperation addOperation) |
| | | public PluginResult.PreParse doPreParse(PreParseAddOperation addOperation) |
| | | { |
| | | preParseCounter.incrementAndGet(); |
| | | return PreParsePluginResult.SUCCESS; |
| | | return PluginResult.PreParse.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PreParsePluginResult doPreParse(PreParseBindOperation bindOperation) |
| | | public PluginResult.PreParse doPreParse(PreParseBindOperation bindOperation) |
| | | { |
| | | preParseCounter.incrementAndGet(); |
| | | return PreParsePluginResult.SUCCESS; |
| | | return PluginResult.PreParse.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PreParsePluginResult |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseCompareOperation compareOperation) |
| | | { |
| | | preParseCounter.incrementAndGet(); |
| | | return PreParsePluginResult.SUCCESS; |
| | | return PluginResult.PreParse.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PreParsePluginResult |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseDeleteOperation deleteOperation) |
| | | { |
| | | preParseCounter.incrementAndGet(); |
| | | return PreParsePluginResult.SUCCESS; |
| | | return PluginResult.PreParse.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PreParsePluginResult |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseExtendedOperation extendedOperation) |
| | | { |
| | | preParseCounter.incrementAndGet(); |
| | | return PreParsePluginResult.SUCCESS; |
| | | return PluginResult.PreParse.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PreParsePluginResult |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseModifyOperation modifyOperation) |
| | | { |
| | | preParseCounter.incrementAndGet(); |
| | | return PreParsePluginResult.SUCCESS; |
| | | return PluginResult.PreParse.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PreParsePluginResult |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseModifyDNOperation modifyDNOperation) |
| | | { |
| | | preParseCounter.incrementAndGet(); |
| | | return PreParsePluginResult.SUCCESS; |
| | | return PluginResult.PreParse.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PreParsePluginResult |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseSearchOperation searchOperation) |
| | | { |
| | | preParseCounter.incrementAndGet(); |
| | | return PreParsePluginResult.SUCCESS; |
| | | return PluginResult.PreParse.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PreParsePluginResult |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseUnbindOperation unbindOperation) |
| | | { |
| | | preParseCounter.incrementAndGet(); |
| | | return PreParsePluginResult.SUCCESS; |
| | | return PluginResult.PreParse.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PreOperationPluginResult |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationAddOperation addOperation) |
| | | { |
| | | preOperationCounter.incrementAndGet(); |
| | | return PreOperationPluginResult.SUCCESS; |
| | | return PluginResult.PreOperation.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PreOperationPluginResult |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationBindOperation bindOperation) |
| | | { |
| | | preOperationCounter.incrementAndGet(); |
| | | return PreOperationPluginResult.SUCCESS; |
| | | return PluginResult.PreOperation.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PreOperationPluginResult |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationCompareOperation compareOperation) |
| | | { |
| | | preOperationCounter.incrementAndGet(); |
| | | return PreOperationPluginResult.SUCCESS; |
| | | return PluginResult.PreOperation.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PreOperationPluginResult |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationDeleteOperation deleteOperation) |
| | | { |
| | | preOperationCounter.incrementAndGet(); |
| | | return PreOperationPluginResult.SUCCESS; |
| | | return PluginResult.PreOperation.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PreOperationPluginResult |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationExtendedOperation extendedOperation) |
| | | { |
| | | preOperationCounter.incrementAndGet(); |
| | | return PreOperationPluginResult.SUCCESS; |
| | | return PluginResult.PreOperation.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PreOperationPluginResult |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationModifyOperation modifyOperation) |
| | | { |
| | | preOperationCounter.incrementAndGet(); |
| | | return PreOperationPluginResult.SUCCESS; |
| | | return PluginResult.PreOperation.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PreOperationPluginResult |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationModifyDNOperation modifyDNOperation) |
| | | { |
| | | preOperationCounter.incrementAndGet(); |
| | | return PreOperationPluginResult.SUCCESS; |
| | | return PluginResult.PreOperation.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PreOperationPluginResult |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationSearchOperation searchOperation) |
| | | { |
| | | preOperationCounter.incrementAndGet(); |
| | | return PreOperationPluginResult.SUCCESS; |
| | | return PluginResult.PreOperation.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PostOperationPluginResult |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationAbandonOperation abandonOperation) |
| | | { |
| | | postOperationCounter.incrementAndGet(); |
| | | return PostOperationPluginResult.SUCCESS; |
| | | return PluginResult.PostOperation.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PostOperationPluginResult |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationAddOperation addOperation) |
| | | { |
| | | postOperationCounter.incrementAndGet(); |
| | | return PostOperationPluginResult.SUCCESS; |
| | | return PluginResult.PostOperation.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PostOperationPluginResult |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationBindOperation bindOperation) |
| | | { |
| | | postOperationCounter.incrementAndGet(); |
| | | return PostOperationPluginResult.SUCCESS; |
| | | return PluginResult.PostOperation.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PostOperationPluginResult |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationCompareOperation compareOperation) |
| | | { |
| | | postOperationCounter.incrementAndGet(); |
| | | return PostOperationPluginResult.SUCCESS; |
| | | return PluginResult.PostOperation.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PostOperationPluginResult |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationDeleteOperation deleteOperation) |
| | | { |
| | | postOperationCounter.incrementAndGet(); |
| | | return PostOperationPluginResult.SUCCESS; |
| | | return PluginResult.PostOperation.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PostOperationPluginResult |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationExtendedOperation extendedOperation) |
| | | { |
| | | postOperationCounter.incrementAndGet(); |
| | | return PostOperationPluginResult.SUCCESS; |
| | | return PluginResult.PostOperation.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PostOperationPluginResult |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationModifyOperation modifyOperation) |
| | | { |
| | | postOperationCounter.incrementAndGet(); |
| | | return PostOperationPluginResult.SUCCESS; |
| | | return PluginResult.PostOperation.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PostOperationPluginResult |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationModifyDNOperation modifyDNOperation) |
| | | { |
| | | postOperationCounter.incrementAndGet(); |
| | | return PostOperationPluginResult.SUCCESS; |
| | | return PluginResult.PostOperation.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PostOperationPluginResult |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationSearchOperation searchOperation) |
| | | { |
| | | postOperationCounter.incrementAndGet(); |
| | | return PostOperationPluginResult.SUCCESS; |
| | | return PluginResult.PostOperation.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PostOperationPluginResult |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationUnbindOperation unbindOperation) |
| | | { |
| | | postOperationCounter.incrementAndGet(); |
| | | return PostOperationPluginResult.SUCCESS; |
| | | return PluginResult.PostOperation.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PostResponsePluginResult |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseAddOperation addOperation) |
| | | { |
| | | postResponseCounter.incrementAndGet(); |
| | | return PostResponsePluginResult.SUCCESS; |
| | | return PluginResult.PostResponse.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PostResponsePluginResult |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseBindOperation bindOperation) |
| | | { |
| | | postResponseCounter.incrementAndGet(); |
| | | return PostResponsePluginResult.SUCCESS; |
| | | return PluginResult.PostResponse.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PostResponsePluginResult |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseCompareOperation compareOperation) |
| | | { |
| | | postResponseCounter.incrementAndGet(); |
| | | return PostResponsePluginResult.SUCCESS; |
| | | return PluginResult.PostResponse.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PostResponsePluginResult |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseDeleteOperation deleteOperation) |
| | | { |
| | | postResponseCounter.incrementAndGet(); |
| | | return PostResponsePluginResult.SUCCESS; |
| | | return PluginResult.PostResponse.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PostResponsePluginResult |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseExtendedOperation extendedOperation) |
| | | { |
| | | postResponseCounter.incrementAndGet(); |
| | | return PostResponsePluginResult.SUCCESS; |
| | | return PluginResult.PostResponse.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PostResponsePluginResult |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseModifyOperation modifyOperation) |
| | | { |
| | | postResponseCounter.incrementAndGet(); |
| | | return PostResponsePluginResult.SUCCESS; |
| | | return PluginResult.PostResponse.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PostResponsePluginResult |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseModifyDNOperation modifyDNOperation) |
| | | { |
| | | postResponseCounter.incrementAndGet(); |
| | | return PostResponsePluginResult.SUCCESS; |
| | | return PluginResult.PostResponse.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PostResponsePluginResult |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseSearchOperation searchOperation) |
| | | { |
| | | postResponseCounter.incrementAndGet(); |
| | | return PostResponsePluginResult.SUCCESS; |
| | | return PluginResult.PostResponse.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public SearchEntryPluginResult |
| | | public PluginResult.IntermediateResponse |
| | | processSearchEntry(SearchEntrySearchOperation searchOperation, |
| | | SearchResultEntry searchEntry) |
| | | { |
| | | searchEntryCounter.incrementAndGet(); |
| | | return SearchEntryPluginResult.SUCCESS; |
| | | return PluginResult.IntermediateResponse.continueOperationProcessing(true); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public SearchReferencePluginResult |
| | | public PluginResult.IntermediateResponse |
| | | processSearchReference(SearchReferenceSearchOperation searchOperation, |
| | | SearchResultReference searchReference) |
| | | { |
| | | searchReferenceCounter.incrementAndGet(); |
| | | return SearchReferencePluginResult.SUCCESS; |
| | | return PluginResult.IntermediateResponse.continueOperationProcessing(true); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public SubordinateModifyDNPluginResult processSubordinateModifyDN( |
| | | public PluginResult.SubordinateModifyDN processSubordinateModifyDN( |
| | | SubordinateModifyDNOperation modifyDNOperation, Entry oldEntry, |
| | | Entry newEntry, List<Modification> modifications) |
| | | { |
| | | subordinateModifyDNCounter.incrementAndGet(); |
| | | return SubordinateModifyDNPluginResult.SUCCESS; |
| | | return PluginResult.SubordinateModifyDN.continueOperationProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public IntermediateResponsePluginResult processIntermediateResponse( |
| | | public PluginResult.IntermediateResponse processIntermediateResponse( |
| | | IntermediateResponse intermediateResponse) |
| | | { |
| | | intermediateResponseCounter.incrementAndGet(); |
| | | return IntermediateResponsePluginResult.SUCCESS; |
| | | return PluginResult.IntermediateResponse.continueOperationProcessing(true); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PostConnectPluginResult doPostConnect(ClientConnection |
| | | public PluginResult.PostConnect doPostConnect(ClientConnection |
| | | clientConnection) |
| | | { |
| | | postConnectCounter.incrementAndGet(); |
| | | return PostConnectPluginResult.SUCCESS; |
| | | return PluginResult.PostConnect.continueConnectProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public PostDisconnectPluginResult doPostDisconnect( |
| | | public PluginResult.PostDisconnect doPostDisconnect( |
| | | ClientConnection clientConnection, DisconnectReason disconnectReason, |
| | | Message message) |
| | | { |
| | | postDisconnectCounter.incrementAndGet(); |
| | | return PostDisconnectPluginResult.SUCCESS; |
| | | return PluginResult.PostDisconnect.continueDisconnectProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public LDIFPluginResult doLDIFImport(LDIFImportConfig importConfig, |
| | | Entry entry) |
| | | public PluginResult.ImportLDIF doLDIFImport(LDIFImportConfig importConfig, |
| | | Entry entry) |
| | | { |
| | | ldifImportCounter.incrementAndGet(); |
| | | return LDIFPluginResult.SUCCESS; |
| | | return PluginResult.ImportLDIF.continueEntryProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public LDIFPluginResult doLDIFExport(LDIFExportConfig exportConfig, |
| | | public PluginResult.ImportLDIF doLDIFExport(LDIFExportConfig exportConfig, |
| | | Entry entry) |
| | | { |
| | | ldifExportCounter.incrementAndGet(); |
| | | return LDIFPluginResult.SUCCESS; |
| | | return PluginResult.ImportLDIF.continueEntryProcessing(); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public StartupPluginResult doStartup() |
| | | public PluginResult.Startup doStartup() |
| | | { |
| | | startupCalled = true; |
| | | return StartupPluginResult.SUCCESS; |
| | | return PluginResult.Startup.continueStartup(); |
| | | } |
| | | |
| | | |