Skip to content

Commit

Permalink
Add a new setApiClassRequired overload
Browse files Browse the repository at this point in the history
  • Loading branch information
wrygiel committed Oct 6, 2016
1 parent eb85a4d commit 27dfe65
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ Release notes
Unreleased
----------

* New `setApiClassRequired(namespaceUri, localName, version)` method in
`ApiSearchConditions` class. This is just a shorthand which allows you to
call `setApiClassRequired(namespaceUri, localName)` and
`setMinVersionRequired(version)` both in one call.

* `ClientImplOptions#getAutoRefreshing()` method has been renamed to
`isAutoRefreshing()`. The previous name is kept, but deprecated.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,31 @@ public ApiSearchConditions setApiClassRequired(String namespaceUri, String local
return this;
}

/**
* Require the API to be of a given class, and to have a <code>version</code> attribute greater or
* equal to the provided one.
*
* <p>
* This method is a shorthand which allows you to call
* {@link #setApiClassRequired(String, String)} and {@link #setMinVersionRequired(String)} both in
* one call.
* </p>
*
* @param namespaceUri Required namespaceURI of the API entry element, or <b>null</b> if no
* requirements should be set.
* @param localName Required localName of the API entry element, or <b>null</b> if no requirements
* should be set.
* @param minVersionRequired as described in {@link #setMinVersionRequired(String)}.
* @return This object.
* @since 1.2.0
*/
public ApiSearchConditions setApiClassRequired(String namespaceUri, String localName,
String minVersionRequired) {
this.setApiClassRequired(namespaceUri, localName);
this.setMinVersionRequired(minVersionRequired);
return this;
}

/**
* Require the API entry to have a <code>version</code> attribute greater or equal to the provided
* one.
Expand Down

0 comments on commit 27dfe65

Please sign in to comment.