Esempio n. 1
0
        public void mapFile(string fileToMap)
        {
            loadedFile = fileToMap;
            var validationXml = J2eeConfigFiles.getValidationXml(fileToMap);

            this.invokeOnThread(() => refreshTreeView(validationXml));

            //tableList_Forms.setDataTable(CreateDataTable.fromGenericList(validationXml.forms));

            /*tableList_FormBeans.setDataTable(CreateDataTable.fromGenericList(strutsConfigXml.formBeans));
             * tableList_GlobalForwards.setDataTable(CreateDataTable.fromDictionary_StringString(strutsConfigXml.globalForwards, "name", "path"));
             * tableList_ActionMappings.setDataTable(CreateDataTable.fromGenericList(strutsConfigXml.actionmappings));            */
            //lbDescription.Text = webXml.description;
            //lbDisplayName.Text = webXml.displayName;
            //tableList_Filter.setDataTable(CreateDataTable.fromGenericList(webXml.filters));
            //tableList_FilterMappings.setDataTable(CreateDataTable.fromGenericList(webXml.filterMappings));
            //tableList_Servlets.setDataTable(CreateDataTable.fromGenericList(webXml.servlets));
            //tableList_ServletMappings.setDataTable(CreateDataTable.fromGenericList(webXml.servletMappings));
        }
        public static IStrutsMappings calculateStrutsMapping(string webXmlFile, string strutsConfigFile, string tilesDefinitionsFile, string validationXmlFile)
        {
            var webXml = J2eeConfigFiles.getWebXml(webXmlFile);

            if (webXml == null)
            {
                return(null);
            }

            var tilesDefinitions = J2eeConfigFiles.getTilesDefinitionXml(tilesDefinitionsFile);

            var validation = J2eeConfigFiles.getValidationXml(validationXmlFile);

            var strutsConfig = J2eeConfigFiles.getStrutsConfig(strutsConfigFile, tilesDefinitions, validation);

            if (strutsConfig == null)
            {
                return(null);
            }


            return(calculateStrutsMapping(webXml, strutsConfig));
        }