Search in sources :

Example 1 with CommentedOptionFactory

use of org.guvnor.common.services.backend.util.CommentedOptionFactory in project kie-wb-common by kiegroup.

the class FormGenerationIntegrationTest method init.

@Before
public void init() {
    formModelHandlerManager = new TestFormModelHandlerManager(moduleService, moduleClassLoaderHelper, fieldManager, finderService);
    when(pathModelReaderService.getModelReader(any())).thenReturn(new RuntimeDMOModelReader(moduleClassLoader, new RawMVELEvaluator()));
    when(formFinderService.findFormsForType(anyString(), any())).then((Answer<List<FormDefinition>>) invocationOnMock -> {
        String type = invocationOnMock.getArguments()[0].toString();
        return Collections.singletonList(readFormDefinitionForType(type));
    });
    service = new BPMNVFSFormDefinitionGeneratorService(fieldManager, pathModelReaderService, formModelHandlerManager, formFinderService, formSerializer, ioService, commentedOptionFactory, formModelSynchronizationUtil);
    when(moduleService.resolveModule(any())).thenReturn(module);
    when(moduleClassLoaderHelper.getModuleClassLoader(any())).thenReturn(moduleClassLoader);
    generator = new BPMNFormModelGeneratorImpl(moduleService, moduleClassLoaderHelper);
    final Path rootPathWithNestedForms = PathFactory.newPath(DATA_OBJECTS_FOLDER, getUriOfResource(PREPARED_NESTED_FORMS_FOLDER));
    ;
    processFormModel = generator.generateProcessFormModel(formGenerationProcessDefinitions, rootPathWithNestedForms);
    taskFormModels = generator.generateTaskFormModels(formGenerationProcessDefinitions, rootPathWithNestedForms);
}
Also used : ModelFinderService(org.kie.workbench.common.forms.data.modeller.service.shared.ModelFinderService) Arrays(java.util.Arrays) DocumentFieldType(org.kie.workbench.common.forms.jbpm.model.authoring.document.type.DocumentFieldType) ModuleClassLoaderHelper(org.kie.workbench.common.services.backend.project.ModuleClassLoaderHelper) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) FormModelerContent(org.kie.workbench.common.forms.editor.model.FormModelerContent) FieldDefinition(org.kie.workbench.common.forms.model.FieldDefinition) FormDefinitionSerializer(org.kie.workbench.common.forms.services.backend.serialization.FormDefinitionSerializer) StaticFormLayoutTemplateGenerator(org.kie.workbench.common.forms.commons.shared.layout.impl.StaticFormLayoutTemplateGenerator) PathFactory(org.uberfire.backend.vfs.PathFactory) KieModuleService(org.kie.workbench.common.services.shared.project.KieModuleService) FieldManager(org.kie.workbench.common.forms.service.shared.FieldManager) FormModelSerializer(org.kie.workbench.common.forms.services.backend.serialization.impl.FormModelSerializer) FieldSerializer(org.kie.workbench.common.forms.services.backend.serialization.impl.FieldSerializer) RawMVELEvaluator(org.kie.soup.project.datamodel.commons.util.RawMVELEvaluator) ModuleFormFinderService(org.kie.workbench.common.forms.editor.service.shared.ModuleFormFinderService) SubFormFieldType(org.kie.workbench.common.forms.fields.shared.fieldTypes.relations.subForm.type.SubFormFieldType) KieModule(org.kie.workbench.common.services.shared.project.KieModule) BusinessProcessFormModel(org.kie.workbench.common.forms.jbpm.model.authoring.process.BusinessProcessFormModel) BPMNFormModelGeneratorImpl(org.kie.workbench.common.forms.jbpm.server.service.impl.BPMNFormModelGeneratorImpl) Collectors(java.util.stream.Collectors) TaskFormModel(org.kie.workbench.common.forms.jbpm.model.authoring.task.TaskFormModel) IOUtils(org.apache.commons.io.IOUtils) List(java.util.List) Stream(java.util.stream.Stream) ModelReaderService(org.kie.workbench.common.forms.data.modeller.service.ext.ModelReaderService) FormModelPropertiesUtil(org.kie.workbench.common.forms.model.util.formModel.FormModelPropertiesUtil) FormModelSynchronizationUtilImpl(org.kie.workbench.common.forms.editor.service.shared.model.impl.FormModelSynchronizationUtilImpl) MultipleSubFormFieldType(org.kie.workbench.common.forms.fields.shared.fieldTypes.relations.multipleSubform.type.MultipleSubFormFieldType) IntegerBoxFieldType(org.kie.workbench.common.forms.fields.shared.fieldTypes.basic.integerBox.type.IntegerBoxFieldType) TestMetaDataEntryManager(org.kie.workbench.common.forms.fields.test.TestMetaDataEntryManager) MockitoJUnitRunner(org.mockito.junit.MockitoJUnitRunner) FormModelHandlerManager(org.kie.workbench.common.forms.editor.service.backend.FormModelHandlerManager) DatePickerFieldType(org.kie.workbench.common.forms.fields.shared.fieldTypes.basic.datePicker.type.DatePickerFieldType) Mockito.mock(org.mockito.Mockito.mock) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) Iterables(com.google.common.collect.Iterables) BeforeClass(org.junit.BeforeClass) FormGenerationTest_NestedObject(org.kie.workbench.common.forms.integration.tests.formgeneration.model.FormGenerationTest_NestedObject) DecimalBoxFieldType(org.kie.workbench.common.forms.fields.shared.fieldTypes.basic.decimalBox.type.DecimalBoxFieldType) BPMNVFSFormDefinitionGeneratorService(org.kie.workbench.common.forms.jbpm.server.service.formGeneration.impl.authoring.BPMNVFSFormDefinitionGeneratorService) Mock(org.mockito.Mock) RunWith(org.junit.runner.RunWith) FormLayoutTemplateGenerator(org.kie.workbench.common.forms.commons.shared.layout.FormLayoutTemplateGenerator) AbstractJBPMFormModel(org.kie.workbench.common.forms.jbpm.model.authoring.AbstractJBPMFormModel) TextBoxFieldType(org.kie.workbench.common.forms.fields.shared.fieldTypes.basic.textBox.type.TextBoxFieldType) FormEditorHelper(org.kie.workbench.common.forms.editor.client.editor.FormEditorHelper) TextAreaFieldType(org.kie.workbench.common.forms.fields.shared.fieldTypes.basic.textArea.type.TextAreaFieldType) Answer(org.mockito.stubbing.Answer) Charset(java.nio.charset.Charset) CommentedOptionFactory(org.guvnor.common.services.backend.util.CommentedOptionFactory) FormDefinitionSerializerImpl(org.kie.workbench.common.forms.services.backend.serialization.impl.FormDefinitionSerializerImpl) LayoutRow(org.uberfire.ext.layout.editor.api.editor.LayoutRow) FormGenerationResult(org.kie.workbench.common.forms.jbpm.server.service.formGeneration.FormGenerationResult) FormDefinition(org.kie.workbench.common.forms.model.FormDefinition) SubFormFieldDefinition(org.kie.workbench.common.forms.fields.shared.fieldTypes.relations.subForm.definition.SubFormFieldDefinition) IOServiceDotFileImpl(org.uberfire.io.impl.IOServiceDotFileImpl) DocumentFieldProvider(org.kie.workbench.common.forms.jbpm.model.authoring.document.provider.DocumentFieldProvider) Path(org.uberfire.backend.vfs.Path) Definitions(org.eclipse.bpmn2.Definitions) Before(org.junit.Before) TestUtils(org.kie.workbench.common.forms.integration.tests.TestUtils) AbstractBPMNFormGeneratorService.generateNestedFormName(org.kie.workbench.common.forms.jbpm.server.service.formGeneration.impl.AbstractBPMNFormGeneratorService.generateNestedFormName) CheckBoxFieldType(org.kie.workbench.common.forms.fields.shared.fieldTypes.basic.checkBox.type.CheckBoxFieldType) FormModelSynchronizationUtil(org.kie.workbench.common.forms.editor.service.shared.model.FormModelSynchronizationUtil) CommentedOption(org.uberfire.java.nio.base.options.CommentedOption) IOException(java.io.IOException) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) TestFormModelHandlerManager(org.kie.workbench.common.forms.jbpm.server.service.formGeneration.test.TestFormModelHandlerManager) FormGenerationTest_DataObject(org.kie.workbench.common.forms.integration.tests.formgeneration.model.FormGenerationTest_DataObject) TestFieldManager(org.kie.workbench.common.forms.fields.test.TestFieldManager) IOService(org.uberfire.io.IOService) DOCUMENT_TYPE(org.kie.workbench.common.forms.jbpm.model.authoring.document.type.DocumentFieldType.DOCUMENT_TYPE) SyncBeanManager(org.jboss.errai.ioc.client.container.SyncBeanManager) Collections(java.util.Collections) RuntimeDMOModelReader(org.kie.workbench.common.forms.data.modeller.service.impl.ext.dmo.runtime.RuntimeDMOModelReader) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) Path(org.uberfire.backend.vfs.Path) RawMVELEvaluator(org.kie.soup.project.datamodel.commons.util.RawMVELEvaluator) TestFormModelHandlerManager(org.kie.workbench.common.forms.jbpm.server.service.formGeneration.test.TestFormModelHandlerManager) List(java.util.List) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) BPMNFormModelGeneratorImpl(org.kie.workbench.common.forms.jbpm.server.service.impl.BPMNFormModelGeneratorImpl) RuntimeDMOModelReader(org.kie.workbench.common.forms.data.modeller.service.impl.ext.dmo.runtime.RuntimeDMOModelReader) BPMNVFSFormDefinitionGeneratorService(org.kie.workbench.common.forms.jbpm.server.service.formGeneration.impl.authoring.BPMNVFSFormDefinitionGeneratorService) Before(org.junit.Before)

