Skip to content

Commit 684396f

Browse files
committed
work on #366 - fix all complaints from the Java 8 linter so we can build javadocs with no warnings
(cherry picked from commit 00bb9af)
1 parent e5e1fdc commit 684396f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+446
-94
lines changed

src/main/java/com/marklogic/client/DatabaseClient.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,14 @@ public interface DatabaseClient {
119119
*/
120120
public ServerConfigurationManager newServerConfigManager();
121121

122-
/** Creates a manager for CRUD operations on semantic graphs. */
122+
/** Creates a manager for CRUD operations on semantic graphs.
123+
* @return the new GraphManager instance
124+
*/
123125
public GraphManager newGraphManager();
124126

125-
/** Creates a manager for executing SPARQL queries and retrieving results. */
127+
/** Creates a manager for executing SPARQL queries and retrieving results.
128+
* @return the new SPARQLQueryManager instance
129+
*/
126130
public SPARQLQueryManager newSPARQLQueryManager();
127131

128132
/**
@@ -134,6 +138,8 @@ public interface DatabaseClient {
134138
* @param clazz the class type for this PojoRepository to handle
135139
* @param idClass the class type of the id field for this clazz, must obviously
136140
* be Serializable or we'll struggle to marshall it
141+
* @param <T> the pojo type this PojoRepository will manage
142+
* @param <ID> the scalar type of the id for pojos of type &lt;T&gt;
137143
* @return the initialized PojoRepository
138144
**/
139145
public <T, ID extends Serializable> PojoRepository<T, ID> newPojoRepository(Class<T> clazz, Class<ID> idClass);
@@ -143,6 +149,7 @@ public interface DatabaseClient {
143149
*
144150
* @param resourceName the name of the extension resource
145151
* @param resourceManager the manager for the extension resource
152+
* @param <T> the type of ResourceManager to init for the extension resource
146153
* @return the initialized resource manager
147154
*/
148155
public <T extends ResourceManager> T init(String resourceName, T resourceManager);
@@ -186,6 +193,7 @@ public interface DatabaseClient {
186193
* xdbc:invoke privilege. If this DatabaseClient is pointed at a database different
187194
* than the default for this REST server, you will need the xdbc:eval-in or xdbc:invoke-in
188195
* privilege.
196+
* @return the new ServerEvaluationCall instance
189197
*/
190198
public ServerEvaluationCall newServerEval();
191199

src/main/java/com/marklogic/client/DatabaseClientFactory.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ public interface SSLHostnameVerifier {
9595
* @param hostname the name of the checked host
9696
* @param cns common names for the checked host
9797
* @param subjectAlts alternative subject names for the checked host
98+
* @throws SSLException if the hostname isn't acceptable
9899
*/
99100
public void verify(String hostname, String[] cns, String[] subjectAlts) throws SSLException;
100101

@@ -165,6 +166,7 @@ public interface HandleFactoryRegistry {
165166
* Creates a ContentHandle if the registry has a factory
166167
* for the class of the IO representation.
167168
* @param type the class for an IO representation
169+
* @param <C> the registered type for the returned handle
168170
* @return a content handle or null if no factory supports the class
169171
*/
170172
public <C> ContentHandle<C> makeHandle(Class<C> type);

src/main/java/com/marklogic/client/MarkLogicServerException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ public abstract class MarkLogicServerException extends RuntimeException {
3333
private FailedRequest failedRequest;
3434

3535
/**
36-
* @param localMessage
37-
* @param failedRequest
36+
* @param localMessage message describing the exception
37+
* @param failedRequest details about the failed request behind this exception
3838
*/
3939
public MarkLogicServerException(String localMessage, FailedRequest failedRequest) {
4040
super(localMessage);

src/main/java/com/marklogic/client/Transaction.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public interface Transaction {
5555
* Reads the status for the transaction including whether the transaction
5656
* has timed out.
5757
* @param handle a JSON or XML handle on the content of the status report
58+
* @param <T> the type of StructureReadHandle handle to return
5859
* @return the status report handle
5960
*/
6061
public <T extends StructureReadHandle> T readStatus(T handle) throws ForbiddenUserException, FailedRequestException;

src/main/java/com/marklogic/client/admin/ExtensionLibrariesManager.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public ExtensionLibraryDescriptor[] list(String directory)
5151
*
5252
* @param libraryPath the path to the library
5353
* @param as the IO class for reading the library asset
54+
* @param <T> the type of object that will be returned by the handle registered for it
5455
* @return an object of the IO class with the library asset
5556
*/
5657
public <T> T readAs(String libraryPath, Class<T> as)
@@ -63,6 +64,7 @@ public <T> T readAs(String libraryPath, Class<T> as)
6364
*
6465
* @param libraryDescriptor a descriptor that locates the library
6566
* @param as the IO class for reading the library asset
67+
* @param <T> the type of AbstractReadHandle to return
6668
* @return an object of the IO class with the library asset
6769
*/
6870
public <T> T read(ExtensionLibraryDescriptor libraryDescriptor, Class<T> as)
@@ -72,6 +74,7 @@ public <T> T read(ExtensionLibraryDescriptor libraryDescriptor, Class<T> as)
7274
* Reads the contents of a library asset into a handle.
7375
* @param libraryPath the path to the library
7476
* @param readHandle a handle for reading the contents of the file
77+
* @param <T> the type of AbstractReadHandle to return
7578
* @return the handle for the library asset
7679
*/
7780
public <T extends AbstractReadHandle> T read(String libraryPath, T readHandle)
@@ -80,6 +83,7 @@ public <T extends AbstractReadHandle> T read(String libraryPath, T readHandle)
8083
* Reads the contents of a library asset into a handle.
8184
* @param libraryDescriptor a descriptor that locates the library.
8285
* @param readHandle A handle for reading the contents of the file.
86+
* @param <T> the type of AbstractReadHandle to return
8387
* @return The handle.
8488
*/
8589
public <T extends AbstractReadHandle> T read(ExtensionLibraryDescriptor libraryDescriptor, T readHandle)

src/main/java/com/marklogic/client/admin/ExtensionLibraryDescriptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public String getCapability() {
5757
}
5858
/**
5959
* sets the capability for this permission
60-
* @param capability
60+
* @param capability the capability for this permission
6161
*/
6262
public void setCapability(String capability) {
6363
this.capability = capability;

src/main/java/com/marklogic/client/admin/ExtensionMetadata.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ public void setVersion(String version) {
113113
/**
114114
* Returns the script language for this resource extension, either XQUERY (default)
115115
* or JAVASCRIPT.
116+
* @return the script language for this resource extension
116117
*/
117118
public ScriptLanguage getScriptLanguage() {
118119
return scriptLanguage;
@@ -121,6 +122,7 @@ public ScriptLanguage getScriptLanguage() {
121122
/**
122123
* Specifies the script language for this resource extension, either XQUERY (default)
123124
* or JAVASCRIPT.
125+
* @param scriptLanguage the script language for this resource extension
124126
*/
125127
public void setScriptLanguage(ScriptLanguage scriptLanguage) {
126128
this.scriptLanguage = scriptLanguage;

src/main/java/com/marklogic/client/admin/QueryOptionsManager.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public interface QueryOptionsManager {
3838
*
3939
* @param format whether to provide the list in a JSON or XML representation
4040
* @param as the IO class for reading the list of options
41+
* @param <T> the type of object that will be returned by the handle registered for it
4142
* @return an object of the IO class with the option names
4243
*/
4344
public <T> T optionsListAs(Format format, Class<T> as)
@@ -50,6 +51,7 @@ public <T> T optionsListAs(Format format, Class<T> as)
5051
* By default, standard Java IO classes for document content are registered.
5152
*
5253
* @param listHandle a handle for reading the list of name options
54+
* @param the type of QueryOptionsListReadHandle to return
5355
* @return the handle populated with the names
5456
*/
5557
public <T extends QueryOptionsListReadHandle> T optionsList(T listHandle)
@@ -61,6 +63,7 @@ public <T extends QueryOptionsListReadHandle> T optionsList(T listHandle)
6163
* @param name the name of options configuration stored on MarkLogic REST instance.
6264
* @param format whether to provide the options in a JSON or XML representation
6365
* @param as the IO class for reading the query options
66+
* @param <T> the type of object that will be returned by the handle registered for it
6467
* @return an object of the IO class with the query options
6568
*/
6669
public <T> T readOptionsAs(String name, Format format, Class<T> as)
@@ -72,7 +75,7 @@ public <T> T readOptionsAs(String name, Format format, Class<T> as)
7275
*
7376
* @param name the name of options configuration stored on MarkLogic REST instance.
7477
* @param queryOptionsHandle an object into which to fetch the query options.
75-
* @param <T> a set of classes able to read query configurations from the database.
78+
* @param the type of QueryOptionsListReadHandle to return
7679
* @return an object holding the query configurations
7780
*/
7881
public <T extends QueryOptionsReadHandle> T readOptions(String name, T queryOptionsHandle)

src/main/java/com/marklogic/client/admin/ResourceExtensionsManager.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public interface ResourceExtensionsManager {
3939
*
4040
* @param format whether to provide the list in a JSON or XML representation
4141
* @param as the IO class for reading the list of resource service extensions
42+
* @param <T> the type of object that will be returned by the handle registered for it
4243
* @return an object of the IO class with the list of resource service extensions
4344
*/
4445
public <T> T listServicesAs(Format format, Class<T> as);
@@ -52,12 +53,14 @@ public interface ResourceExtensionsManager {
5253
* @param format whether to provide the list in a JSON or XML representation
5354
* @param as the IO class for reading the list of resource service extensions
5455
* @param refresh whether to parse metadata from the extension source
56+
* @param <T> the type of object that will be returned by the handle registered for it
5557
* @return an object of the IO class with the list of resource service extensions
5658
*/
5759
public <T> T listServicesAs(Format format, Class<T> as, boolean refresh);
5860
/**
5961
* Reads the list of resource service extensions installed on the server.
6062
* @param listHandle a handle on a JSON or XML representation of the list
63+
* @param <T> the type of StructureReadHandle to return
6164
* @return the list handle
6265
*/
6366
public <T extends StructureReadHandle> T listServices(T listHandle);
@@ -67,6 +70,7 @@ public interface ResourceExtensionsManager {
6770
* the extension source.
6871
* @param listHandle a handle on a JSON or XML representation of the list
6972
* @param refresh whether to parse metadata from the extension source
73+
* @param <T> the type of StructureReadHandle to return
7074
* @return the list handle
7175
*/
7276
public <T extends StructureReadHandle> T listServices(T listHandle, boolean refresh);
@@ -80,6 +84,7 @@ public interface ResourceExtensionsManager {
8084
*
8185
* @param resourceName the name of the resource
8286
* @param as the IO class for reading the source code as text
87+
* @param <T> the type of object that will be returned by the handle registered for it
8388
* @return an object of the IO class with the source code for the service
8489
*/
8590
public <T> T readServicesAs(String resourceName, Class<T> as);
@@ -88,6 +93,7 @@ public interface ResourceExtensionsManager {
8893
* Reads the XQuery implementation of the services for a resource.
8994
* @param resourceName the name of the resource
9095
* @param sourceHandle a handle for reading the text of the XQuery implementation.
96+
* @param <T> the type of TextReadHandle to return
9197
* @return the XQuery source code
9298
*/
9399
public <T extends TextReadHandle> T readServices(String resourceName, T sourceHandle);

src/main/java/com/marklogic/client/admin/TransformExtensionsManager.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public interface TransformExtensionsManager {
4747
*
4848
* @param format whether to provide the list in a JSON or XML representation
4949
* @param as the IO class for reading the list of transform extensions
50+
* @param <T> the type of object that will be returned by the handle registered for it
5051
* @return an object of the IO class with the list of transform extensions
5152
*/
5253
public <T> T listTransformsAs(Format format, Class<T> as);
@@ -60,6 +61,7 @@ public interface TransformExtensionsManager {
6061
* @param format whether to provide the list in a JSON or XML representation
6162
* @param as the IO class for reading the list of transform extensions
6263
* @param refresh whether to parse metadata from the extension source
64+
* @param <T> the type of object that will be returned by the handle registered for it
6365
* @return an object of the IO class with the list of transform extensions
6466
*/
6567
public <T> T listTransformsAs(Format format, Class<T> as, boolean refresh);
@@ -76,6 +78,7 @@ public <T extends StructureReadHandle> T listTransforms(T listHandle)
7678
* the metadata about each extension by parsing the extension source.
7779
* @param listHandle a handle on a JSON or XML representation of the list
7880
* @param refresh whether to parse metadata from the extension source
81+
* @param <T> the type of StructureReadHandle to return
7982
* @return the list handle
8083
*/
8184
public <T extends StructureReadHandle> T listTransforms(T listHandle, boolean refresh)
@@ -90,6 +93,7 @@ public <T extends StructureReadHandle> T listTransforms(T listHandle, boolean re
9093
*
9194
* @param transformName the name of the transform
9295
* @param as the IO class for reading the source code as XML
96+
* @param <T> the type of object that will be returned by the handle registered for it
9397
* @return an object of the IO class with the XSLT source code
9498
*/
9599
public <T> T readXSLTransformAs(String transformName, Class<T> as)
@@ -99,6 +103,7 @@ public <T> T readXSLTransformAs(String transformName, Class<T> as)
99103
* Reads the source for a transform implemented in XSLT.
100104
* @param transformName the name of the transform
101105
* @param sourceHandle a handle for reading the text of the XSLT implementation.
106+
* @param <T> the type of XMLReadHandle to return
102107
* @return the XSLT source code
103108
*/
104109
public <T extends XMLReadHandle> T readXSLTransform(String transformName, T sourceHandle)
@@ -113,6 +118,7 @@ public <T extends XMLReadHandle> T readXSLTransform(String transformName, T sour
113118
*
114119
* @param transformName the name of the transform
115120
* @param as the IO class for reading the source code as text
121+
* @param <T> the type of object that will be returned by the handle registered for it
116122
* @return an object of the IO class with the XQuery source code
117123
*/
118124
public <T> T readXQueryTransformAs(String transformName, Class<T> as)
@@ -122,6 +128,7 @@ public <T> T readXQueryTransformAs(String transformName, Class<T> as)
122128
* Reads the source for a transform implemented in XQuery.
123129
* @param transformName the name of the transform
124130
* @param sourceHandle a handle for reading the text of the XQuery implementation.
131+
* @param <T> the type of TextReadHandle to return
125132
* @return the XQuery source code
126133
*/
127134
public <T extends TextReadHandle> T readXQueryTransform(String transformName, T sourceHandle)
@@ -136,6 +143,7 @@ public <T extends TextReadHandle> T readXQueryTransform(String transformName, T
136143
*
137144
* @param transformName the name of the transform
138145
* @param as the IO class for reading the source code as text
146+
* @param <T> the type of object that will be returned by the handle registered for it
139147
* @return an object of the IO class with the Javascript source code
140148
*/
141149
public <T> T readJavascriptTransformAs(String transformName, Class<T> as)
@@ -145,6 +153,7 @@ public <T> T readJavascriptTransformAs(String transformName, Class<T> as)
145153
* Reads the source for a transform implemented in Javascript.
146154
* @param transformName the name of the transform
147155
* @param sourceHandle a handle for reading the text of the Javascript implementation.
156+
* @param <T> the type of TextReadHandle to return
148157
* @return the Javascript source code
149158
*/
150159
public <T extends TextReadHandle> T readJavascriptTransform(String transformName, T sourceHandle)

0 commit comments

Comments
 (0)