@Test public void setCollectionEditorStructureData_ManageListDMN() { when(factMappingMock.getExpressionAlias()).thenReturn(LIST_CLASS_NAME); when(factMappingMock.getClassName()).thenReturn(LIST_CLASS_NAME); settingsLocal.setType(DMN); setCollectionEditorStructureData(); }
protected void setCollectionEditorStructureData(CollectionViewImpl collectionEditorView, FactMapping factMapping) { String propertyClass = factMapping.getClassName(); String className = factMapping.getFactAlias(); String propertyName = factMapping.getExpressionAlias(); List<String> genericTypes = factMapping.getGenericTypes(); if (propertyClass == null || className == null || propertyName == null || genericTypes == null || genericTypes.isEmpty()) { throw new IllegalStateException("Missing required properties inside FactMapping"); } String key = className + "#" + propertyName; String genericTypeName0 = genericTypes.get(0); if (RULE.equals(scenarioSimulationContext.getSettings().getType()) && !isSimpleJavaType(genericTypeName0)) { genericTypeName0 = getRuleComplexType(genericTypeName0); } if (ScenarioSimulationSharedUtils.isList(propertyClass)) { manageList(collectionEditorView, key, genericTypeName0, scenarioSimulationContext.getSettings().getType()); } else { manageMap(collectionEditorView, key, genericTypeName0, genericTypes.get(1), scenarioSimulationContext.getSettings().getType()); } }
CollectionEditorSingletonDOMElementFactory extends BaseSingletonDOMElementFactory<String, CollectionViewImpl, CollectionEditorDOMElement> { protected void setCollectionEditorStructureData(CollectionViewImpl collectionEditorView, FactMapping factMapping) { String propertyClass = factMapping.getClassName(); String className = factMapping.getFactAlias(); String propertyName = factMapping.getExpressionAlias(); List<String> genericTypes = factMapping.getGenericTypes(); if (propertyClass == null || className == null || propertyName == null || genericTypes == null || genericTypes.isEmpty()) { throw new IllegalStateException("Missing required properties inside FactMapping"); } String key = className + "#" + propertyName; String genericTypeName0 = genericTypes.get(0); if (RULE.equals(scenarioSimulationContext.getSettings().getType()) && !isSimpleJavaType(genericTypeName0)) { genericTypeName0 = getRuleComplexType(genericTypeName0); } if (ScenarioSimulationSharedUtils.isList(propertyClass)) { manageList(collectionEditorView, key, genericTypeName0, scenarioSimulationContext.getSettings().getType()); } else { manageMap(collectionEditorView, key, genericTypeName0, genericTypes.get(1), scenarioSimulationContext.getSettings().getType()); } } }
CollectionEditorSingletonDOMElementFactory extends BaseSingletonDOMElementFactory<String, CollectionViewImpl, CollectionEditorDOMElement> { protected void setCollectionEditorStructureData(CollectionViewImpl collectionEditorView, FactMapping factMapping) { String propertyClass = factMapping.getClassName(); String className = factMapping.getFactAlias(); String propertyName = factMapping.getExpressionAlias(); List<String> genericTypes = factMapping.getGenericTypes(); if (propertyClass == null || className == null || propertyName == null || genericTypes == null || genericTypes.isEmpty()) { throw new IllegalStateException("Missing required properties inside FactMapping"); } String key = className + "#" + propertyName; String genericTypeName0 = genericTypes.get(0); if (RULE.equals(scenarioSimulationContext.getSettings().getType()) && !isSimpleJavaType(genericTypeName0)) { genericTypeName0 = getRuleComplexType(genericTypeName0); } if (ScenarioSimulationSharedUtils.isList(propertyClass)) { manageList(collectionEditorView, key, genericTypeName0, scenarioSimulationContext.getSettings().getType()); } else { manageMap(collectionEditorView, key, genericTypeName0, genericTypes.get(1), scenarioSimulationContext.getSettings().getType()); } } CollectionEditorSingletonDOMElementFactory(final GridLienzoPanel gridPanel,
                                                      final GridLayer gridLayer,
                                                      final GridWidget gridWidget,
                                                      final ScenarioSimulationContext scenarioSimulationContext,
                                                      final ViewsProvider viewsProvider); }