Example 2 with CommentedOptionFactory

use of org.guvnor.common.services.backend.util.CommentedOptionFactory in project kie-wb-common by kiegroup.

the class AbstractFormDefinitionHelperTest method init.

@Before
public void init() throws IOException {
    simpleFileSystemProvider = new SimpleFileSystemProvider();
    simpleFileSystemProvider.forceAsDefault();
    serializer = spy(new FormDefinitionSerializerImpl(new FieldSerializer(), new FormModelSerializer(), new TestMetaDataEntryManager()));
    when(originalPath.getFileName()).thenReturn(ORIGNAL_FORM_ASSET_NAME);
    when(destinationPath.getFileName()).thenReturn(DESTINATION_FORM_ASSET_NAME);
    when(destinationPath.toURI()).thenReturn(DESTINATION_FORM_PATH);
    when(ioService.readAllString(any())).thenReturn(IOUtils.toString(new InputStreamReader(this.getClass().getResourceAsStream(ORIGINAL_FORM_PATH))));
    doAnswer((Answer<FormDefinition>) invocationOnMock -> {
        FormDefinition formDefinition = (FormDefinition) invocationOnMock.callRealMethod();
        beforeProcess(formDefinition);
        return formDefinition;
    }).when(serializer).deserialize(Mockito.<String>any());
    helper = getHelper(ioService, serializer, commentedOptionFactory);
}
Also used : SimpleFileSystemProvider(org.uberfire.java.nio.fs.file.SimpleFileSystemProvider) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) Mock(org.mockito.Mock) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) FormDefinitionSerializer(org.kie.workbench.common.forms.services.backend.serialization.FormDefinitionSerializer) Mockito.spy(org.mockito.Mockito.spy) Answer(org.mockito.stubbing.Answer) CommentedOptionFactory(org.guvnor.common.services.backend.util.CommentedOptionFactory) FormDefinitionSerializerImpl(org.kie.workbench.common.forms.services.backend.serialization.impl.FormDefinitionSerializerImpl) SimpleFileSystemProvider(org.uberfire.java.nio.fs.file.SimpleFileSystemProvider) Mockito.doAnswer(org.mockito.Mockito.doAnswer) Assertions(org.assertj.core.api.Assertions) FormDefinition(org.kie.workbench.common.forms.model.FormDefinition) FormModelSerializer(org.kie.workbench.common.forms.services.backend.serialization.impl.FormModelSerializer) FieldSerializer(org.kie.workbench.common.forms.services.backend.serialization.impl.FieldSerializer) Path(org.uberfire.backend.vfs.Path) Before(org.junit.Before) IOException(java.io.IOException) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) InputStreamReader(java.io.InputStreamReader) Mockito.verify(org.mockito.Mockito.verify) IOUtils(org.apache.commons.io.IOUtils) Mockito(org.mockito.Mockito) FormResourceTypeDefinition(org.kie.workbench.common.forms.editor.type.FormResourceTypeDefinition) IOService(org.uberfire.io.IOService) TestMetaDataEntryManager(org.kie.workbench.common.forms.fields.test.TestMetaDataEntryManager) Mockito.mock(org.mockito.Mockito.mock) FieldSerializer(org.kie.workbench.common.forms.services.backend.serialization.impl.FieldSerializer) InputStreamReader(java.io.InputStreamReader) FormDefinitionSerializerImpl(org.kie.workbench.common.forms.services.backend.serialization.impl.FormDefinitionSerializerImpl) FormModelSerializer(org.kie.workbench.common.forms.services.backend.serialization.impl.FormModelSerializer) FormDefinition(org.kie.workbench.common.forms.model.FormDefinition) TestMetaDataEntryManager(org.kie.workbench.common.forms.fields.test.TestMetaDataEntryManager) Before(org.junit.Before)

