Skip to content

Commit

Permalink
Update javadocs for paginator style methods (#4828)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidh44 authored Jan 12, 2024
1 parent 4851f0d commit 72edf45
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static class AsyncPaginated extends AsyncOperationDocProvider {
}

@Override
protected String appendToDescription() {
protected String getDescription() {
return paginationDocs.getDocsForAsyncOperation();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,13 @@ abstract class OperationDocProvider {
String getDocs() {
DocumentationBuilder docBuilder = new DocumentationBuilder();

String description = StringUtils.isNotBlank(opModel.getDocumentation()) ?
opModel.getDocumentation() :
getDefaultServiceDocs();

String appendedDescription = appendToDescription();
String description = getDescription();

if (config.isConsumerBuilder()) {
appendedDescription += getConsumerBuilderDocs();
description += "<br/>" + getConsumerBuilderDocs();
}

docBuilder.description(StringUtils.isNotBlank(appendedDescription) ?
description + "<br/>" + appendedDescription :
description);
docBuilder.description(description);

applyParams(docBuilder);
applyReturns(docBuilder);
Expand All @@ -96,10 +90,12 @@ String getDocs() {
}

/**
* @return A string that will be appended to the standard description.
* @return The String description for the operation.
*/
protected String appendToDescription() {
return "";
protected String getDescription() {
return StringUtils.isNotBlank(opModel.getDocumentation()) ?
opModel.getDocumentation() :
getDefaultServiceDocs();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ static class SyncPaginated extends SyncOperationDocProvider {
}

@Override
protected String appendToDescription() {
protected String getDescription() {
return paginationDocs.getDocsForSyncOperation();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,6 @@ default CompletableFuture<PaginatedOperationWithResultKeyResponse> paginatedOper
}

/**
* Some paginated operation with result_key in paginators.json file<br/>
* <p>
* This is a variant of
* {@link #paginatedOperationWithResultKey(software.amazon.awssdk.services.json.model.PaginatedOperationWithResultKeyRequest)}
Expand Down Expand Up @@ -835,7 +834,6 @@ default PaginatedOperationWithResultKeyPublisher paginatedOperationWithResultKey
}

/**
* Some paginated operation with result_key in paginators.json file<br/>
* <p>
* This is a variant of
* {@link #paginatedOperationWithResultKey(software.amazon.awssdk.services.json.model.PaginatedOperationWithResultKeyRequest)}
Expand Down Expand Up @@ -912,7 +910,6 @@ default PaginatedOperationWithResultKeyPublisher paginatedOperationWithResultKey
}

/**
* Some paginated operation with result_key in paginators.json file<br/>
* <p>
* This is a variant of
* {@link #paginatedOperationWithResultKey(software.amazon.awssdk.services.json.model.PaginatedOperationWithResultKeyRequest)}
Expand Down Expand Up @@ -966,6 +963,7 @@ default PaginatedOperationWithResultKeyPublisher paginatedOperationWithResultKey
* {@link #paginatedOperationWithResultKey(software.amazon.awssdk.services.json.model.PaginatedOperationWithResultKeyRequest)}
* operation.</b>
* </p>
* <br/>
* <p>
* This is a convenience which creates an instance of the {@link PaginatedOperationWithResultKeyRequest.Builder}
* avoiding the need to create one manually via {@link PaginatedOperationWithResultKeyRequest#builder()}
Expand Down Expand Up @@ -1055,7 +1053,6 @@ default CompletableFuture<PaginatedOperationWithoutResultKeyResponse> paginatedO
}

/**
* Some paginated operation without result_key in paginators.json file<br/>
* <p>
* This is a variant of
* {@link #paginatedOperationWithoutResultKey(software.amazon.awssdk.services.json.model.PaginatedOperationWithoutResultKeyRequest)}
Expand Down Expand Up @@ -1132,7 +1129,6 @@ default PaginatedOperationWithoutResultKeyPublisher paginatedOperationWithoutRes
}

/**
* Some paginated operation without result_key in paginators.json file<br/>
* <p>
* This is a variant of
* {@link #paginatedOperationWithoutResultKey(software.amazon.awssdk.services.json.model.PaginatedOperationWithoutResultKeyRequest)}
Expand Down Expand Up @@ -1186,6 +1182,7 @@ default PaginatedOperationWithoutResultKeyPublisher paginatedOperationWithoutRes
* {@link #paginatedOperationWithoutResultKey(software.amazon.awssdk.services.json.model.PaginatedOperationWithoutResultKeyRequest)}
* operation.</b>
* </p>
* <br/>
* <p>
* This is a convenience which creates an instance of the {@link PaginatedOperationWithoutResultKeyRequest.Builder}
* avoiding the need to create one manually via {@link PaginatedOperationWithoutResultKeyRequest#builder()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,6 @@ default PaginatedOperationWithResultKeyResponse paginatedOperationWithResultKey(
}

/**
* Some paginated operation with result_key in paginators.json file<br/>
* <p>
* This is a variant of
* {@link #paginatedOperationWithResultKey(software.amazon.awssdk.services.json.model.PaginatedOperationWithResultKeyRequest)}
Expand Down Expand Up @@ -601,7 +600,6 @@ default PaginatedOperationWithResultKeyIterable paginatedOperationWithResultKeyP
}

/**
* Some paginated operation with result_key in paginators.json file<br/>
* <p>
* This is a variant of
* {@link #paginatedOperationWithResultKey(software.amazon.awssdk.services.json.model.PaginatedOperationWithResultKeyRequest)}
Expand Down Expand Up @@ -678,7 +676,6 @@ default PaginatedOperationWithResultKeyIterable paginatedOperationWithResultKeyP
}

/**
* Some paginated operation with result_key in paginators.json file<br/>
* <p>
* This is a variant of
* {@link #paginatedOperationWithResultKey(software.amazon.awssdk.services.json.model.PaginatedOperationWithResultKeyRequest)}
Expand Down Expand Up @@ -734,6 +731,7 @@ default PaginatedOperationWithResultKeyIterable paginatedOperationWithResultKeyP
* {@link #paginatedOperationWithResultKey(software.amazon.awssdk.services.json.model.PaginatedOperationWithResultKeyRequest)}
* operation.</b>
* </p>
* <br/>
* <p>
* This is a convenience which creates an instance of the {@link PaginatedOperationWithResultKeyRequest.Builder}
* avoiding the need to create one manually via {@link PaginatedOperationWithResultKeyRequest#builder()}
Expand Down Expand Up @@ -815,7 +813,6 @@ default PaginatedOperationWithoutResultKeyResponse paginatedOperationWithoutResu
}

/**
* Some paginated operation without result_key in paginators.json file<br/>
* <p>
* This is a variant of
* {@link #paginatedOperationWithoutResultKey(software.amazon.awssdk.services.json.model.PaginatedOperationWithoutResultKeyRequest)}
Expand Down Expand Up @@ -892,7 +889,6 @@ default PaginatedOperationWithoutResultKeyIterable paginatedOperationWithoutResu
}

/**
* Some paginated operation without result_key in paginators.json file<br/>
* <p>
* This is a variant of
* {@link #paginatedOperationWithoutResultKey(software.amazon.awssdk.services.json.model.PaginatedOperationWithoutResultKeyRequest)}
Expand Down Expand Up @@ -948,6 +944,7 @@ default PaginatedOperationWithoutResultKeyIterable paginatedOperationWithoutResu
* {@link #paginatedOperationWithoutResultKey(software.amazon.awssdk.services.json.model.PaginatedOperationWithoutResultKeyRequest)}
* operation.</b>
* </p>
* <br/>
* <p>
* This is a convenience which creates an instance of the {@link PaginatedOperationWithoutResultKeyRequest.Builder}
* avoiding the need to create one manually via {@link PaginatedOperationWithoutResultKeyRequest#builder()}
Expand Down

0 comments on commit 72edf45

Please sign in to comment.