Package io.quarkus.cli.plugin
Class PluginUtil
- java.lang.Object
-
- io.quarkus.cli.plugin.PluginUtil
-
public final class PluginUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<io.quarkus.maven.dependency.GACTV>checkGACTV(String location)Chekcs if specifiedStringis a valid .static Optional<io.quarkus.maven.dependency.GACTV>checkGACTV(Optional<String> location)static Optional<Path>checkPath(String location)Chekcs if specifiedStringis a valid path.static Optional<Path>checkPath(Optional<String> location)static Optional<String>checkRemoteCatalog(String location)Chekcs if specifiedStringcontains a valid remote catalogstatic Optional<String>checkRemoteCatalog(Optional<String> location)static Optional<URL>checkUrl(String location)Chekcs if specifiedStringis a valid .static Optional<URL>checkUrl(Optional<String> location)static PluginTypegetType(String location)Get thePluginTypethat corresponds the the specified location.static PluginTypegetType(Optional<io.quarkus.maven.dependency.GACTV> gactv, Optional<URL> url, Optional<Path> path)Get thePluginTypethat corresponds the the specified locations.static booleanisLocalFile(String location)Checks if location is a file that does exists locally.static booleanisProjectFile(Path projectRoot, String location)Checks if location is a file that does exists under the project root.static booleanisRemoteLocation(String location)Checks if location is remote.static booleanshouldRemove(Plugin p)Check if the plugin can be found.static booleanshouldSync(Path projectRoot, PluginCatalog catalog)static booleanshouldSync(Optional<Path> projectRoot, PluginCatalog catalog)
-
-
-
Method Detail
-
shouldSync
public static boolean shouldSync(Path projectRoot, PluginCatalog catalog)
-
shouldSync
public static boolean shouldSync(Optional<Path> projectRoot, PluginCatalog catalog)
-
getType
public static PluginType getType(String location)
Get thePluginTypethat corresponds the the specified location.- Parameters:
the- location- Returns:
- the
PluginTypethat corresponds to the location.
-
getType
public static PluginType getType(Optional<io.quarkus.maven.dependency.GACTV> gactv, Optional<URL> url, Optional<Path> path)
Get thePluginTypethat corresponds the the specified locations.- Parameters:
url- the urlpath- the pathgactv- the gactv- Returns:
- the
PluginTypethat corresponds to the location.
-
shouldRemove
public static boolean shouldRemove(Plugin p)
Check if the plugin can be found. The method is used to determined the plugin can be located.- Returns:
- true if path is not null and points to an existing file.
-
checkUrl
public static Optional<URL> checkUrl(String location)
Chekcs if specifiedStringis a valid .
-
checkGACTV
public static Optional<io.quarkus.maven.dependency.GACTV> checkGACTV(String location)
Chekcs if specifiedStringis a valid .
-
checkGACTV
public static Optional<io.quarkus.maven.dependency.GACTV> checkGACTV(Optional<String> location)
-
checkPath
public static Optional<Path> checkPath(String location)
Chekcs if specifiedStringis a valid path.
-
checkRemoteCatalog
public static Optional<String> checkRemoteCatalog(String location)
Chekcs if specifiedStringcontains a valid remote catalog- Parameters:
location- The string to check- Returns:
- The catalog wrapped in
Optionalif valid, empty otherwise.
-
isRemoteLocation
public static boolean isRemoteLocation(String location)
Checks if location is remote.- Parameters:
location- the specifiied location.- Returns:
- true if location is url or gactv
-
isLocalFile
public static boolean isLocalFile(String location)
Checks if location is a file that does exists locally.- Parameters:
location- the specifiied location.- Returns:
- true if location is url or gactv
-
-