private boolean isModuleVisible(ShellContext shellContext) { if (typeLocationService.getModuleNames(ModuleFeatureName.APPLICATION).size() > 1) { return true; } return false; }
@CliOptionVisibilityIndicator(command = "test integration", params = {"module"}, help = "Module parameter is not available if there is only one application module") public boolean isModuleVisible(ShellContext shellContext) { if (typeLocationService.getModuleNames(ModuleFeatureName.APPLICATION).size() > 1) { return true; } return false; }
@CliOptionVisibilityIndicator(command = "email receiver setup", params = {"module"}, help = "Module parameter is not available if there is only one application module") public boolean isModuleVisibleReceiverSetup(ShellContext shellContext) { if (typeLocationService.getModuleNames(ModuleFeatureName.APPLICATION).size() > 1) { return true; } return false; }
@CliOptionVisibilityIndicator(command = "jpa setup", params = {"module"}, help = "Module parameter is not available if there is only one application module") public boolean isModuleVisible(ShellContext shellContext) { if (typeLocationService.getModuleNames(ModuleFeatureName.APPLICATION).size() > 1) { return true; } return false; }
@CliOptionVisibilityIndicator(command = "security setup", params = {"module"}, help = "Module parameter is not available if there is only one application module") public boolean isModuleVisible(ShellContext shellContext) { if (typeLocationService.getModuleNames(ModuleFeatureName.APPLICATION).size() > 1) { return true; } return false; }
@CliOptionVisibilityIndicator(command = "email sender setup", params = {"module"}, help = "Module parameter is not available if there is only one application module") public boolean isModuleVisibleSenderSetup(ShellContext shellContext) { if (typeLocationService.getModuleNames(ModuleFeatureName.APPLICATION).size() > 1) { return true; } return false; }
@CliOptionVisibilityIndicator(command = "web flow", params = {"module"}, help = "--module option is not visible when the project is a multimodule project.") public boolean isModuleVisible(ShellContext shellContext) { if (typeLocationService.getModuleNames(ModuleFeatureName.APPLICATION).size() > 1) { return true; } return false; }
@CliOptionVisibilityIndicator(command = "jpa audit setup", params = {"module"}, help = "Module parameter is not available if there is only one application module") public boolean isModuleVisible(ShellContext shellContext) { if (getTypeLocationService().getModuleNames(ModuleFeatureName.APPLICATION).size() > 1) { return true; } return false; }
@CliOptionAutocompleteIndicator(command = "web mvc setup", param = "module", help = "--module parameter" + " should be autocomplete with an application module.") public List<String> getAllApplicationModules(ShellContext shellContext) { return new ArrayList(getTypeLocationService().getModuleNames(ModuleFeatureName.APPLICATION)); }
/** * This indicator says if --package parameter should be visible or not. If project has more * than one 'application' modules (which contain one @SpringBootApplication), package will * be mandatory. * * @param shellContext * @return */ @CliOptionMandatoryIndicator(params = "package", command = "web mvc finder") public boolean isPackageRequired(ShellContext shellContext) { if (getTypeLocationService().getModuleNames(ModuleFeatureName.APPLICATION).size() <= 1) { return false; } return true; }
/** * This indicator checks if --module parameter should be visible or not. * * If exists more than one module that match with the properties of * ModuleFeature APPLICATION, --module parameter should be mandatory. * * @param shellContext * @return */ @CliOptionVisibilityIndicator(command = "web mvc setup", params = {"module"}, help = "Module parameter is not available if there is only one application module") public boolean isModuleVisible(ShellContext shellContext) { if (getTypeLocationService().getModuleNames(ModuleFeatureName.APPLICATION).size() > 1) { return true; } return false; }
/** * This indicator checks if --module parameter should be visible or not. * * If exists more than one module that match with the properties of ModuleFeature APPLICATION, * --module parameter should be visible. * * @param shellContext * @return */ @CliOptionVisibilityIndicator(command = "web mvc view setup", params = {"module"}, help = "Module parameter is not available if there is only one application module") public boolean isModuleVisible(ShellContext shellContext) { if (getTypeLocationService().getModuleNames(ModuleFeatureName.APPLICATION).size() > 1) { return true; } return false; }
/** * This indicator checks if --module parameter should be visible or not. * * If exists more than one module that match with the properties of * ModuleFeature APPLICATION, --module parameter should be visible and * mandatory. * * @param shellContext * @return */ @CliOptionVisibilityIndicator(command = "web mvc language", params = {"module"}, help = "Module parameter is not available if there is only one application module") public boolean isModuleVisible(ShellContext shellContext) { if (getTypeLocationService().getModuleNames(ModuleFeatureName.APPLICATION).size() > 1) { return true; } return false; }
@CliOptionAutocompleteIndicator( command = "jms sender", param = "destinationName", validate = false, includeSpaceOnFinish = false, help = "--destinationName parameter composed by application type module and destination name. If focus module is application type, will be selected by default") public List<String> returnApplicationModules(ShellContext shellContext) { List<String> applicationModules = new ArrayList<String>(); Collection<String> moduleNames = typeLocationService.getModuleNames(ModuleFeatureName.APPLICATION); if (projectOperations.isMultimoduleProject() && moduleNames.size() > 1) { String focusedModuleName = projectOperations.getFocusedModuleName(); for (String moduleName : moduleNames) { if (!focusedModuleName.equals(moduleName)) { applicationModules.add(moduleName.concat(":")); } } } return applicationModules; }
/** * Checks if module provided in package is an application module. If not, find an * application module and use it with default package. * * @param controllerPackage the provided JavaPackage to check * @return */ private JavaPackage checkAndUseApplicationModule(JavaPackage controllerPackage) { if (!typeLocationService.hasModuleFeature( projectOperations.getPomFromModuleName(controllerPackage.getModule()), ModuleFeatureName.APPLICATION)) { LOGGER .log( Level.WARNING, "Focused or specified module isn't an application module (containing a class " + "annotated with @SpringBootApplication). Looking for an application module and default package..."); // Validate that project has at least one application module Validate.notEmpty(typeLocationService.getModuleNames(ModuleFeatureName.APPLICATION), "The project must have at least one application module to publish web finders."); // Get the first application module String moduleName = typeLocationService.getModuleNames(ModuleFeatureName.APPLICATION).iterator().next(); Pom module = projectOperations.getPomFromModuleName(moduleName); controllerPackage = new JavaPackage(typeLocationService.getTopLevelPackageForModule(module).concat(".web"), moduleName); } return controllerPackage; }
@CliOptionMandatoryIndicator(params = "package", command = "jpa audit setup") public boolean isPackageRequired(ShellContext shellContext) { Pom module = getProjectOperations().getFocusedModule(); if (getTypeLocationService().getModuleNames(ModuleFeatureName.APPLICATION).size() <= 1 || getTypeLocationService().hasModuleFeature(module, ModuleFeatureName.APPLICATION)) { return false; } return true; }
public boolean getAllPossibleValues(final List<Completion> completions, final Class<?> targetType, final String existingData, final String optionContext, final MethodTarget target) { boolean filteredByFeature = false; if (optionContext != null) { for (ModuleFeatureName moduleFeatureName : ModuleFeatureName.values()) { if (optionContext.contains(moduleFeatureName.name())) { filteredByFeature = true; addModules(completions, optionContext, typeLocationService.getModuleNames(moduleFeatureName)); } } } if (!filteredByFeature) { addModules(completions, optionContext, projectOperations.getModuleNames()); } return true; }
if (getProjectOperations().isMultimoduleProject()) { Collection<String> moduleNames = getTypeLocationService().getModuleNames(ModuleFeatureName.APPLICATION);
@CliOptionVisibilityIndicator(command = "jpa setup", params = {"module"}, help = "Module parameter is not available if there is only one application module") public boolean isModuleVisible(ShellContext shellContext) { if (typeLocationService.getModuleNames(ModuleFeatureName.APPLICATION).size() > 1) { return true; } return false; }
@CliOptionVisibilityIndicator(command = "jpa audit setup", params = {"module"}, help = "Module parameter is not available if there is only one application module") public boolean isModuleVisible(ShellContext shellContext) { if (getTypeLocationService().getModuleNames(ModuleFeatureName.APPLICATION).size() > 1) { return true; } return false; }