-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42378 from gsmet/reorganize-search-management-config
Reorganize Hibernate Search management config
- Loading branch information
Showing
10 changed files
with
34 additions
and
36 deletions.
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
9 changes: 2 additions & 7 deletions
9
...arkus/hibernate/search/orm/elasticsearch/deployment/HibernateSearchManagementEnabled.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,25 +1,20 @@ | ||
package io.quarkus.hibernate.search.orm.elasticsearch.deployment; | ||
|
||
import io.quarkus.hibernate.search.orm.elasticsearch.runtime.HibernateSearchElasticsearchBuildTimeConfig; | ||
import io.quarkus.hibernate.search.orm.elasticsearch.runtime.management.HibernateSearchManagementConfig; | ||
|
||
/** | ||
* Supplier that can be used to only run build steps | ||
* if the Hibernate Search extension and its management is enabled. | ||
*/ | ||
public class HibernateSearchManagementEnabled extends HibernateSearchEnabled { | ||
|
||
private final HibernateSearchManagementConfig config; | ||
|
||
HibernateSearchManagementEnabled(HibernateSearchElasticsearchBuildTimeConfig config, | ||
HibernateSearchManagementConfig managementConfig) { | ||
HibernateSearchManagementEnabled(HibernateSearchElasticsearchBuildTimeConfig config) { | ||
super(config); | ||
this.config = managementConfig; | ||
} | ||
|
||
@Override | ||
public boolean getAsBoolean() { | ||
return super.getAsBoolean() && config.enabled(); | ||
return super.getAsBoolean() && config.management().enabled(); | ||
} | ||
|
||
} |
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
11 changes: 4 additions & 7 deletions
11
...ment/HibernateSearchManagementConfig.java → ...asticsearchBuildTimeConfigManagement.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
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: 2 additions & 7 deletions
9
...earch/standalone/elasticsearch/deployment/HibernateSearchStandaloneManagementEnabled.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,25 +1,20 @@ | ||
package io.quarkus.hibernate.search.standalone.elasticsearch.deployment; | ||
|
||
import io.quarkus.hibernate.search.standalone.elasticsearch.runtime.HibernateSearchStandaloneBuildTimeConfig; | ||
import io.quarkus.hibernate.search.standalone.elasticsearch.runtime.management.HibernateSearchStandaloneManagementConfig; | ||
|
||
/** | ||
* Supplier that can be used to only run build steps | ||
* if the Hibernate Search extension and its management is enabled. | ||
*/ | ||
public class HibernateSearchStandaloneManagementEnabled extends HibernateSearchStandaloneEnabled { | ||
|
||
private final HibernateSearchStandaloneManagementConfig config; | ||
|
||
HibernateSearchStandaloneManagementEnabled(HibernateSearchStandaloneBuildTimeConfig config, | ||
HibernateSearchStandaloneManagementConfig managementConfig) { | ||
HibernateSearchStandaloneManagementEnabled(HibernateSearchStandaloneBuildTimeConfig config) { | ||
super(config); | ||
this.config = managementConfig; | ||
} | ||
|
||
@Override | ||
public boolean getAsBoolean() { | ||
return super.getAsBoolean() && config.enabled(); | ||
return super.getAsBoolean() && config.management().enabled(); | ||
} | ||
|
||
} |
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
11 changes: 4 additions & 7 deletions
11
...nateSearchStandaloneManagementConfig.java → ...hStandaloneBuildTimeConfigManagement.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