@Override public NavigationResult getGenerationFlow(ScaffoldGenerationContext generationContext) { NavigationResultBuilder builder = NavigationResultBuilder.create(); builder.add(ScaffoldableEntitySelectionWizard.class); return builder.build(); }
@Override public NavigationResult next(UINavigationContext context) throws Exception { NavigationResultBuilder builder = NavigationResultBuilder.create(); builder.add(DevOpsEditStep.class); return builder.build(); }
/** * Create a {@link NavigationResult} using the given {@link UICommand} type as the target. */ public static final NavigationResult navigateTo(Class<? extends UICommand> next) { if (next == null) { return null; } NavigationResultBuilder builder = navigationBuilder(); builder.add(next); return builder.build(); }
@Override public NavigationResult next(UINavigationContext context) throws Exception { return NavigationResultBuilder.create().add(SpringBootNewProjectCommand.class).build(); }
/** * Create a {@link NavigationResult} using the given {@link UICommand} array as the target. */ public static final NavigationResult navigateTo(Class<? extends UICommand>[] next) { if (next == null) { return null; } NavigationResultBuilder builder = navigationBuilder(); for (Class<? extends UICommand> type : next) { builder.add(type); } return builder.build(); }
@Override public NavigationResult next(UINavigationContext context) throws Exception { Boolean value = integrationTest.getValue(); if (value != null && value) { return NavigationResultBuilder.create().add(NewIntegrationTestClassCommand.class).build(); } return null; }
@Override public NavigationResult next(UINavigationContext context) throws Exception { NavigationResultBuilder builder = NavigationResultBuilder.create(); builder.add(NewProjectWizard.class); builder.add(ConfigureDevOpsStep.class); return builder.build(); } }
@Override public NavigationResult next(UINavigationContext context) throws Exception { NavigationResultBuilder builder = NavigationResultBuilder.create(); if (needFabric8Setup) { builder.add(Fabric8SetupStep.class); } if (needOptionalStep) { builder.add(DevOpsEditOptionalStep.class); } builder.add(DevOpsEditStep.class); return builder.build(); }
/** * Create a {@link NavigationResult} using the given {@link UICommand} types as the targets. */ @SuppressWarnings("unchecked") public static final NavigationResult navigateTo(Class<? extends UICommand> next, Class<? extends UICommand>... additional) { if (next == null) return null; NavigationResultBuilder builder = navigationBuilder(); builder.add(next); for (Class<? extends UICommand> type : additional) { builder.add(type); } return builder.build(); }
@Override public NavigationResult next(UINavigationContext context) throws Exception { NavigationResultBuilder builder = NavigationResultBuilder.create(); builder.add(Metadata.forCommand(SetupCommand.class).name("WildFly Swarm: Setup") .description("Setup WildFly Swarm in your web application"), Arrays.asList(SetupCommand.class, AddFractionCommand.class)); builder.add(SetupFractionsStep.class); return builder.build(); }
@Override public NavigationResult next(UINavigationContext context) { NavigationResultBuilder builder = NavigationResultBuilder.create(); builder.add( Metadata.forCommand(SetupVertxCommand.class).name("Vert.x: Setup").description("Setup Vert.x") .category(Categories.create("vert.x")), Arrays.asList(SetupVertxCommand.class, AddDependencyCommand.class)); return builder.build(); }
@Override public NavigationResult next(UINavigationContext context) throws Exception { UIContext uiContext = context.getUIContext(); Map<Object, Object> attributeMap = uiContext.getAttributeMap(); ScaffoldProvider selectedProvider = provider.getValue(); ScaffoldSetupContext setupContext = createSetupContext(uiContext); attributeMap.put(ScaffoldProvider.class, selectedProvider); attributeMap.put(ScaffoldSetupContext.class, setupContext); // Get the navigation result entries from the selected scaffold provider NavigationResult setupFlow = selectedProvider.getSetupFlow(setupContext); // Add the execution logic step in the end so that the scaffold setup step is executed last after all other steps NavigationResultBuilder builder = NavigationResultBuilder.create(setupFlow); NavigationResult navigationResult = builder.add(ScaffoldExecuteSetupStep.class).build(); return navigationResult; }
@Override public NavigationResult next(UINavigationContext context) throws Exception { ScaffoldProvider selectedProvider = provider.getValue(); UIContext uiContext = context.getUIContext(); Map<Object, Object> attributeMap = uiContext.getAttributeMap(); attributeMap.put(ScaffoldProvider.class, selectedProvider); ScaffoldGenerationContext generationContext = populateGenerationContext(uiContext); attributeMap.put(ScaffoldGenerationContext.class, generationContext); NavigationResult setupFlow = null; // Verify if the selected provider is installed // If not, add the setup flow and inform the generation step to setup the scaffold. ScaffoldSetupContext setupContext = populateSetupContext(uiContext); if (!selectedProvider.isSetup(setupContext)) { setupFlow = selectedProvider.getSetupFlow(setupContext); attributeMap.put(REQUIRES_SCAFFOLD_SETUP, true); attributeMap.put(ScaffoldSetupContext.class, setupContext); } // Get the step sequence from the selected scaffold provider NavigationResult generationFlow = selectedProvider.getGenerationFlow(generationContext); // Add the execution logic step in the end so that the scaffold generation step is executed last after all other // steps NavigationResultBuilder builder = NavigationResultBuilder.create(setupFlow); NavigationResult navigationResult = builder.add(generationFlow).add(ScaffoldExecuteGenerationStep.class).build(); return navigationResult; }
.description("Setup all dependent facets for the Faces scaffold."); builder.add(compositeSetupMetadata, setupCommands); return builder.build();
@Override public NavigationResult next(UINavigationContext context) { descriptor.setTargetPackage(targetPackage.getValue()); descriptor.setConnectionProfileName(connectionProfile.getValue()); NavigationResultBuilder navigationResultBuilder = NavigationResultBuilder.create(); if (Strings.isNullOrEmpty(descriptor.getConnectionProfileName())) { descriptor.setDriverClass(null); descriptor.setUrls(null); descriptor.setConnectionProperties(null); navigationResultBuilder.add(connectionProfileDetailsStep); } else { ConnectionProfile profile = profiles.get(descriptor.getConnectionProfileName()); if (profile.getPath() != null) { descriptor.setUrls(HibernateToolsHelper.getDriverUrls(createResource(profile.getPath()))); } descriptor.setDriverClass(profile.getDriver()); descriptor.setConnectionProperties(createConnectionProperties(profile)); } navigationResultBuilder.add(dbTableSelectionStep); return navigationResultBuilder.build(); }