Object CartridgeUtil
-
- All Implemented Interfaces:
public class CartridgeUtilObject class for handling of remote cartridge artifacts.
-
-
Field Summary
Fields Modifier and Type Field Description public final static CartridgeUtilINSTANCE
-
Method Summary
Modifier and Type Method Description final BooleanisModuleDependency(String cartridge)final StringgetFileIDFrom(ModuleComponentIdentifier identifier)Calculates id / base file name from module dependency pf a file. final BooleanisCartridge(Project project, ModuleComponentIdentifier identifier)Returns true, if dependency is an external cartridge. final BooleanisCartridge(DependencyHandler dependencyHandler, Logger logger, ModuleComponentIdentifier identifier)Returns true, if dependency is an external cartridge. final BooleanisCartridge(Project project, ExternalModuleDependency dependency, List<EnvironmentType> environmentTypes)Returns true, if dependency is an external cartridge and the style is a production like cartridge. final BooleanisCartridge(Project project, String group, String module, String version, List<EnvironmentType> environmentTypes)Returns true, if dependency is an external cartridge and the style is a production like cartridge. final BooleanisCartridge(DependencyHandler dependencyHandler, Logger logger, String group, String module, String version, List<EnvironmentType> environmentTypes)Returns true, if dependency is an external cartridge and the style is a production like cartridge. final Set<String>getDepenendencySet(Project project, String moduledep)Returns a set of dependencies from a BOM file. final Set<String>getDepenendencySet(Project project, String group, String module, String version)Returns a set of dependencies from a BOM file. final Set<String>getDependencySet(Project project, String moduleDependency)Returns a set of dependencies from a BOM file. final Set<String>getDependencySet(Project project, String group, String module, String version)Returns a set of dependencies from a BOM file. final Set<String>getDependencySet(DependencyHandler dependencyHandler, Logger logger, String group, String module, String version)Returns a set of dependencies from a BOM file. final CartridgeStylegetCartridgeStyle(Project project)-
-
Method Detail
-
isModuleDependency
final Boolean isModuleDependency(String cartridge)
-
getFileIDFrom
final String getFileIDFrom(ModuleComponentIdentifier identifier)
Calculates id / base file name from module dependency pf a file.
- Parameters:
identifier- module identifier of the dependency
-
isCartridge
final Boolean isCartridge(Project project, ModuleComponentIdentifier identifier)
Returns true, if dependency is an external cartridge.
- Parameters:
project- the root projectidentifier- module identifier of the dependency
-
isCartridge
final Boolean isCartridge(DependencyHandler dependencyHandler, Logger logger, ModuleComponentIdentifier identifier)
Returns true, if dependency is an external cartridge. Use this overload at task execution time to avoid accessing task.project.
- Parameters:
dependencyHandler- the dependency handlerlogger- a logger instanceidentifier- module identifier of the dependency
-
isCartridge
final Boolean isCartridge(Project project, ExternalModuleDependency dependency, List<EnvironmentType> environmentTypes)
Returns true, if dependency is an external cartridge and the style is a production like cartridge. This is only checked if style is specified
- Parameters:
project- the root projectdependency- cartridge dependencyenvironmentTypes- list of environment types
-
isCartridge
final Boolean isCartridge(Project project, String group, String module, String version, List<EnvironmentType> environmentTypes)
Returns true, if dependency is an external cartridge and the style is a production like cartridge. This is only checked if style is specified
- Parameters:
project- the root projectgroup- module group of the external cartridgemodule- module name of the external cartridgeversion- version of the external cartridgeenvironmentTypes- list of environment types
-
isCartridge
final Boolean isCartridge(DependencyHandler dependencyHandler, Logger logger, String group, String module, String version, List<EnvironmentType> environmentTypes)
Returns true, if dependency is an external cartridge and the style is a production like cartridge. This is only checked if style is specified. Use this overload at task execution time to avoid accessing task.project.
- Parameters:
dependencyHandler- the dependency handlerlogger- a logger instancegroup- module group of the external cartridgemodule- module name of the external cartridgeversion- version of the external cartridgeenvironmentTypes- list of environment types
-
getDepenendencySet
@Deprecated(message = "Will be removed in next major", replaceWith = @ReplaceWith(expression = "getDependencySet(project, moduledep)"), level = DeprecationLevel.WARNING) final Set<String> getDepenendencySet(Project project, String moduledep)
Returns a set of dependencies from a BOM file.
- Parameters:
project- the root projectmoduledep- external module dependency - short notation
-
getDepenendencySet
@Deprecated(message = "Will be removed in next major", replaceWith = @ReplaceWith(expression = "getDependencySet(project, group, module, version)"), level = DeprecationLevel.WARNING) final Set<String> getDepenendencySet(Project project, String group, String module, String version)
Returns a set of dependencies from a BOM file.
- Parameters:
project- the root projectgroup- module group of the BOMmodule- module name of the BOMversion- version of the BOM
-
getDependencySet
final Set<String> getDependencySet(Project project, String moduleDependency)
Returns a set of dependencies from a BOM file.
- Parameters:
project- the root projectmoduleDependency- external module dependency - short notation
-
getDependencySet
final Set<String> getDependencySet(Project project, String group, String module, String version)
Returns a set of dependencies from a BOM file.
- Parameters:
project- the root projectgroup- module group of the BOMmodule- module name of the BOMversion- version of the BOM
-
getDependencySet
final Set<String> getDependencySet(DependencyHandler dependencyHandler, Logger logger, String group, String module, String version)
Returns a set of dependencies from a BOM file. Use this overload at task execution time to avoid accessing task.project.
- Parameters:
dependencyHandler- the dependency handlerlogger- a logger instancegroup- module group of the BOMmodule- module name of the BOMversion- version of the BOM
-
getCartridgeStyle
final CartridgeStyle getCartridgeStyle(Project project)
-
-
-
-