-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Registry config javadoc #16015
Merged
aloubyansky
merged 1 commit into
quarkusio:main
from
aloubyansky:registry-config-javadoc
Mar 25, 2021
Merged
Registry config javadoc #16015
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...s/tools/registry-client/src/main/java/io/quarkus/registry/config/RegistryMavenConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
package io.quarkus.registry.config; | ||
|
||
/** | ||
* Registry Maven related configuration the client should use | ||
* to communicate with the registry. | ||
*/ | ||
public interface RegistryMavenConfig { | ||
|
||
/** | ||
* Registry Maven repository configuration. | ||
* | ||
* @return registry Maven repository configuration | ||
*/ | ||
RegistryMavenRepoConfig getRepository(); | ||
} |
13 changes: 13 additions & 0 deletions
13
...ols/registry-client/src/main/java/io/quarkus/registry/config/RegistryMavenRepoConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,21 @@ | ||
package io.quarkus.registry.config; | ||
|
||
/** | ||
* Registry Maven repository configuration. | ||
*/ | ||
public interface RegistryMavenRepoConfig { | ||
|
||
/** | ||
* Default registry Maven repository ID. | ||
* | ||
* @return default registry Maven repository ID | ||
*/ | ||
String getId(); | ||
|
||
/** | ||
* Registry Maven repository URL | ||
* | ||
* @return registry Maven repository URL | ||
*/ | ||
String getUrl(); | ||
} |
3 changes: 3 additions & 0 deletions
3
...-client/src/main/java/io/quarkus/registry/config/RegistryNonPlatformExtensionsConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
package io.quarkus.registry.config; | ||
|
||
/** | ||
* Configuration related to the resolution of catalogs of non-platform extensions. | ||
*/ | ||
public interface RegistryNonPlatformExtensionsConfig extends RegistryArtifactConfig { | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
...ols/registry-client/src/main/java/io/quarkus/registry/config/RegistryPlatformsConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
package io.quarkus.registry.config; | ||
|
||
/** | ||
* Configuration related to the resolution of catalogs of available platforms. | ||
*/ | ||
public interface RegistryPlatformsConfig extends RegistryArtifactConfig { | ||
|
||
/** | ||
* Whether the client should send requests to resolve the platform extension catalogs (platform descriptors) | ||
* to the registry or resolve them from Maven Central directly instead. | ||
* Returning <code>null</code> from this method will be equivalent to returning <code>false</code>, in which case | ||
* the client will not send requests to resolve platform extension catalogs to the registry. | ||
* | ||
* @return true if the registry will be able to handle platform descriptor requests, otherwise - false | ||
*/ | ||
Boolean getExtensionCatalogsIncluded(); | ||
} |
20 changes: 20 additions & 0 deletions
20
...gistry-client/src/main/java/io/quarkus/registry/config/RegistryQuarkusVersionsConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,28 @@ | ||
package io.quarkus.registry.config; | ||
|
||
/** | ||
* A registry may be configured to accept requests only for the Quarkus versions | ||
* it recognizes. This may avoid unnecessary remote registry requests from the client. | ||
*/ | ||
public interface RegistryQuarkusVersionsConfig { | ||
|
||
/** | ||
* An expression that will be evaluated on the client side before sending | ||
* a request to the registry that will indicate whether the registry recognizes | ||
* a given Quarkus version or not. | ||
* | ||
* @return Quarkus version filtering expression or null | ||
*/ | ||
String getRecognizedVersionsExpression(); | ||
|
||
/** | ||
* If the Quarkus version expression is provided, this method may also enforce that | ||
* Quarkus versions matching the provided expressions are expected to be provided | ||
* by this registry exclusively. This may further reduce the amount of the remote requests | ||
* a client will be sending in case multiple registries have been configured. | ||
* | ||
* @return whether the registry is an exclusive provider of the Quarkus versions matching | ||
* the expression configured in {@link getRecognizedVersionsExpression} | ||
*/ | ||
boolean isExclusiveProvider(); | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this method is not returning a primitive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way it is implemented currently, the default config is provided by the registry itself. The client may have a customized version of it (i.e. by selectively overriding some values) in the
config.yaml
. When the registry client is initialized, it is merging the default registry config and the client side version (if it exists). A non-null value from this method would represent a user's choice, which will override the registry's default. Sonull
in this case will mean that the user is willing to accept whatever the registry's default is.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend to put that in the Javadoc, but too late now :)