CollectionEditorSingletonDOMElementFactory extends BaseSingletonDOMElementFactory<String, CollectionViewImpl, CollectionEditorDOMElement> { protected void setCollectionEditorStructureData(CollectionViewImpl collectionEditorView, FactMapping factMapping) { String propertyClass = factMapping.getClassName(); String className = factMapping.getFactAlias(); String propertyName = factMapping.getExpressionAlias(); List<String> genericTypes = factMapping.getGenericTypes(); if (propertyClass == null || className == null || propertyName == null || genericTypes == null || genericTypes.isEmpty()) { throw new IllegalStateException("Missing required properties inside FactMapping"); } String key = className + "#" + propertyName; String genericTypeName0 = genericTypes.get(0); if (RULE.equals(scenarioSimulationContext.getSettings().getType()) && !isSimpleJavaType(genericTypeName0)) { genericTypeName0 = getRuleComplexType(genericTypeName0); } if (ScenarioSimulationSharedUtils.isList(propertyClass)) { manageList(collectionEditorView, key, genericTypeName0, scenarioSimulationContext.getSettings().getType()); } else { manageMap(collectionEditorView, key, genericTypeName0, genericTypes.get(1), scenarioSimulationContext.getSettings().getType()); } } CollectionEditorSingletonDOMElementFactory(final GridLienzoPanel gridPanel,
                                                      final GridLayer gridLayer,
                                                      final GridWidget gridWidget,
                                                      final ScenarioSimulationContext scenarioSimulationContext,
                                                      final ViewsProvider viewsProvider); @Override CollectionViewImpl createWidget(); @Override CollectionEditorDOMElement createDomElement(final GridLayer gridLayer,
                                                       final GridWidget gridWidget); @Override CollectionEditorDOMElement createDomElementInternal(final CollectionViewImpl collectionEditorView,
                                                               final GridLayer gridLayer,
                                                               final GridWidget gridWidget); @Override void registerHandlers(final CollectionViewImpl widget, final CollectionEditorDOMElement widgetDomElement); }
CollectionEditorSingletonDOMElementFactory extends BaseSingletonDOMElementFactory<String, CollectionViewImpl, CollectionEditorDOMElement> { protected void setCollectionEditorStructureData(CollectionViewImpl collectionEditorView, FactMapping factMapping) { String propertyClass = factMapping.getClassName(); String className = factMapping.getFactAlias(); String propertyName = factMapping.getExpressionAlias(); List<String> genericTypes = factMapping.getGenericTypes(); if (propertyClass == null || className == null || propertyName == null || genericTypes == null || genericTypes.isEmpty()) { throw new IllegalStateException("Missing required properties inside FactMapping"); } String key = className + "#" + propertyName; String genericTypeName0 = genericTypes.get(0); if (RULE.equals(scenarioSimulationContext.getSettings().getType()) && !isSimpleJavaType(genericTypeName0)) { genericTypeName0 = getRuleComplexType(genericTypeName0); } if (ScenarioSimulationSharedUtils.isList(propertyClass)) { manageList(collectionEditorView, key, genericTypeName0, scenarioSimulationContext.getSettings().getType()); } else { manageMap(collectionEditorView, key, genericTypeName0, genericTypes.get(1), scenarioSimulationContext.getSettings().getType()); } } CollectionEditorSingletonDOMElementFactory(final GridLienzoPanel gridPanel,
                                                      final GridLayer gridLayer,
                                                      final GridWidget gridWidget,
                                                      final ScenarioSimulationContext scenarioSimulationContext,
                                                      final ViewsProvider viewsProvider); @Override CollectionViewImpl createWidget(); @Override CollectionEditorDOMElement createDomElement(final GridLayer gridLayer,
                                                       final GridWidget gridWidget); @Override CollectionEditorDOMElement createDomElementInternal(final CollectionViewImpl collectionEditorView,
                                                               final GridLayer gridLayer,
                                                               final GridWidget gridWidget); @Override void registerHandlers(final CollectionViewImpl widget, final CollectionEditorDOMElement widgetDomElement);  }