Example 3 with CommentedOptionFactory

use of org.guvnor.common.services.backend.util.CommentedOptionFactory in project kie-wb-common by kiegroup.

the class DataModelServiceConstructorTest method testConstructor.

@Test
public void testConstructor() throws IllegalArgumentException, FileSystemNotFoundException, SecurityException, URISyntaxException {
    final URL packageUrl = this.getClass().getResource("/DataModelServiceConstructorTest/src/main/java/t1p1");
    final RenameService renameService = mock(RenameService.class);
    final SaveAndRenameServiceImpl saveAndRenameService = mock(SaveAndRenameServiceImpl.class);
    RepositoryService repoService = mock(RepositoryService.class);
    IOService ioService = new IOServiceDotFileImpl();
    Collection<Role> roles = new ArrayList<>();
    Collection<Group> groups = new ArrayList<>();
    User user = new UserImpl("admin", roles, groups);
    SessionInfo sessionInfo = new SessionInfoImpl("admin", user);
    Instance<User> userInstance = mock(Instance.class);
    when(userInstance.get()).thenReturn(user);
    ConfigIOServiceProducer cfiosProducer = new ConfigIOServiceProducer();
    cfiosProducer.setup();
    IOService configIOService = cfiosProducer.configIOService();
    MetadataService metadataService = new MetadataServiceImpl(ioService, configIOService, mock(CommentedOptionFactory.class), sessionInfo);
    POMContentHandler pomContentHandler = new POMContentHandler();
    M2RepoServiceImpl m2RepoService = new M2RepoServiceImpl();
    PomEnhancer pomEnhancer = new DefaultPomEnhancer();
    POMService pomService = new POMServiceImpl(ioService, pomContentHandler, m2RepoService, metadataService, new EventSourceMock<>(), mock(ModuleService.class), mock(CommentedOptionFactory.class), pomEnhancer);
    KModuleContentHandler moduleContentHandler = new KModuleContentHandler();
    CommentedOptionFactory commentedOptionFactory = new CommentedOptionFactoryImpl(sessionInfo);
    ProjectConfigurationContentHandler moduleConfigurationContentHandler = new ProjectConfigurationContentHandler();
    ProjectImportsService moduleImportsService = new ProjectImportsServiceImpl(ioService, moduleConfigurationContentHandler, renameService, saveAndRenameService);
    Event<NewModuleEvent> newModuleEvent = new EventSourceMock<>();
    Event<NewPackageEvent> newPackageEvent = new EventSourceMock<>();
    Event<InvalidateDMOModuleCacheEvent> invalidateDMOCache = new EventSourceMock<>();
    PermissionTypeRegistry permissionTypeRegistry = new DefaultPermissionTypeRegistry();
    DotNamedPermissionType permissionType = new DotNamedPermissionType(REPOSITORY_TYPE.getName());
    permissionType.createPermission(REPOSITORY_TYPE, RepositoryAction.READ, true);
    permissionType.createPermission(REPOSITORY_TYPE, RepositoryAction.CREATE, true);
    permissionType.createPermission(REPOSITORY_TYPE, RepositoryAction.UPDATE, true);
    permissionType.createPermission(REPOSITORY_TYPE, RepositoryAction.DELETE, true);
    permissionTypeRegistry.register(permissionType);
    ModuleRepositoryResolver repositoryResolver = new ModuleRepositoryResolverImpl(ioService, null, null);
    FileDiscoveryService fileDiscoveryService = new FileDiscoveryServiceImpl();
    HackedKieModuleServiceImpl moduleService = null;
    HackedKModuleServiceImpl kModuleService = new HackedKModuleServiceImpl(ioService, moduleService, metadataService, moduleContentHandler);
    KieResourceResolver resourceResolver = new KieResourceResolver(ioService, pomService, commentedOptionFactory, kModuleService, resourcePathResolversInstance);
    ModuleSaver moduleSaver = null;
    moduleService = new HackedKieModuleServiceImpl(ioService, moduleSaver, pomService, repoService, newModuleEvent, newPackageEvent, invalidateDMOCache, sessionInfo, commentedOptionFactory, mock(ModuleFinder.class), mock(PackageServiceLoader.class), resourceResolver, repositoryResolver);
    ModuleRepositoriesContentHandler contentHandler = new ModuleRepositoriesContentHandler();
    ModuleRepositoriesService moduleRepositoriesService = new KieModuleRepositoriesServiceImpl(ioService, repositoryResolver, resourceResolver, contentHandler, commentedOptionFactory);
    DependencyService dependencyService = new DependencyServiceImpl();
    PackageNameSearchProvider packageNameSearchProvider = new PackageNameSearchProvider(dependencyService);
    PackageNameAllowListLoader loader = new PackageNameAllowListLoader(packageNameSearchProvider, ioService);
    MetadataServerSideService serverSideMetdataService = new MetadataServiceImpl(ioService, configIOService, commentedOptionFactory, sessionInfo);
    PackageNameAllowListSaver saver = new PackageNameAllowListSaver(ioService, serverSideMetdataService, commentedOptionFactory);
    PackageNameAllowListService packageNameAllowListService = new PackageNameAllowListServiceImpl(ioService, moduleService, loader, saver);
    moduleSaver = new ModuleSaver(ioService, pomService, kModuleService, newModuleEvent, newPackageEvent, resourceResolver, moduleImportsService, moduleRepositoriesService, packageNameAllowListService, commentedOptionFactory, sessionInfo);
    moduleService.setModuleSaver(moduleSaver);
    kModuleService.setModuleService(moduleService);
    ProjectImportsService importsService = new ProjectImportsServiceImpl(ioService, moduleConfigurationContentHandler, renameService, saveAndRenameService);
    Instance<BuildValidationHelper> buildValidationHelperBeans = null;
    Instance<Predicate<String>> classFilterBeans = null;
    HackedLRUModuleDependenciesClassLoaderCache dependenciesClassLoaderCache = new HackedLRUModuleDependenciesClassLoaderCache();
    LRUPomModelCache pomModelCache = new LRUPomModelCache();
    LRUBuilderCache builderCache = new LRUBuilderCache(ioService, moduleService, importsService, buildValidationHelperBeans, dependenciesClassLoaderCache, pomModelCache, packageNameAllowListService, classFilterBeans);
    Instance<PostBuildHandler> handlerInstance = mock(Instance.class);
    Iterator<PostBuildHandler> mockIterator = mock(Iterator.class);
    when(handlerInstance.iterator()).thenReturn(mockIterator);
    when(mockIterator.hasNext()).thenReturn(false);
    DeploymentVerifier deploymentVerifier = new DeploymentVerifier(repositoryResolver, moduleRepositoriesService);
    BuildHelper buildHelper = new BuildHelper(pomService, m2RepoService, moduleService, deploymentVerifier, builderCache, handlerInstance, userInstance);
    PipelineRegistry pipelineRegistry = new InMemoryPipelineRegistry();
    BuildPipelineInitializer pipelineInitializer = new BuildPipelineInitializer(pipelineRegistry, getConfigExecutors(moduleService, buildHelper));
    BuildPipelineInvoker pipelineInvoker = new BuildPipelineInvoker(pipelineInitializer.getExecutor(), pipelineRegistry);
    BuildServiceHelper buildServiceHelper = new BuildServiceHelper(pipelineInvoker, deploymentVerifier);
    BuildService buildService = new BuildServiceImpl(moduleService, buildServiceHelper, builderCache);
    BuildInfoService buildInfoService = new BuildInfoService(buildService, builderCache);
    ModuleDataModelOracleBuilderProvider builderProvider = new ModuleDataModelOracleBuilderProvider(packageNameAllowListService, importsService);
    LRUModuleDataModelOracleCache cacheModules = new LRUModuleDataModelOracleCache(builderProvider, moduleService, buildInfoService);
    dependenciesClassLoaderCache.setBuildInfoService(buildInfoService);
    LRUDataModelOracleCache cachePackages = new LRUDataModelOracleCache(ioService, fileDiscoveryService, cacheModules, moduleService, buildInfoService, dataModelExtensionProvider, new RawMVELEvaluator());
    DataModelService dataModelService = new DataModelServiceImpl(cachePackages, cacheModules, moduleService);
    final org.uberfire.java.nio.file.Path nioPackagePath = fs.getPath(packageUrl.toURI());
    final Path packagePath = Paths.convert(nioPackagePath);
    final ModuleDataModelOracle oracle = dataModelService.getModuleDataModel(packagePath);
    assertNotNull(oracle);
    assertEquals(4, oracle.getModuleModelFields().size());
    assertContains("t1p1.Bean1", oracle.getModuleModelFields().keySet());
    assertContains("t1p1.DRLBean", oracle.getModuleModelFields().keySet());
    assertContains("t1p2.Bean2", oracle.getModuleModelFields().keySet());
    assertContains("java.lang.String", oracle.getModuleModelFields().keySet());
    assertEquals(TypeSource.JAVA_PROJECT, oracle.getModuleTypeSources().get("t1p1.Bean1"));
    assertEquals(TypeSource.DECLARED, oracle.getModuleTypeSources().get("t1p1.DRLBean"));
    assertEquals(TypeSource.JAVA_PROJECT, oracle.getModuleTypeSources().get("t1p2.Bean2"));
    assertEquals(TypeSource.JAVA_DEPENDENCY, oracle.getModuleTypeSources().get("java.lang.String"));
}
Also used : KieModuleService(org.kie.workbench.common.services.shared.project.KieModuleService) ModuleService(org.guvnor.common.services.project.service.ModuleService) IOServiceDotFileImpl(org.uberfire.io.impl.IOServiceDotFileImpl) ProjectImportsService(org.kie.workbench.common.services.shared.project.ProjectImportsService) ArrayList(java.util.ArrayList) POMContentHandler(org.guvnor.common.services.project.backend.server.utils.POMContentHandler) KieResourceResolver(org.kie.workbench.common.services.backend.project.KieResourceResolver) PackageNameAllowListLoader(org.kie.workbench.common.services.backend.allowlist.PackageNameAllowListLoader) MetadataServerSideService(org.guvnor.common.services.backend.metadata.MetadataServerSideService) Predicate(java.util.function.Predicate) ProjectImportsServiceImpl(org.kie.workbench.common.services.backend.project.ProjectImportsServiceImpl) PackageNameSearchProvider(org.kie.workbench.common.services.backend.allowlist.PackageNameSearchProvider) RawMVELEvaluator(org.kie.soup.project.datamodel.commons.util.RawMVELEvaluator) ModuleDataModelOracleBuilderProvider(org.kie.workbench.common.services.datamodel.backend.server.cache.ModuleDataModelOracleBuilderProvider) DefaultPermissionTypeRegistry(org.uberfire.security.impl.authz.DefaultPermissionTypeRegistry) FileDiscoveryServiceImpl(org.guvnor.common.services.backend.file.FileDiscoveryServiceImpl) BuildPipelineInvoker(org.kie.workbench.common.services.backend.builder.ala.BuildPipelineInvoker) DefaultPomEnhancer(org.guvnor.common.services.project.backend.server.DefaultPomEnhancer) KieModuleRepositoriesServiceImpl(org.kie.workbench.common.services.backend.project.KieModuleRepositoriesServiceImpl) FileDiscoveryService(org.guvnor.common.services.backend.file.FileDiscoveryService) Role(org.jboss.errai.security.shared.api.Role) LRUPomModelCache(org.kie.workbench.common.services.backend.builder.core.LRUPomModelCache) BuildServiceHelper(org.kie.workbench.common.services.backend.builder.service.BuildServiceHelper) ModuleRepositoriesContentHandler(org.guvnor.common.services.project.backend.server.ModuleRepositoriesContentHandler) BuildHelper(org.kie.workbench.common.services.backend.builder.core.BuildHelper) DefaultPermissionTypeRegistry(org.uberfire.security.impl.authz.DefaultPermissionTypeRegistry) PermissionTypeRegistry(org.uberfire.security.authz.PermissionTypeRegistry) ModuleRepositoryResolverImpl(org.guvnor.common.services.project.backend.server.ModuleRepositoryResolverImpl) BuildServiceImpl(org.kie.workbench.common.services.backend.builder.service.BuildServiceImpl) BuildValidationHelper(org.guvnor.common.services.project.builder.service.BuildValidationHelper) Group(org.jboss.errai.security.shared.api.Group) CommentedOptionFactory(org.guvnor.common.services.backend.util.CommentedOptionFactory) User(org.jboss.errai.security.shared.api.identity.User) BuildService(org.guvnor.common.services.project.builder.service.BuildService) DefaultPomEnhancer(org.guvnor.common.services.project.backend.server.DefaultPomEnhancer) PomEnhancer(org.guvnor.common.services.project.backend.server.PomEnhancer) POMServiceImpl(org.guvnor.common.services.project.backend.server.POMServiceImpl) SessionInfo(org.uberfire.rpc.SessionInfo) PackageNameAllowListServiceImpl(org.kie.workbench.common.services.backend.allowlist.PackageNameAllowListServiceImpl) MetadataServiceImpl(org.guvnor.common.services.backend.metadata.MetadataServiceImpl) EventSourceMock(org.uberfire.mocks.EventSourceMock) ModuleRepositoriesService(org.guvnor.common.services.project.service.ModuleRepositoriesService) DependencyService(org.kie.workbench.common.services.shared.dependencies.DependencyService) BuildPipelineInitializer(org.kie.workbench.common.services.backend.builder.ala.BuildPipelineInitializer) URL(java.net.URL) SessionInfoImpl(org.uberfire.rpc.impl.SessionInfoImpl) MetadataService(org.guvnor.common.services.shared.metadata.MetadataService) InMemoryPipelineRegistry(org.guvnor.ala.registry.inmemory.InMemoryPipelineRegistry) PipelineRegistry(org.guvnor.ala.registry.PipelineRegistry) SaveAndRenameServiceImpl(org.uberfire.ext.editor.commons.backend.service.SaveAndRenameServiceImpl) IOService(org.uberfire.io.IOService) NewPackageEvent(org.guvnor.common.services.project.events.NewPackageEvent) PackageNameAllowListSaver(org.kie.workbench.common.services.backend.allowlist.PackageNameAllowListSaver) PackageNameAllowListService(org.kie.workbench.common.services.shared.allowlist.PackageNameAllowListService) BuildInfoService(org.kie.workbench.common.services.backend.builder.service.BuildInfoService) UserImpl(org.jboss.errai.security.shared.api.identity.UserImpl) DotNamedPermissionType(org.uberfire.security.impl.authz.DotNamedPermissionType) KModuleContentHandler(org.kie.workbench.common.services.backend.kmodule.KModuleContentHandler) PostBuildHandler(org.guvnor.common.services.project.builder.service.PostBuildHandler) RepositoryService(org.guvnor.structure.repositories.RepositoryService) LRUModuleDataModelOracleCache(org.kie.workbench.common.services.datamodel.backend.server.cache.LRUModuleDataModelOracleCache) Path(org.uberfire.backend.vfs.Path) InvalidateDMOModuleCacheEvent(org.guvnor.common.services.project.builder.events.InvalidateDMOModuleCacheEvent) LRUBuilderCache(org.kie.workbench.common.services.backend.builder.core.LRUBuilderCache) ModuleDataModelOracle(org.kie.soup.project.datamodel.oracle.ModuleDataModelOracle) ModuleSaver(org.kie.workbench.common.services.backend.project.ModuleSaver) RenameService(org.uberfire.ext.editor.commons.service.RenameService) InMemoryPipelineRegistry(org.guvnor.ala.registry.inmemory.InMemoryPipelineRegistry) POMService(org.guvnor.common.services.project.service.POMService) ConfigIOServiceProducer(org.uberfire.backend.server.io.ConfigIOServiceProducer) NewModuleEvent(org.guvnor.common.services.project.events.NewModuleEvent) DeploymentVerifier(org.kie.workbench.common.services.backend.builder.core.DeploymentVerifier) LRUDataModelOracleCache(org.kie.workbench.common.services.datamodel.backend.server.cache.LRUDataModelOracleCache) M2RepoServiceImpl(org.guvnor.m2repo.backend.server.M2RepoServiceImpl) DependencyServiceImpl(org.kie.workbench.common.services.backend.dependencies.DependencyServiceImpl) ProjectConfigurationContentHandler(org.guvnor.common.services.project.backend.server.ProjectConfigurationContentHandler) ModuleRepositoryResolver(org.guvnor.common.services.project.service.ModuleRepositoryResolver) DataModelService(org.kie.workbench.common.services.datamodel.backend.server.service.DataModelService) CommentedOptionFactoryImpl(org.guvnor.common.services.backend.util.CommentedOptionFactoryImpl) Test(org.junit.Test)

Aggregations

CommentedOptionFactory (org.guvnor.common.services.backend.util.CommentedOptionFactory)3 Test (org.junit.Test)3 IOException (java.io.IOException)2 IOUtils (org.apache.commons.io.IOUtils)2 Path (org.uberfire.backend.vfs.Path)2 IOService (org.uberfire.io.IOService)2 Iterables (com.google.common.collect.Iterables)1 InputStreamReader (java.io.InputStreamReader)1 URL (java.net.URL)1 Charset (java.nio.charset.Charset)1 ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 Collections (java.util.Collections)1 List (java.util.List)1 Predicate (java.util.function.Predicate)1 Collectors (java.util.stream.Collectors)1 Stream (java.util.stream.Stream)1 Assertions (org.assertj.core.api.Assertions)1 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)1 Definitions (org.eclipse.bpmn2.Definitions)1