Package io.quarkus.cli.plugin
Class PluginCatalogService
- java.lang.Object
-
- io.quarkus.cli.plugin.CatalogService<PluginCatalog>
-
- io.quarkus.cli.plugin.PluginCatalogService
-
public class PluginCatalogService extends CatalogService<PluginCatalog>
-
-
Field Summary
-
Fields inherited from class io.quarkus.cli.plugin.CatalogService
catalogType, EXISTS_AND_WRITABLE, GIT_ROOT, HAS_BUILD_GRADLE, HAS_POM_XML, IS_ELIGIBLE_PROJECT_ROOT, IS_USER_HOME, objectMapper, projectRoot, relativePath, USER_HOME
-
-
Constructor Summary
Constructors Constructor Description PluginCatalogService()PluginCatalogService(Function<Path,Path> relativePath)PluginCatalogService(Predicate<Path> projectRoot, Function<Path,Path> relativePath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PluginCatalogreadCombinedCatalog(Optional<Path> proejctDir, Optional<Path> userDir)Read thePluginCatalogfrom project or fallback to global catalog.Optional<PluginCatalog>readProjectCatalog(Optional<Path> dir)Optional<PluginCatalog>readUserCatalog(Optional<Path> userDir)Reads the plguin catalog from the user home.-
Methods inherited from class io.quarkus.cli.plugin.CatalogService
findProjectCatalogPath, findProjectCatalogPath, findProjectRoot, getCatalogPath, getRelativeCatalogPath, getRelativeCatalogPath, getUserCatalogPath, getUserCatalogPath, readCatalog, readCatalog, writeCatalog
-
-
-
-
Method Detail
-
readUserCatalog
public Optional<PluginCatalog> readUserCatalog(Optional<Path> userDir)
Description copied from class:CatalogServiceReads the plguin catalog from the user home.- Overrides:
readUserCatalogin classCatalogService<PluginCatalog>- Returns:
- a catalog wrapped in optional or empty if the catalog is not present.
-
readProjectCatalog
public Optional<PluginCatalog> readProjectCatalog(Optional<Path> dir)
- Overrides:
readProjectCatalogin classCatalogService<PluginCatalog>
-
readCombinedCatalog
public PluginCatalog readCombinedCatalog(Optional<Path> proejctDir, Optional<Path> userDir)
Read thePluginCatalogfrom project or fallback to global catalog.- Parameters:
ouput- anOutputOptionMixinthat can be used for tests to substitute current dir with a test directory.projectDir- An optional path pointing to the project directory.userdir- An optional path pointing to the user directory- Returns:
- the catalog
-
-