diff --git a/src/de/memtext/util/FileUtils.java b/src/de/memtext/util/FileUtils.java index 90003c2..3e598bf 100644 --- a/src/de/memtext/util/FileUtils.java +++ b/src/de/memtext/util/FileUtils.java @@ -2,12 +2,15 @@ package de.memtext.util; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; +import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.StringWriter; import java.net.URL; import java.net.URLConnection; import java.util.Iterator; @@ -289,4 +292,34 @@ public class FileUtils { } return resultFiles; } + public static String getFileContentsWithEncoding(String filePath, String encoding) throws FileNotFoundException,IOException { + File f = new File(filePath); + + String fileContents = ""; + if (encoding == null || encoding.trim().equals("")) { + encoding = System.getProperty("file.encoding"); + } + // --- IputStream und OutputStream generieren ---// + FileInputStream fis = new FileInputStream(f); + // Wenn Quelldatei Unicode, dann speziellen Reader nutzen + BufferedReader in; + //BufferedReader ist schneller bei großen Dateien + in = new BufferedReader(new InputStreamReader(fis, encoding)); + // --- Output-Stream der temporären Datei erzeugen ---// + StringWriter out = new StringWriter(); + // --- Verarbeiten der Datei ---// + String text; + text = in.readLine(); + while (text != null) { // Datei nicht leer + out.write(text); + out.write(System.getProperty("line.separator")); + text = in.readLine(); + } + if (!(out == null)) { + fileContents = out.toString(); + } + + return fileContents; + } + } \ No newline at end of file diff --git a/src/de/superx/servlet/RequestParameter.java b/src/de/superx/servlet/RequestParameter.java new file mode 100644 index 0000000..3d47297 --- /dev/null +++ b/src/de/superx/servlet/RequestParameter.java @@ -0,0 +1,434 @@ +package de.superx.servlet; + + +public enum RequestParameter{ + + /** + * zeige login + */ + showlogin(null), + /** + * + */ + tid(null), + /** + * + */ + navi(null), + /** + * + */ + cachingcontrol(null), + /** + * + */ + token(null), + /** + * + */ + kennung(null), + /** + * + */ + passwort(null), + /** + * + */ + param(null), + /** + * + */ + runSQL(null), + /** + * + */ + action(null), + /** + * + */ + field(null), + /** + * + */ + id(null), + /** + * + */ + keyfieldsused(null), + /** + * + */ + contenttype(null), + /** + * + */ + irowno(null), + /** + * + */ + colset(null), + /** + * + */ + colsort(null), + /** + * + */ + stylesheet(null), + /** + * + */ + usetreetable(null), + /** + * + */ + backlink(null), + /** + * + */ + MandantenID(null), + /** + * + */ + query(null), + /** + * + */ + showlastsqlxml(null), + /** + * + */ + Entwicklungsmodus(null), + /** + * + */ + pfad(null), + /** + * + */ + alt_redirect_url(null), + /** + * + */ + start_applet(null), + /** + * + */ + redirect(null), + /** + * zeigt hauptseite + */ + show_main_page(null), + /** + * + */ + accepted(null), + /** + * + */ + user_specific(null), + /** + * + */ + requestedServlet(null), + /** + * + */ + getXML_(null), + /** + * + */ + altes_passwort(null), + /** + * + */ + passwort2(null), + /** + * + */ + getKidRows(null), + /** + * + */ + getchart(null), + /** + * + */ + getDynChart(null), + /** + * + */ + csvupload(null), + /** + * + */ + reuseresult(null), + /** + * + */ + encrypt(null), + /** + * + */ + preparedxmlnotolderthan(null), + /** + * + */ + preparedxmlfileappendix(null), + /** + * + */ + preparedxmlencrypted(null), + /** + * + */ + Statistikexport(null), + /** + * + */ + maxoffset(null), + /** + * + */ + openHeader(null), + /** + * + */ + closeHeader(null), + /** + * + */ + encrypted(null), + /** + * + */ + jr_template(null), + /** + * + */ + offset(null), + /** + * + */ + Tabelle(null), + /** + * + */ + Trennzeichen(null), + /** + * + */ + Kodierung(null), + /** + * + */ + Modus(null), + /** + * + */ + tmpfile(null), + /** + * + */ + treetableid(null), + /** + * + */ + locale(null), + /** + * + */ + login(null), + /** + * + */ + checkFor(null), + /** + * + */ + maxRows(null), + /** + * + */ + maxOffset(null), + /** + * + */ + SuperXmlTabelle(null), + /** + * + */ + dokettlejob(null), + /** + * + */ + bigexcel(null), + /** + * + */ + title(null), + /** + * + */ + maxRowsOrganigramm(null), + /** + * + */ + SuperXmlMaske(null), + /** + * + */ + user(null), + /** + * + */ + clazz("class"), + /** + * + */ + xupdater(null), + /** + * + */ + referer_start(null), + /** + * + */ + zukünftigerStandErlaubt(null), + /** + * + */ + xml_return_link(null), + /** + * + */ + last_sql_extra_page(null), + /** + * + */ + xsl_processor(null), + /** + * + */ + sharedSecret(null), + /** + * + */ + defaultMaskXsl(null), + /** + * + */ + defaultTableHtmlXsl(null), + /** + * + */ + defaultTableXlsXsl(null), + /** + * + */ + defaultTablePdfXsl(null), + /** + * + */ + field1Cache(null), + /** + * + */ + isResponseCompressionWanted(null), + /** + * + */ + sichtenCaching(null), + /** + * + */ + noSessionFieldDefaults(null), + /** + * + */ + select_(null), + /** + * + */ + Exportformat(null), + /** + * + */ + statdir(null), + /** + * + */ + Lieferung(null), + /** + * + */ + berichtssemester(null), + /** + * + */ + Prüfstufe(null), + /** + * + */ + Plausibilisierung(null), + /** + * + */ + stand(null), + /** + * + */ + Hochschulstandort(null), + /** + * + */ + Vorname("Vorname (Melder)"), + /** + * + */ + Nachname("Nachname (Melder)"), + /** + * + */ + Kennung(null), + /** + * + */ + cNField("className.Field"), + /** + * + */ + cNTable("className.Table"), + /** + * + */ + cNQuery("className.Query"), + /** + * + */ + cNForeignKey("className.ForeignKey"), + /** + * + */ + cNReference("className.Reference"), + /** + * + */ + configurationStr("log4j.configuration") + ; + + private String parameterString; + + private RequestParameter (String name) { + this.parameterString = name; + } + + public String toString() { + if (parameterString == null) { + return super.toString(); + } + return parameterString; + } + + +} \ No newline at end of file diff --git a/src/de/superx/servlet/SuperXmlTabelle.java b/src/de/superx/servlet/SuperXmlTabelle.java index 4a3aa2d..703e896 100644 --- a/src/de/superx/servlet/SuperXmlTabelle.java +++ b/src/de/superx/servlet/SuperXmlTabelle.java @@ -1827,8 +1827,24 @@ public class SuperXmlTabelle extends AbstractSuperXServlet { { transformer.setParameter("seitenbreite", "1191"); transformer.setParameter("seitenhoehe", "842"); - } + } transformer.transform(new javax.xml.transform.stream.StreamSource(s1), new javax.xml.transform.stream.StreamResult(myOutwriter)); + if(rptContentype.equals("text/xml")) { + //JRXML-Sourcecode + String filename_extension=".jrxml"; + OutputStream out = response.getOutputStream(); + // open browser download dialogue + response.setHeader("Content-disposition", "attachment; filename=" + FileUtils.removeProblemChars(maske.getName()) + filename_extension); + response.setHeader("Cache-Control", "expires=0"); + + String jrxmlFileContent = de.memtext.util.FileUtils.getFileContentsWithEncoding(jrxmlFilePath, SqlStringUtils.getEncoding()); + byte[] myBytes = jrxmlFileContent.getBytes(SqlStringUtils.getEncoding()); + response.setContentLength(myBytes.length); + out.write(myBytes); + } + + else + { JasperCreator jc = new JasperCreator( request, response, @@ -1859,7 +1875,9 @@ public class SuperXmlTabelle extends AbstractSuperXServlet { + tutil.getSinceStart()); - } catch (JRException e) { + } //Wenn kein JRXML-Quellcode + } + catch (JRException e) { System.err.println("Fehler bei JasperReport-Erzeugung "+ e.toString()); } diff --git a/superx/WEB-INF/conf/edustore/db/install/conf/kern.xml b/superx/WEB-INF/conf/edustore/db/install/conf/kern.xml index 696b582..6b4e23f 100644 --- a/superx/WEB-INF/conf/edustore/db/install/conf/kern.xml +++ b/superx/WEB-INF/conf/edustore/db/install/conf/kern.xml @@ -1,11 +1,11 @@ - + in sx_tables_fuellen.sql genutzt --> @@ -2385,6 +2385,22 @@ notnull="false" description="Generisches Stylesheet"> Wird nur für Ergebnistabellen ausgewertet, nicht für Masken-Stylesheets. Wenn 1, dann ist das Stylesheet für alle Ergebnistabellen nutzbar + + Pfad relativ zu webapps/superx + + + Welche Ergebniszeilen soll das Stylesheet verarbeiten. S=Nur Schema, T=Aktuelle Baumstruktur,A=Alle Daten + + + XSL,JRXML,XSL_JRXML,XSL_FO,XML,NATIVE,XLSX + + + Wird nur bei JR ausgewertet. Mögliche Werte: RS,XMLSOURCE + @@ -2453,6 +2469,39 @@ + + + + + + + + + + + + + + + + superx + superx + sx_stylesheet_param + tid + 1 + c_stylesheet_param + + + + +
@@ -7783,6 +7832,31 @@ where dimension_bp_id=(select D.tid from dimension_bp D where D.apnr='bluep_absc displayType="select" visibleFields="filename" format="%s"> + + + + + + + + + + + + + + + + + + + + @@ -9866,6 +9940,10 @@ mode="full"> + + + +
+ +
+In diesem Formular können Sie Stylesheet-Parameter bearbeiten. + +tid + + + + + + + + + +
+In diesem Formular können Sie Stylesheet-Parameter bearbeiten. + +stylesheet_id + + + + + diff --git a/superx/WEB-INF/conf/edustore/db/install/schluesseltabellen/release_unloads/menu_element.unl b/superx/WEB-INF/conf/edustore/db/install/schluesseltabellen/release_unloads/menu_element.unl index 2a989c3..2562c8d 100644 --- a/superx/WEB-INF/conf/edustore/db/install/schluesseltabellen/release_unloads/menu_element.unl +++ b/superx/WEB-INF/conf/edustore/db/install/schluesseltabellen/release_unloads/menu_element.unl @@ -8,7 +8,7 @@ 13^Feldtyp^date^date^date^^ 34^Feldtyp^decimal^decimal^^^ 35^orgstruktur^40^Institut^^^ -36^contenttype^text/html^Normale html-Datei^^^ +36^contenttype^text/html^HTML-Datei^^^ 37^stylesheet-relation^table^Stylesheet für eine Ergebnistabelle^^^ 38^stylesheet-relation^mask^Stylesheet für eine Maske^^^ 39^useragent^Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624^Mozilla 1.5 für Linux^^^ @@ -54,11 +54,30 @@ 70^group_field_pref^hidden^Versteckt^1^^ 72^Feldart^19^19-Datei-Upload^^Dateiupload für CSV-/Excel-/TEXT-Dateien^ 77^contenttype^application/pdf^PDF-Datei^^^ -78^contenttype^application/vnd.ms-excel^XLS-Datei^^^ +78^contenttype^application/vnd.ms-excel^XLS-Datei (obsolet)^^^ 79^contenttype^application/vnd.openxmlformats-officedocument.spreadsheetml.sheet^XLSX-Datei^^^ 80^contenttype^application/vnd.openxmlformats-officedocument.wordprocessingml.document^DOCX-Datei^^^ 81^contenttype^application/vnd.oasis.opendocument.text^ODT-Datei^^^ 82^contenttype^application/vnd.oasis.opendocument.spreadsheet^ODS-Datei^^^ +82^contenttype^application/jrxml^JRXML-Datei^^^ +99^contenttype^text/plain^TEXT-Datei (plain)^^^ +100^contenttype^text/xml^XML-Datei^^^ +101^contenttype^text/xhtml^XHTML-Datei^^^ +102^contenttype^text/txt^TXT-Datei^^^ 83^Feldart^18^18-Link auf weitere Einstellungen^^^ 84^Frontend^3^Angular+XML^^^ 85^Frontend^4^Angular^^^ +86^Feldart^21^21-Zeitraum, Datum von-bis^^^ +87^stylesheet_type^XSL^XSL-Stylesheet^^^ +88^stylesheet_type^JRXML^JasperReport Template^^^ +89^stylesheet_type^XSL_JRXML^XSL-zu-JasperReport^^^ +90^stylesheet_type^XSL_FO^XSL-zu-FO-Stylesheet^^^ +91^stylesheet_type^NATIVE^Download Bereich (keine Transf.)^^^ +92^stylesheet_type^XSL_XLSX^XSL-zu-POI-Stylesheet^^^ +103^stylesheet_type^XSL_CSV^XSL-zu-CSV-Stylesheet^^^ +104^stylesheet_type^XML^XML (direkter Download, ohne Transformation)^^^ +93^usage_resultset_data^S^Keine Daten (nur Schema)^^^ +94^usage_resultset_data^T^Aktueller Ausgabebaum^^^ +95^usage_resultset_data^A^Alle Daten^^^ +96^jr_datasource^RS^Java-Resultset vom Servlet^^^ +97^jr_datasource^XML^XML-Resultset vom Servlet^^^ diff --git a/superx/WEB-INF/conf/edustore/db/install/schluesseltabellen/sx_stylesheet_tabelle_jrxml_einfuegen.sql b/superx/WEB-INF/conf/edustore/db/install/schluesseltabellen/sx_stylesheet_tabelle_jrxml_einfuegen.sql deleted file mode 100755 index 0d7dc31..0000000 --- a/superx/WEB-INF/conf/edustore/db/install/schluesseltabellen/sx_stylesheet_tabelle_jrxml_einfuegen.sql +++ /dev/null @@ -1,178 +0,0 @@ ---Freemarker Template ---Achtung: Macro fügt Inhalte ein ---Bitte nur Freemarker Variablen füllen - -<#assign masken = [ -] /> - -<#assign stylesheet = [ -{"filename":"tabelle_jrxml_a4_quer.xsl", -"caption":"Gener. Standardlayout JR (A4 quer)", -"description":"Gener. Standardlayout JR (A4 quer)", -"relation":"table", -"contenttype":"text/xml", -"is_generic":"1" -}, -{"filename":"viz_rpt_assistent.xsl", -"caption":"Berichtsassistent", -"description":"Export als formatierter Bericht", -"relation":"table", -"contenttype":"text/html", -"is_generic":"1"} -] /> - -<#assign stylesheet_field = [ - - -] /> - ---Hier eventuell notwendige delete's auf die Tabellen sx_mask_style, sx_stylesheets oder stylesheet_field einfügen. - ---Achtung: ab hier nicht ändern, Mutterdatei ist $SUPERX_DIR/db/module/sos/schluesseltabellen/sx_stylesheets_fuellen.sql - <@sx_stylesheets_insert -m_masken=masken -m_stylesheet=stylesheet -m_stylesheet_field=stylesheet_field -/> - - -<#macro sx_stylesheets_insert m_masken m_stylesheet m_stylesheet_field> - ---Sicherstellen, dass keine Duplikate vorkommen: ---#################################################################################################### -<#foreach column in m_masken> -delete from sx_mask_style where maskeninfo_id=${column.mask} and stylesheet_id in (select tid from sx_stylesheets where filename ='${column.filename}') and ord=${column.ord}; - - -<#foreach column in m_stylesheet_field> -delete from stylesheet_field where stylesheet_id in (select tid from sx_stylesheets where filename ='${column.filename}'); - - - - - --- Stylesheets füllen ---#################################################################################################### -create temp table tmp_stylesheets ( -tid serial not null, -filename CHAR(255) , -caption CHAR(255) , -description CHAR(255) , -relation CHAR(10) , -useragent CHAR(255) , -contenttype CHAR(200) , -is_generic smallint -); - -create temp table tmp_hilf (tid integer); -insert into tmp_hilf select max(tid) from sx_stylesheets; -update tmp_hilf set tid=1 where tid is null; - -<#assign counter_tid = 1 /> -<#foreach column in m_stylesheet> -insert into tmp_stylesheets (tid,filename,caption,description,relation,contenttype,is_generic) -select max(tid)+${counter_tid},'${column.filename}', -'${column.caption}', - '${column.description}', - '${column.relation}', -'${column.contenttype}', -${column.is_generic} -from tmp_hilf; -<#assign counter_tid = counter_tid + 1 /> - - -<#if TableFieldExists?exists && TableFieldExists('sx_stylesheets','is_generic')> -update sx_stylesheets set is_generic=1 -where filename in (select T.filename from tmp_stylesheets T where T.is_generic=1); - - - ---delete für tml_stylesheets hinzugefügt #ak 06.03.2013 -delete from tmp_stylesheets where filename in (select filename from sx_stylesheets); - - -insert into sx_stylesheets (tid, -filename, caption, description, relation, useragent, contenttype -<#if TableFieldExists?exists && TableFieldExists('sx_stylesheets','is_generic')> -,is_generic - -) -SELECT tid, filename, caption, description, relation, useragent, contenttype -<#if TableFieldExists?exists && TableFieldExists('sx_stylesheets','is_generic')> -,is_generic - -FROM tmp_stylesheets; - -drop table tmp_stylesheets; - - --- Mask Style füllen ---#################################################################################################### -create temp table tmp_mask_style ( -tid serial not null, -maskeninfo_id INTEGER , -stylesheet_id INTEGER , -ord SMALLINT, -filename char(255) -); - -delete from tmp_hilf; -insert into tmp_hilf select max(tid) from sx_mask_style; -update tmp_hilf set tid=1 where tid is null; - -<#assign counter_tid = 1 /> -<#foreach column in m_masken> -insert into tmp_mask_style (tid,maskeninfo_id,ord,filename) -select max(tid)+${counter_tid},${column.mask},${column.ord},'${column.filename}' from tmp_hilf; - -update tmp_mask_style set stylesheet_id=(select max(tid) from sx_stylesheets where filename='${column.filename}') -where filename='${column.filename}'; -<#assign counter_tid = counter_tid + 1 /> - - -insert into sx_mask_style ( tid, maskeninfo_id, stylesheet_id, ord) -SELECT tid, maskeninfo_id, stylesheet_id, ord -FROM tmp_mask_style; - -drop table tmp_mask_style; - - ---Field zu Stylesheet Zuordnungen: ---#################################################################################################### -CREATE temp TABLE tmp_stylesheet_field -( -tid serial NOT NULL, -stylesheet_id INTEGER, -tablename char(255), -fieldname char(255), -filename char(255) -); - -delete from tmp_hilf; -insert into tmp_hilf select max(tid) from stylesheet_field; -update tmp_hilf set tid=1 where tid is null; - -<#assign counter_tid = 1 /> -<#foreach column in m_stylesheet_field> -INSERT INTO tmp_stylesheet_field (tid, filename, tablename, fieldname) -select max(tid)+${counter_tid}, '${column.filename}', '${column.tablename}', '${column.fieldname}' from tmp_hilf; - -update tmp_stylesheet_field set stylesheet_id=(select max(tid) from sx_stylesheets where filename='${column.filename}') -where filename='${column.filename}'; -<#assign counter_tid = counter_tid + 1 /> - - -insert into stylesheet_field ( tid, stylesheet_id, tablename, fieldname) -SELECT tid, stylesheet_id, tablename, fieldname -FROM tmp_stylesheet_field; - -drop table tmp_stylesheet_field; -drop table tmp_hilf; - -<#if SQLdialect='Postgres'> -select sp_update_sequence('sx_stylesheets'); -select sp_update_sequence('sx_mask_style'); -select sp_update_sequence('stylesheet_field'); - - - diff --git a/superx/WEB-INF/conf/edustore/db/install/schluesseltabellen/sx_stylesheets_fuellen.sql b/superx/WEB-INF/conf/edustore/db/install/schluesseltabellen/sx_stylesheets_fuellen.sql index 25df1e1..9f8347d 100755 --- a/superx/WEB-INF/conf/edustore/db/install/schluesseltabellen/sx_stylesheets_fuellen.sql +++ b/superx/WEB-INF/conf/edustore/db/install/schluesseltabellen/sx_stylesheets_fuellen.sql @@ -11,22 +11,157 @@ ] /> <#assign stylesheet = [ -{"filename":"tabelle_html.xsl", "caption":"Generisches Standardlayout", "description":"Generisch", "relation":"table", "contenttype":"text/html", "is_generic":"1"}, -{"filename":"tabelle_html_datenblatt.xsl", "caption":"Generisches Standardlayout Datenblätter", "description":"Generisch", "relation":"table", "contenttype":"text/html", "is_generic":"1"}, -{"filename":"tabellenfeld_bearbeiten.xsl", "caption":"Generisches Standardlayout für Editierung", "description":"Generisch", "relation":"table", "contenttype":"text/html", "is_generic":"0"}, -{"filename":"maske_html.xsl", "caption":"Generisches Standardlayout", "description":"Generisch", "relation":"mask", "contenttype":"text/html", "is_generic":"0"}, -{"filename":"maske_html_tabfeld.xsl", "caption":"Generisches Standardlayout für Editierung", "description":"Generisch", "relation":"mask", "contenttype":"text/html", "is_generic":"0"}, -{"filename":"tabelle_fo_rtf.xsl", "caption":"RTF", "description":"Export in Textverarbeitung", "relation":"table", "contenttype":"application/msword", "is_generic":"1"}, -{"filename":"tabelle_fo_pdf.xsl", "caption":"PDF", "description":"Export in PDF (Adobe)", "relation":"table", "contenttype":"application/pdf", "is_generic":"1"}, -{"filename":"tabelle_html_p.xsl", "caption":"HTML (Druckversion)", "description":"HTML Druckversion", "relation":"table", "contenttype":"text/html", "is_generic":"1"}, -{"filename":"tabelle_xml.xsl", "caption":"XML", "description":"Export XML", "relation":"table", "contenttype":"text/xml", "is_generic":"1"}, -{"filename":"tabelle_xls.xsl", "caption":"XLS", "description":"Export in XLSX (MS Excel)", "relation":"table", "contenttype":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "is_generic":"1"}, -{"filename":"tabelle_html_csv_upload.xsl", "caption":"CSV Upload", "description":"Upload mit CSV", "relation":"table", "contenttype":"text/html", "is_generic":"0"}, -{"filename":"tabelle2jasperreport_legende_subreport.xsl", "caption":"Export als JasperReport-Template (Legende)", "description":"Layoutvorlage für JasperReports (Legende als Subreport)", "relation":"table", "contenttype":"application/jrxml", "is_generic":"0"}, -{"filename":"tabelle2jasperreport_generic.xsl", "caption":"Export als JasperReport-Template", "description":"Layoutvorlage für JasperReports", "relation":"table", "contenttype":"application/jrxml", "is_generic":"1"}, -{"filename":"tabelle_xml_mondrian3.xsl", "caption":"Export als Mondrian Schema V3", "description":"Export als Mondrian Schema V3", "relation":"table", "contenttype":"text/xml", "is_generic":"0"}, -{"filename":"tabelle_xml_mondrian4.xsl", "caption":"Export als Mondrian Schema V4", "description":"Export als Mondrian Schema V4", "relation":"table", "contenttype":"text/xml", "is_generic":"0"}, -{"filename":"tabelle_mediawiki.xsl", "caption":"Export als Mediawiki-Quellcode", "description":"Export als Mediawiki-Quellcode", "relation":"table", "contenttype":"application/wiki", "is_generic":"1"} +{"filename":"tabelle_html.xsl", + "caption":"Generisches Standardlayout", + "description":"Generisch", + "relation":"table", + "contenttype":"text/html", + "is_generic":"1", + "toolbar_icon_filepath":"../images/icons/html.svg", +"stylesheet_type":"XSL", +"usage_resultset_data":"T", +"jr_datasource":""}, +{"filename":"tabelle_html_datenblatt.xsl", + "caption":"Generisches Standardlayout Datenblätter", + "description":"Generisch", + "relation":"table", + "contenttype":"text/html", + "is_generic":"1", + "toolbar_icon_filepath":"../images/icons/html.svg", +"stylesheet_type":"XSL", +"usage_resultset_data":"T", +"jr_datasource":""}, +{"filename":"maske_html.xsl", + "caption":"Generisches Standardlayout", + "description":"Generisch", + "relation":"mask", + "contenttype":"text/html", + "is_generic":"0", + "toolbar_icon_filepath":"", +"stylesheet_type":"XSL", +"usage_resultset_data":"", +"jr_datasource":""}, +{"filename":"maske_html_tabfeld.xsl", + "caption":"Generisches Standardlayout für Editierung", + "description":"Generisch", + "relation":"mask", + "contenttype":"text/html", + "is_generic":"0", + "toolbar_icon_filepath":"", +"stylesheet_type":"XSL", +"usage_resultset_data":"", +"jr_datasource":""}, +{"filename":"tabelle_fo_rtf.xsl", + "caption":"RTF", + "description":"Export in Textverarbeitung", + "relation":"table", + "contenttype":"application/msword", + "is_generic":"0", + "toolbar_icon_filepath":"", +"stylesheet_type":"XSL_FO", +"usage_resultset_data":"T", +"jr_datasource":""}, +{"filename":"tabelle_fo_pdf.xsl", + "caption":"PDF", + "description":"Export in PDF (Adobe)", + "relation":"table", + "contenttype":"application/pdf", + "is_generic":"1", + "toolbar_icon_filepath":"../images/icons/page_white_width_acrobat.svg", +"stylesheet_type":"XSL_FO", +"usage_resultset_data":"T", +"jr_datasource":""}, +{"filename":"tabelle_html_p.xsl", + "caption":"HTML (Druckversion)", + "description":"HTML Druckversion", + "relation":"table", + "contenttype":"text/html", + "is_generic":"1", + "toolbar_icon_filepath":"../images/icons/html.svg", + +"stylesheet_type":"XSL", +"usage_resultset_data":"T", +"jr_datasource":""}, +{"filename":"tabelle_xml.xsl", + "caption":"XML", + "description":"Export XML", + "relation":"table", + "contenttype":"text/xml", + "is_generic":"1", + "toolbar_icon_filepath":"../images/icons/page_white_code.svg", +"stylesheet_type":"XML", +"usage_resultset_data":"T", +"jr_datasource":""}, +{"filename":"tabelle_xls.xsl", + "caption":"XLS", + "description":"Export in XLSX (MS Excel)", + "relation":"table", + "contenttype":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + "is_generic":"1", + "toolbar_icon_filepath":"page_white_excel.svg", + "stylesheet_type":"XSL_XLSX", +"usage_resultset_data":"T", +"jr_datasource":""}, +{"filename":"tabelle_html_csv_upload.xsl", + "caption":"CSV Upload", + "description":"Upload mit CSV", + "relation":"table", + "contenttype":"text/html", + "is_generic":"0", + "toolbar_icon_filepath":"", + "stylesheet_type":"XSL", +"usage_resultset_data":"T", +"jr_datasource":""}, +{"filename":"tabelle2jasperreport_legende_subreport.xsl", + "caption":"Export als JasperReport-Template (Legende)", + "description":"Layoutvorlage für JasperReports (Legende als Subreport)", + "relation":"table", + "contenttype":"application/jrxml", + "is_generic":"0", + "toolbar_icon_filepath":"", + "stylesheet_type":"XSL", +"usage_resultset_data":"T", +"jr_datasource":""}, +{"filename":"tabelle2jasperreport_generic.xsl", + "caption":"Export als JasperReport-Template", + "description":"Layoutvorlage für JasperReports", + "relation":"table", + "contenttype":"application/jrxml", + "is_generic":"1", + "toolbar_icon_filepath":"", + "stylesheet_type":"XSL", +"usage_resultset_data":"T", +"jr_datasource":""}, +{"filename":"tabelle_xml_mondrian3.xsl", + "caption":"Export als Mondrian Schema V3", + "description":"Export als Mondrian Schema V3", + "relation":"table", + "contenttype":"text/xml", + "is_generic":"0", + "toolbar_icon_filepath":"", + "stylesheet_type":"XSL", +"usage_resultset_data":"S", +"jr_datasource":""}, +{"filename":"tabelle_xml_mondrian4.xsl", + "caption":"Export als Mondrian Schema V4", + "description":"Export als Mondrian Schema V4", + "relation":"table", + "contenttype":"text/xml", + "is_generic":"0", + "toolbar_icon_filepath":"", +"stylesheet_type":"XSL", +"usage_resultset_data":"S", +"jr_datasource":""}, +{"filename":"tabelle_mediawiki.xsl", + "caption":"Export als Mediawiki-Quellcode", + "description":"Export als Mediawiki-Quellcode", + "relation":"table", + "contenttype":"text/plain", + "is_generic":"1", + "toolbar_icon_filepath":"", + "stylesheet_type":"XSL", +"usage_resultset_data":"T", +"jr_datasource":""} ] /> <#assign stylesheet_field = [ @@ -35,8 +170,31 @@ --Hier eventuell notwendige updates/delete's auf die Tabellen sx_mask_style, sx_stylesheets oder stylesheet_field einfügen. delete from sx_mask_style where maskeninfo_id=71560; +update sx_stylesheets set stylesheet_type='XSL', +usage_resultset_data='T' +where relation='table' +and trim(filename) like '%.xsl'; +update sx_stylesheets set stylesheet_type='JRXML', +jr_datasource='RS', +usage_resultset_data='T' +where relation='table' +and trim(filename) like '%.jrxml' +; +update sx_stylesheets set stylesheet_type='JRXML', +jr_datasource='XML', +usage_resultset_data='T' +where relation='table' +and trim(filename) like '%xmlsource.jrxml' +; + + +--Alte ISO Stylesheets: +update sx_stylesheets set contenttype='text/html' +where contenttype like 'text/html%' +and trim(contenttype) like '%charset=ISO-8859-1' +; --Achtung: Kernmodule hat andere Mutterdatei als $SUPERX_DIR/db/module/sos/schluesseltabellen/sx_stylesheets_fuellen.sql <@sx_stylesheets_insert @@ -72,7 +230,11 @@ description CHAR(255) , relation CHAR(10) , useragent CHAR(255) , contenttype CHAR(200) , -is_generic smallint +is_generic smallint, +toolbar_icon_filepath varchar(255), +stylesheet_type CHAR(10), +usage_resultset_data CHAR(10), +jr_datasource CHAR(10) ); create temp table tmp_hilf (tid integer); @@ -81,23 +243,83 @@ update tmp_hilf set tid=1 where tid is null; <#assign couter_tid = 1 /> <#foreach column in m_stylesheet> -insert into tmp_stylesheets (tid,filename,caption,description,relation,contenttype,is_generic) +insert into tmp_stylesheets (tid, +filename, +caption, +description, +relation, +contenttype, +is_generic, +toolbar_icon_filepath, +stylesheet_type, +usage_resultset_data, +jr_datasource) select max(tid)+${couter_tid}, '${column.filename}', '${column.caption}', '${column.description}', '${column.relation}', '${column.contenttype}', -${column.is_generic} from tmp_hilf; +${column.is_generic}, +'${column.toolbar_icon_filepath}', +'${column.stylesheet_type}', +'${column.usage_resultset_data}', +'${column.jr_datasource}' + +from tmp_hilf; <#assign couter_tid = couter_tid + 1 /> +update sx_stylesheets set contenttype=(select T.contenttype +from tmp_stylesheets T +where T.filename=sx_stylesheets.filename) +where filename in (select filename from tmp_stylesheets); + +update sx_stylesheets set is_generic=(select T.is_generic +from tmp_stylesheets T +where T.filename=sx_stylesheets.filename) +where filename in (select filename from tmp_stylesheets); + +update sx_stylesheets set toolbar_icon_filepath=(select T.toolbar_icon_filepath +from tmp_stylesheets T +where T.filename=sx_stylesheets.filename) +where filename in (select filename from tmp_stylesheets) +and (toolbar_icon_filepath is null or toolbar_icon_filepath=''); + +update sx_stylesheets set stylesheet_type=(select T.stylesheet_type +from tmp_stylesheets T +where T.filename=sx_stylesheets.filename) +where filename in (select filename from tmp_stylesheets) +; + --delete für tml_stylesheets hinzugefügt #ak 06.03.2013 delete from tmp_stylesheets where filename in (select filename from sx_stylesheets); -insert into sx_stylesheets (tid,filename, caption, description, relation, useragent, contenttype,is_generic) -SELECT tid, filename, caption, description, relation, useragent, contenttype,is_generic +insert into sx_stylesheets (tid, +filename, + caption, + description, + relation, + useragent, + contenttype, +is_generic, +toolbar_icon_filepath, +jr_datasource, +usage_resultset_data, +stylesheet_type) +SELECT tid, + filename, + caption, + description, + relation, + useragent, + contenttype, +is_generic, +toolbar_icon_filepath, +jr_datasource, +usage_resultset_data, +stylesheet_type FROM tmp_stylesheets; drop table tmp_stylesheets; diff --git a/superx/WEB-INF/lib/superx4.9.jar b/superx/WEB-INF/lib/superx4.9.jar index bbfb9a2..0ae4933 100644 Binary files a/superx/WEB-INF/lib/superx4.9.jar and b/superx/WEB-INF/lib/superx4.9.jar differ diff --git a/superx/xml/viz_rpt_assistent.xsl b/superx/xml/viz_rpt_assistent.xsl index fbbbdb6..75966f0 100644 --- a/superx/xml/viz_rpt_assistent.xsl +++ b/superx/xml/viz_rpt_assistent.xsl @@ -1219,6 +1219,7 @@ var platform='superx'; +