Skip to content

optional forestName parameter on DocumentManager.search() #1196

@ehennum

Description

@ehennum

This task requires declaring a new interface method and passing a new parameter down the call path.

The expectation for this parameter arises from a similar search() overload in QueryManager:

https://github.com/marklogic/java-client-api/blob/develop/marklogic-client-api/src/main/java/com/marklogic/client/query/QueryManager.java#L286

The steps of this task:

  1. In the DocumentManager interface, add a new search() overload method that takes all of the existing parameters but with an additional String forestName parameter as the last parameter:

https://github.com/marklogic/java-client-api/blob/develop/marklogic-client-api/src/main/java/com/marklogic/client/document/DocumentManager.java#L675

Provide JavaDoc for this new interface method by copying the JavaDoc for an existing search() overload and adding documentation for the forestName parameter that's equivalent to the documentation of the forestName parameter on the similar QueryManager.search() method.

  1. In the DocumentManagerImpl class, modify the private search() method to take an additional String forestName parameter as the last parameter:

https://github.com/marklogic/java-client-api/blob/develop/marklogic-client-api/src/main/java/com/marklogic/client/impl/DocumentManagerImpl.java#L517

Add the @OverRide implementation of the new search() overload method after the last existing @OverRide search() overload method and before the private search() method, returning the result of a call that passes all parameters through to the private search() method.

Modify all calls from the existing @OverRide search() overload methods to the private search() method to pass a final null value as the forestName parameter.

At current line 541, modify the call to getBulkDocuments() to pass the forestName parameter after the null value:

https://github.com/marklogic/java-client-api/blob/develop/marklogic-client-api/src/main/java/com/marklogic/client/impl/DocumentManagerImpl.java#L541

  1. In the RESTServices interface, modify the getBulkDocuments() interface method to add a String forestName parameter as the last parameter:

https://github.com/marklogic/java-client-api/blob/develop/marklogic-client-api/src/main/java/com/marklogic/client/impl/RESTServices.java#L147

  1. In the OkHttpServices class, modify the @OverRide getBulkDocuments() implementation method to add a String forestName parameter as the last parameter:

https://github.com/marklogic/java-client-api/blob/develop/marklogic-client-api/src/main/java/com/marklogic/client/impl/OkHttpServices.java#L945

At current line 957, modify the call to getBulkDocumentsImpl() to add the forestName parameter as the last parameter:

https://github.com/marklogic/java-client-api/blob/develop/marklogic-client-api/src/main/java/com/marklogic/client/impl/OkHttpServices.java#L957

Modify the getBulkDocumentsImpl() method to add an additional String forestName parameter as the last parameter:

https://github.com/marklogic/java-client-api/blob/develop/marklogic-client-api/src/main/java/com/marklogic/client/impl/OkHttpServices.java#L1065

At current line 1093, replace the final null value with the forestName parameter:

https://github.com/marklogic/java-client-api/blob/develop/marklogic-client-api/src/main/java/com/marklogic/client/impl/OkHttpServices.java#L1093

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions