Browse Source

Neues Datenblatt FM Template, Saxon 10 Upgrade in Shellscripten #1

userinfo_gueltigkeit
Daniel Quathamer 1 year ago
parent
commit
f2dc5150e0
  1. 2
      src/de/superx/bin/SimpleTransform.java
  2. 2
      src/de/superx/bin/SxJasper.java
  3. 8
      src/de/superx/common/Maske.java
  4. 4
      src/de/superx/common/ThemenbaumI.java
  5. 5
      src/de/superx/servlet/SuperXmlAnmeldung.java
  6. 5
      src/de/superx/servlet/SuperXmlMenu.java
  7. 9
      src/de/superx/servlet/Themenbaum.java
  8. 3
      superx/WEB-INF/conf/edustore/db/bin/saxon_transform.x
  9. 22
      superx/WEB-INF/conf/edustore/db/bin/sx_jasper.x
  10. 6
      superx/WEB-INF/conf/edustore/db/conf/module_scripts_create_ant.xml
  11. 200
      superx/WEB-INF/conf/edustore/db/install/schluesseltabellen/release_unloads/fm_templates.unl
  12. 178
      superx/WEB-INF/conf/edustore/db/install/schluesseltabellen/sx_stylesheet_tabelle_jrxml_einfuegen.sql
  13. BIN
      superx/WEB-INF/lib/superx5.0.jar
  14. 21
      superx/WEB-INF/superx_standalone_ldap.properties.sam
  15. 56
      superx/edit/kern/webapp_manager.jsp
  16. 74
      superx/xml/interLinks_html.xsl

2
src/de/superx/bin/SimpleTransform.java

@ -64,7 +64,7 @@ public class SimpleTransform { @@ -64,7 +64,7 @@ public class SimpleTransform {
if (GetOpts.isPresent("-method"))
method = GetOpts.getValue("-method");
if (GetOpts.isPresent("-param"))
_params = GetOpts.getValue("-param");
_params = GetOpts.getValue("-params");
//logger.initRaw(dosql.class)
//PropertyConfigurator.configure(logfile);

2
src/de/superx/bin/SxJasper.java

@ -374,7 +374,7 @@ private static String outfile = ""; @@ -374,7 +374,7 @@ private static String outfile = "";
try {
go(args);
} catch (Exception ex) {
System.err.println("Doquery Aufruf fehlgeschlagen.\n" + ex);
System.err.println("SxJasper Aufruf fehlgeschlagen.\n" + ex);
ex.printStackTrace();
System.exit(1);
}

8
src/de/superx/common/Maske.java

@ -814,7 +814,7 @@ public class Maske extends NamedIdObject implements Serializable { @@ -814,7 +814,7 @@ public class Maske extends NamedIdObject implements Serializable {
// System.out.println("using prepared Mask HTML");
}
String result = maskHtml.replaceAll("_JSESSIONID_", jsessionid);
String result = maskHtml;
result = result.replaceAll("_USERID_", user.getId().toString());
result = result.replaceAll("_USER_IS_ADMIN_", (user.isAdmin() ? "true" : "false"));
@ -860,7 +860,7 @@ public class Maske extends NamedIdObject implements Serializable { @@ -860,7 +860,7 @@ public class Maske extends NamedIdObject implements Serializable {
"<?xml version=\"1.0\" encoding=\"" + SqlStringUtils.getEncoding() + "\" ?>\n" + "<maske tid=\""
+ getId() + "\" name=\"" + getName() + "\" helpcontext=\"@@doku_url@@@@doku_" + getId()
+ "_mask_url@@\" sortnr=\"" + getSortNr() + "\"" + " datum=\"" + DateUtils.getTodayString()
+ "\" MandantenID=\"" + mandantenID + "\" jsessionid=\"_JSESSIONID_" + "\" hisinone_active=\""
+ "\" MandantenID=\"" + mandantenID + "\" hisinone_active=\""
+ (SuperXManager.isHis1 ? "true" : "false") + "\" " + "hisinone_refapp=\""
+ SuperXManager.his1_refapp + "\" showNavigation=\"" + showNavigation + "\" >\n");
result.append("<user id=\"" + user.getId() + "\" admin=\"" + (user.isAdmin() ? "true" : "false")
@ -872,7 +872,7 @@ public class Maske extends NamedIdObject implements Serializable { @@ -872,7 +872,7 @@ public class Maske extends NamedIdObject implements Serializable {
if (user != null) {
result.append(user.getThemenbaum().getMenupath(this.getId().toString()));
if (showNavigation) {
result.append(user.getThemenbaum().toXml("_JSESSIONID_", locale));
result.append(user.getThemenbaum().toXml(locale));
}
}
@ -1053,7 +1053,7 @@ public class Maske extends NamedIdObject implements Serializable { @@ -1053,7 +1053,7 @@ public class Maske extends NamedIdObject implements Serializable {
if (user != null) {
result.append(user.getThemenbaum().getMenupath(this.getId().toString()));
if (showNavigation) {
result.append(user.getThemenbaum().toXml("_JSESSIONID_", locale));
result.append(user.getThemenbaum().toXml(locale));
}
}
// link back to home page

4
src/de/superx/common/ThemenbaumI.java

@ -17,8 +17,8 @@ public interface ThemenbaumI { @@ -17,8 +17,8 @@ public interface ThemenbaumI {
public String toHtml(String jsessionid, Locale locale);
public String toXml(String jsessionid, Locale locale);
public String toHtml(Locale locale);
public String toXml(Locale locale);
public String getSubmenuXml(String tid, String navigationElement);
public String getMenupath(String tid);

5
src/de/superx/servlet/SuperXmlAnmeldung.java

@ -466,7 +466,7 @@ public class SuperXmlAnmeldung extends AbstractSuperXServlet { @@ -466,7 +466,7 @@ public class SuperXmlAnmeldung extends AbstractSuperXServlet {
.log(java.util.logging.Level.FINEST, "Themenbaum nach XML");
returnTxt = "<?xml version=\"1.0\" encoding=\"" + SqlStringUtils.getEncoding()
+ "\" ?>"
+ user.getThemenbaum().toXml(this.getJSessionId(), getDesiredLocale());
+ user.getThemenbaum().toXml(getDesiredLocale());
response.setContentType("text/xml; charset=" + SqlStringUtils.getEncoding());
@ -474,8 +474,7 @@ public class SuperXmlAnmeldung extends AbstractSuperXServlet { @@ -474,8 +474,7 @@ public class SuperXmlAnmeldung extends AbstractSuperXServlet {
java.util.logging.Logger.getLogger("superx_" + getMandantenID() + "_xml")
.log(java.util.logging.Level.FINEST, "Themenbaum nach HTML");
returnTxt = user.getThemenbaum().toHtml(this.getJSessionId(),
getDesiredLocale());
returnTxt = user.getThemenbaum().toHtml(getDesiredLocale());
// returnHtml=StringUtils.replace(
// returnHtml
// ,"superx/xml/SuperXmlMaske",

5
src/de/superx/servlet/SuperXmlMenu.java

@ -110,8 +110,7 @@ public class SuperXmlMenu extends AbstractSuperXServlet { @@ -110,8 +110,7 @@ public class SuperXmlMenu extends AbstractSuperXServlet {
boolean showNavigation=getShowNavigation(request);
String navigationElement="";
if(showNavigation)
navigationElement=user.getThemenbaum().toXml("_JSESSIONID_",
desiredLocale);
navigationElement=user.getThemenbaum().toXml(desiredLocale);
String returnText=user.getThemenbaum().getSubmenuXml(tid,navigationElement);
Logger.getLogger("superx_" + getMandantenID()+"_xml").log(Level.FINE,
"Menu-xml: " + returnText);
@ -125,7 +124,7 @@ public class SuperXmlMenu extends AbstractSuperXServlet { @@ -125,7 +124,7 @@ public class SuperXmlMenu extends AbstractSuperXServlet {
returnText=transform(returnText);
}
returnText = SxPools.get(getMandantenID()).localize(returnText,
desiredLocale).replaceAll("_JSESSIONID_",this.getJSessionId())
desiredLocale)
.replaceAll("_HISINONE_", SuperXManager.his1_refapp);
sendBackHtml(returnText);

9
src/de/superx/servlet/Themenbaum.java

@ -101,8 +101,7 @@ public class Themenbaum implements ThemenbaumI, Serializable { @@ -101,8 +101,7 @@ public class Themenbaum implements ThemenbaumI, Serializable {
private StringBuffer getMenuXmlAndInitMenu() throws SQLException,
DBServletException, KeyParentEqualException, NoMainEntryException, NichtAngemeldetException {
StringBuffer result = new StringBuffer();
result.append("<menue jsessionid=\"_JSESSIONID_\""
+ " hisinone_active=\""
result.append("<menue hisinone_active=\""
+ (SuperXManager.isHis1 ? "true" : "false") + "\"\n"
+ "hisinone_refapp=\"" + SuperXManager.his1_refapp
+ "\" showNavigation=\"true\">");
@ -208,7 +207,7 @@ public class Themenbaum implements ThemenbaumI, Serializable { @@ -208,7 +207,7 @@ public class Themenbaum implements ThemenbaumI, Serializable {
return menu.getMenupathForMask(tid);
}
public String toHtml(String jsessionid, Locale locale) {
public String toHtml(Locale locale) {
Logger.getLogger("superx_" + mandantenID + "_xml").log(Level.FINE,
"Versuche Themenbaum HTML Transformation");
try {
@ -240,7 +239,7 @@ public class Themenbaum implements ThemenbaumI, Serializable { @@ -240,7 +239,7 @@ public class Themenbaum implements ThemenbaumI, Serializable {
return result;
}
public String toXml(String jsessionid, Locale locale) {
public String toXml(Locale locale) {
String myXml = menuXml.toString();
String result = SxPools.get(mandantenID).localize(
myXml, locale);
@ -322,7 +321,7 @@ public class Themenbaum implements ThemenbaumI, Serializable { @@ -322,7 +321,7 @@ public class Themenbaum implements ThemenbaumI, Serializable {
public String getSubmenuXml(String tid,String navigationElement) {
boolean showNavigation = !navigationElement.isEmpty();
StringBuffer result = new StringBuffer( "<?xml version=\"1.0\" encoding=\""+SqlStringUtils.getEncoding()+"\"?>\n<menue jsessionid=\"_JSESSIONID_\"" + " hisinone_active=\""
StringBuffer result = new StringBuffer( "<?xml version=\"1.0\" encoding=\""+SqlStringUtils.getEncoding()+"\"?>\n<menue hisinone_active=\""
+ (SuperXManager.isHis1 ? "true" : "false") + "\" "
+ " hisinone_refapp=\"" + SuperXManager.his1_refapp+"\""
+ " showNavigation=\""+showNavigation+"\">\n");

3
superx/WEB-INF/conf/edustore/db/bin/saxon_transform.x

@ -55,7 +55,8 @@ then @@ -55,7 +55,8 @@ then
#java net.sf.saxon.Transform -o "$OUT" "$IN" "$XSL" "$param"
else
CP=".:$JDBC_CLASSPATH"
java -cp "$CP" $JAVA_OPTS net.sf.saxon.Transform -o "$OUT" "$IN" "$XSL" $param
echo java -cp "..." $JAVA_OPTS net.sf.saxon.Transform -o "$OUT" "$IN" "$XSL" $param
java -cp "$CP" $JAVA_OPTS net.sf.saxon.Transform -xsl:$XSL -s:$IN -o:"$OUT"
fi
if [ "$method" = "pdf" ]

22
superx/WEB-INF/conf/edustore/db/bin/sx_jasper.x

@ -42,27 +42,7 @@ if [ "$1" = "" -o "$1" = "--help" -o "$1" = "-?" ] @@ -42,27 +42,7 @@ if [ "$1" = "" -o "$1" = "--help" -o "$1" = "-?" ]
exit 0
fi
#fileName=$1
#taskName=$2
#outfile=$3
JASPER_LIB="$WEBAPP/WEB-INF/lib/jasperreports-3.7.1.jar:$WEBAPP/WEB-INF/lib/commons-digester-1.7.jar:$WEBAPP/WEB-INF/lib/commons-collections-2.1.1.jar:$WEBAPP/WEB-INF/lib/commons-logging-1.0.3.jar:$WEBAPP/WEB-INF/lib/commons-beanutils-1.8.0.jar:$WEBAPP/WEB-INF/lib/poi-3.5-FINAL-20090928.jar:$WEBAPP/WEB-INF/lib/iText-2.1.7.jar:$WEBAPP/WEB-INF/lib/groovy-all-1.5.5.jar"
if $CYGWIN; then
if [ "$fileName" != "" ]
then
fileName=`cygpath --path --windows "$fileName"`
fi
JASPER_LIB=`cygpath --path --windows "$JASPER_LIB"`
CP=".;$JDBC_CLASSPATH;$JASPER_LIB"
else
#outpfad="$filename"
CP=".:$JASPER_LIB:$JDBC_CLASSPATH"
fi
java $JAVA_OPTS -cp "$CP" de.superx.bin.SxJasper -logger:$LOGGER_PROPERTIES -db_properties:$DB_PROPERTIES "$@"
java $JAVA_OPTS -cp "$JDBC_CLASSPATH" de.superx.bin.SxJasper -logger:$LOGGER_PROPERTIES -db_properties:$DB_PROPERTIES "$@"

6
superx/WEB-INF/conf/edustore/db/conf/module_scripts_create_ant.xml

@ -103,7 +103,7 @@ Programmverlauf: @@ -103,7 +103,7 @@ Programmverlauf:
<antcall target="module_extraktion" />
<antcall target="module_extraktion_unless" />
<antcall target="rename_demofiles" />
<antcall target="module_mondrian_group" />
<antcall target="module_test" />
@ -131,7 +131,7 @@ Programmverlauf: @@ -131,7 +131,7 @@ Programmverlauf:
<antcall target="module_extraktion" />
<antcall target="module_extraktion_unless" />
<antcall target="rename_demofiles" />
<antcall target="module_mondrian_group" />
<chmod dir="${MODULE_PATH}" perm="ugo+x" includes="**/*.x" />
<!-- <echo message="${SX_TIMESTAMP}" file="${MODULE_PATH}/conf/builddatum.txt"/> -->
</target>
@ -210,7 +210,7 @@ Programmverlauf: @@ -210,7 +210,7 @@ Programmverlauf:
<!-- ### Saiku/Mondrian ### -->
<target name="module_mondrian" depends="init" description="Ausführbar: Erzeugt Dateien für Saiku/Mondrian für ${DATABASE}">
<antcall target="module_mondrian_group" />
</target>
<!-- ### Extraktions-Scripte erzeugen ### -->

200
superx/WEB-INF/conf/edustore/db/install/schluesseltabellen/release_unloads/fm_templates.unl

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
364^SuperX_general^<#-- General FreeMarker Makros für SuperX -->\
39^SuperX_general^<#-- General FreeMarker Makros für SuperX -->\
<#-- Einfügen eines Kommentars Die Kommentarverwaltung ist ja ziemlich abgefahren in SuperX.\
Standardmäßig werden Kommentare gelöscht, damit nicht soviel an die DB geschickt wird.\
Wenn man aber bei Entwicklungszwecken noch Kommentare drin haben will, kann man diese Funktion benutzen.\
@ -235,7 +235,7 @@ ORDER BY ${businessKey} \ @@ -235,7 +235,7 @@ ORDER BY ${businessKey} \
\
DROP TABLE ${coreTableName}_input; \
</#macro>^allgemeine SuperX-Makros^^1^
365^SQL_lingua_franca^<#-- \
40^SQL_lingua_franca^<#-- \
lingua franca makros um von SQL Dialekten (Informix/Postgres) unabhängig zu werden \
Stand 4.4.05\
FreeMarker Kommentare dieser Art werden von generateSql verschandelt\
@ -400,7 +400,7 @@ execute ${varname};\ @@ -400,7 +400,7 @@ execute ${varname};\
char\
</#if> \
</#macro>^Datenbankunabhängigkeit^^2^
366^KERN_CIFX_UPDATE^<#macro MODUL_CIFX_UPDATE_SORT>\
41^KERN_CIFX_UPDATE^<#macro MODUL_CIFX_UPDATE_SORT>\
select 'Quellsystem_var ${Quellsystem_var} '::char(30) from xdummy;\
select '${SQLdialect}' from xdummy;\
create temp table tmp_cifx2\
@ -2602,7 +2602,7 @@ DROP TABLE tmp_schluessel2;\ @@ -2602,7 +2602,7 @@ DROP TABLE tmp_schluessel2;\
DROP TABLE tmp_doppelt;\
DROP TABLE tmp_merkmale;\
</#macro>^Makro cifx-update^^1^
367^SQL_multitable_output^<#--\
42^SQL_multitable_output^<#--\
Utility Makros für die Maske 71280 Tabelle ausgeben und Derivate (z.B. 17110 Sekundärinfo Datenblatt )\
(c)2011 Daniel Quathamer\
\
@ -2922,7 +2922,7 @@ from tmp_tabelle\ @@ -2922,7 +2922,7 @@ from tmp_tabelle\
;\
</#if>\
</#macro>^Utility Makros Tabelleninhalte Ausgeben für die Maske 16650 (Studierende Datenblatt) und Derivate^(c)2011 Daniel Quathamer^1^
368^SQL_table_output^<#--\
43^SQL_table_output^<#--\
Utility Makros für die Maske 71280 Tabelle ausgeben und Derivate (z.B. 17110 Sekundärinfo Datenblatt )\
(c)2011 Daniel Quathamer\
\
@ -3139,3 +3139,193 @@ ${feldname}\ @@ -3139,3 +3139,193 @@ ${feldname}\
from tmp_tabelle;\
</#if>\
</#macro>^Datenbankunabhängigkeit^^1^
45^DatenblattSQLGenerator^<#--\
Utility Makro Datenblatt-Berichte\
(c)2023 Daniel Quathamer\
\
-->\
\
<#macro generateDatenblatt \
p_basetable \
p_joinTables \
p_joinWhereClauses \
p_selectClause \
p_aggregationsfeld \
p_aggregatfunktion \
p_filter \
p_show_keys\
p_postProcessing\
>\
--Ermittle SQL für Selektion aus Basetable sowie weitere Tabellen\
--Übergebene sqlVars:\
--basetable\
--getJoinTables --weitere Tabellen, die gejoined werden, als Liste\
--joinWhereClauses --joinClauses\
--getSelectClause --Felder, die selektiert werden, als Liste\
--filter\
--pShowKeys true/false für Schlüsselanzeige\
--postProcessing erzeuge tmp_tabelle2 für postProcessing\
\
--Start: Defaultwerte\
<#assign field_list_groupby="" />\
<#assign field_list_select="" />\
<#assign joinClause="" />\
<#assign rownum=1 />\
\
--Validierung: aggregatfunktion nur erlaubt wenn auch Feld ausgewählt\
<#if p_aggregatfunktion != "" && p_aggregationsfeld="">\
<#assign p_aggregatfunktion="" />\
</#if>\
\
--erzeuge select- und group-by-Liste?\
<#if p_selectClause?has_content >\
\
<#foreach row_feld in p_selectClause>\
<#assign feldname=row_feld.name />\
\
<#if feldname==p_aggregationsfeld >\
<#assign field_list_select=field_list_select+p_aggregatfunktion+row_feld.table_name+"."+row_feld.name+") as " +row_feld.table_name+"_"+row_feld.name/>\
<#else>\
<#assign field_list_select=field_list_select+row_feld.table_name+"."+row_feld.name+" as " + row_feld.table_name+"_"+row_feld.name />\
</#if>\
<#if row_feld.foreignkey_tab!="">\
<#assign field_list_select=field_list_select+",''::varchar(255) as "+row_feld.table_name+"_"+row_feld.name +"_str" />\
<#assign field_list_select=field_list_select+",''::varchar(255) as "+row_feld.table_name+"_"+row_feld.name +"_uniquename" />\
</#if>\
\
<#if rownum &lt; p_selectClause?size>\
<#assign field_list_select=field_list_select+"," />\
</#if>\
<#if rownum &lt; p_selectClause?size+1>\
<#if feldname != p_aggregationsfeld >\
<#assign field_list_groupby=field_list_groupby +row_feld.table_name+"."+row_feld.name+ "," />\
</#if>\
</#if>\
<#assign rownum=rownum+1 />\
</#foreach>--row_feld Schleife\
</#if> --selectClause?has_content\
\
\
--Am Ende ggf. Komma weg:\
<#if field_list_groupby?ends_with(",")>\
<#assign field_list_groupby=field_list_groupby[0..field_list_groupby?length-2] />\
</#if>\
<#if field_list_groupby?trim !="">\
<#assign field_list_groupby=" group by " + field_list_groupby />\
</#if>\
\
--erzeuge joinClause:\
<#if p_joinTables?has_content >\
<#foreach joinTable in p_joinTables>\
<#assign joinTableName=joinTable.name />\
<#assign joinClause=joinClause+ " left outer join "+joinTableName + " on ( 1=1" />\
<#if p_joinWhereClauses?has_content >\
<#foreach joinWhereClause in p_joinWhereClauses>\
<#if joinWhereClause.foreignkey_tab=joinTableName>\
<#assign joinClause=joinClause+" and "+ joinWhereClause.condition />\
</#if>\
</#foreach>\
</#if>\
<#assign joinClause=joinClause+ ")\
" />\
</#foreach>\
</#if>\
\
\
\
--erzeuge SQL\
\
<@selectintotmp\
select="''::char(250) as _meldung," + field_list_select\
source=p_basetable + "\
" + joinClause\
target="tmp_tabelle">\
where 1=1\
${filter}\
${field_list_groupby}\
</@selectintotmp>\
<@informixnolog/> ;\
\
create temp table tmp_rows(anz integer,max_anz integer) \
<@informixnolog/> \
;\
insert into tmp_rows(anz) select count(*) from tmp_tabelle;\
update tmp_rows set max_anz=(select apnr from konstanten where beschreibung='Datenblatt max.Zeilenzahl');\
\
delete from tmp_tabelle where 0 < (select count(*) from tmp_rows\
where anz > max_anz);\
\
select 'Warnung: die Abfrage kann nicht ausgeführt werden, denn ' || anz || ' Zeilen liegen über max. Grenze von ' || max_anz as _runtimeMessage\
from tmp_rows\
where anz > max_anz;\
\
drop table tmp_rows;\
--denormalize:\
<#if p_selectClause?has_content >\
<#foreach row_feld in p_selectClause>\
<#if row_feld.foreignkey_tab != "">\
\
update tmp_tabelle set ${row_feld.table_name}_${row_feld.name}_str = ${row_feld.foreignkey_cap}\
<#if row_feld.foreignkey_uniquename != "">\
,${row_feld.table_name}_${row_feld.name}_uniquename = ${row_feld.foreignkey_tab}.${row_feld.foreignkey_uniquename}\
</#if>\
from ${row_feld.foreignkey_tab} \
where \
<#if row_feld.foreignkey_func?exists && row_feld.foreignkey_func != "">\
${row_feld.foreignkey_func}(</#if>${row_feld.foreignkey_tab}.${row_feld.foreignkey_col}<#if row_feld.foreignkey_func?exists && row_feld.foreignkey_func != "">)</#if>=tmp_tabelle.${row_feld.table_name}_${row_feld.name}\
<#if row_feld.foreignkey_cond != "">\
<#if row_feld.foreignkey_cond[0..0] = "1" || \
row_feld.foreignkey_cond[0..0] = "2" ||\
row_feld.foreignkey_cond[0..0] = "3" ||\
row_feld.foreignkey_cond[0..0] = "4" ||\
row_feld.foreignkey_cond[0..0] = "5" ||\
row_feld.foreignkey_cond[0..0] = "6" ||\
row_feld.foreignkey_cond[0..0] = "7" ||\
row_feld.foreignkey_cond[0..0] = "8" ||\
row_feld.foreignkey_cond[0..0] = "9" ||\
row_feld.foreignkey_cond[0..0] = "0" ||\
row_feld.foreignkey_cond[0..0] = "'" >\
and ${row_feld.foreignkey_cond}\
<#else>\
and tmp_tabelle.${row_feld.table_name}_${row_feld.foreignkey_cond}\
</#if>\
</#if>\
;\
</#if>\
</#foreach>\
</#if> --Ende denormalize\
\
\
--finaler select\
select \
\
<#assign rownum=1 />\
<#foreach row_feld in p_selectClause>\
<#if row_feld.foreignkey_tab != "">\
${row_feld.table_name}_${row_feld.name}_str\
<#if p_show_keys==1>\
<#if !row_feld.foreignkey_uniquename?exists || row_feld.foreignkey_uniquename=="">\
,${row_feld.table_name}_${row_feld.name}\
<#else>\
,${row_feld.table_name}_${row_feld.name}_uniquename\
</#if>\
</#if> --show_keys\
<#else>\
${row_feld.table_name}_${row_feld.name}\
</#if> --foreignkey_tab\
<#if rownum &lt; p_selectClause?size>\
,\
</#if>\
<#assign rownum= rownum+1 />\
</#foreach>\
<#if p_postProcessing!="">\
into temp tmp_tabelle2\
</#if>\
from tmp_tabelle\
order by <#list 1..p_selectClause?size as i>${i}\
<#if i &lt; p_selectClause?size>,</#if>\
</#list>\
;\
\
\
</#macro>^Utility Makros Tabelleninhalte Ausgeben für Datenblatt-Berichte^(c)2023 Daniel Quathamer^1^

178
superx/WEB-INF/conf/edustore/db/install/schluesseltabellen/sx_stylesheet_tabelle_jrxml_einfuegen.sql

@ -1,178 +0,0 @@ @@ -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>
<#foreach column in m_stylesheet_field>
delete from stylesheet_field where stylesheet_id in (select tid from sx_stylesheets where filename ='${column.filename}');
</#foreach>
-- 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 />
</#foreach>
<#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);
</#if>
--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
</#if>
)
SELECT tid, filename, caption, description, relation, useragent, contenttype
<#if TableFieldExists?exists && TableFieldExists('sx_stylesheets','is_generic')>
,is_generic
</#if>
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 />
</#foreach>
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 />
</#foreach>
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');
</#if>
</#macro>

BIN
superx/WEB-INF/lib/superx5.0.jar

Binary file not shown.

21
superx/WEB-INF/superx_standalone_ldap.properties.sam

@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
# SuperX LDAP Konfiguration für Passwortkontrolle
#Falls SuperX standalone betrieben wird, können hier LDAP Parameter hinterlegt werden
# Beispielparameter verwenden
# https://www.forumsys.com/tutorials/integration-how-to/ldap/online-ldap-test-server/
# Beispieluser auf diesem System einstein Passwort=password
# Wenn Sie in Superx einen User mit Kennung einstein anlegen, können Sie die Anmeldung via LDAP testen
LdapUrl=ldap://ldap.forumsys.com:389
#
#Base Definition für die LDAP Suche, kann ggfs. um Gruppen erweitert werden, wie ou=superx_user,dc=example,dc=com
LdapBase=dc=example,dc=com
#
#Falls für den LDAP Zugriff ein ServiceUser (mit eigenem Passwort) benötigt wird, kann dies hier angegeben werden
#LdapServiceUserDN=cn=read-only-admin,dc=example,dc=com
#LdapServiceUserPassword=password
#
#
#
# Identifiying Attribute mit dem ein User mittels seiner Kennung gefunden wird (z.B. uid)
# z.B. bei Suchstring uid={0} einfach nur uid
# (ein komplexer Suchstring ist derzeit nicht möglich, passen Sie ggfs. die LdapBase-Definition an oder kontaktieren Sie uns unter support@superx-projekt.de
LdapIdentifyingAttribute=uid

56
superx/edit/kern/webapp_manager.jsp

@ -88,56 +88,8 @@ var xhttp = new XMLHttpRequest(); @@ -88,56 +88,8 @@ var xhttp = new XMLHttpRequest();
}
function getMaskMenu(srctype,tid)
{
if(srctype=="load")
{
document.getElementById("MaskHeader").innerHTML="Masken-Quellcode exportieren";
document.getElementById("MaskSubHeader").innerHTML="TID = <input type='text' size='10' id='Maskentid' />"+" <button class=\"button has-tooltip-multiline has-tooltip-right\" data-tooltip=\"Quellcode der Maske mit der Nummer im Feld TID exportieren\" onclick=\"getMaskSrc(document.getElementById('Maskentid').value)\">exportieren...</button>";
}
if(srctype=="save")
{
document.getElementById("MaskHeader").innerHTML="Masken-Quellcode importieren";
document.getElementById("MaskSubHeader").innerHTML="<form method=\"post\" name=\"saveMask\" action=\"../../edit/kern/jobexecutor.jsp\" target=\"_blank\"> TID = <input type='text' size='10' id='Maskentid' name='maskeninfo_id' /><input type='hidden' name='src' /><button class=\"button has-tooltip-multiline has-tooltip-right\" data-tooltip=\"Quellcode der Maske mit der Nummer im Feld TID importieren\" onclick=\"saveMaskSrc(document.getElementById('Maskentid').value)\">importieren...</button></form>";
//document.getElementById("maskentid_for_upload").style.visibility="visible";
//document.getElementById("button_for_upload").style.visibility="visible";
//document.getElementById("MaskSubHeader").innerHTML="Maske TID="+tid;
//document.getElementById("MaskSubHeader").innerHTML="TID=<input type='text' size='10' id='Maskentid' />"+" <button class=\"button has-tooltip-multiline has-tooltip-right\" data-tooltip=\"Quellcode der Maske mit der Nummer im Feld TID exportieren\" onclick=\"saveMaskSrc(document.getElementById('Maskentid').value)\">importieren...</button>";
}
}
function getMaskSrc(tid)
{
//document.getElementById("MaskHeader").innerHTML="Masken-Quellcode laden";
//document.getElementById("MaskSubHeader").innerHTML="Maske TID="+tid;
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("Inhalt").innerHTML = this.responseText;
//alert(this.responseText);
}
};
xhttp.open("GET", "../../sxrest/maskxml/get/"+tid, true);
xhttp.send();
}
function saveMaskSrc(tid)
{
document.forms["saveMask"].elements["src"].value=document.getElementById("Inhalt").value;
if(document.forms["saveMask"].elements["src"].value=="" || document.forms["saveMask"].elements["maskeninfo_id"].value=="")
{
alert("Bitte setzen Sie eine Nummer in das Feld TID und einen passenden XML ins Feld Inhalt");
return false;
}
else
{
document.forms["saveMask"].submit();
}
}
</script>
<body>
@ -221,7 +173,7 @@ if(tab.equals("mask")) @@ -221,7 +173,7 @@ if(tab.equals("mask"))
<li><a onClick="getMaskLogs('xml','XML-Ergebnis');">XML-Ergebnis</a></li>
</ul>
<p class="menu-label">
<!-- <p class="menu-label">
Masken-Sicherung
</p>
<ul class="menu-list">
@ -230,7 +182,7 @@ if(tab.equals("mask")) @@ -230,7 +182,7 @@ if(tab.equals("mask"))
</ul>
-->
<%
} //Ende Masken Menü
%>
@ -256,7 +208,7 @@ if(tab.equals("")) @@ -256,7 +208,7 @@ if(tab.equals(""))
</div>
</section>
<section class="info-tiles">
<div class="tile is-ancestor has-text-centered">
<!-- <div class="tile is-ancestor has-text-centered">
<div class="tile is-parent">
<article class="tile is-child box">
<p class="title">Entwicklungs-<br />modus</p>
@ -282,7 +234,7 @@ if(tab.equals("")) @@ -282,7 +234,7 @@ if(tab.equals(""))
</div>
</article>
</div>
</div>-->
<div class="tile is-parent">
<article class="tile is-child box">
<p class="title">Server Cache</p>

74
superx/xml/interLinks_html.xsl

@ -78,7 +78,7 @@ @@ -78,7 +78,7 @@
<xsl:variable name="derwert" select="$zs2" />
<xsl:if test="(($derwert != 'null') and ($derwert != ''))">
<div align="center">
<a>
<a target="_blank">
<xsl:attribute name="href">
<xsl:value-of
select="'SuperXmlMaske'" />
@ -273,6 +273,78 @@ @@ -273,6 +273,78 @@
</xsl:if>
</xsl:when>
<!-- nextwindowgenericlink wie generich link nur mit Target _blank -->
<xsl:when test="starts-with(f_name,'nextwindowgenericlink')">
<div align="center">
<xsl:variable name="derwert" select="$zs2" />
<xsl:if test="($derwert != 'null') and ($derwert != '')">
<xsl:choose>
<xsl:when test="(contains($derwert,'|'))">
<xsl:variable name="caption" select="substring-before($derwert,'|') " />
<xsl:variable name="href" select="substring-after($derwert,'|') " />
<xsl:choose>
<xsl:when test="starts-with($href,'http')">
<a target="_blank">
<xsl:attribute name="href">
<xsl:value-of select="$href" /></xsl:attribute>
<![CDATA[]]>
<xsl:choose>
<xsl:when test="starts-with($caption,'img:')">
<img>
<xsl:attribute name="src"><xsl:value-of select="substring-after($caption,'img:')"/>
</xsl:attribute>
</img>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$caption" />
</xsl:otherwise>
</xsl:choose>
<![CDATA[]]>
</a>
</xsl:when>
<xsl:when test="$href='' or $href = null">
<![CDATA[]]>
<xsl:value-of select="$caption" /><![CDATA[]]>
</xsl:when>
<xsl:otherwise>
<a target="_blank">
<xsl:variable name="jsessreplace">
<xsl:call-template name="search_replace">
<xsl:with-param name="string" select="$href" />
<xsl:with-param name="search" select="'JSESSIONID'" />
<xsl:with-param name="replace"
select="concat(';jsessionid=',/ergebnisse/@jsessionid )" />
</xsl:call-template>
</xsl:variable>
<xsl:attribute name="href"><xsl:value-of
select="$jsessreplace" /></xsl:attribute>
<![CDATA[]]>
<xsl:choose>
<xsl:when test="starts-with($caption,'img:')">
<img>
<xsl:attribute name="src"><xsl:value-of select="substring-after($caption,'img:')"/>
</xsl:attribute>
</img>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$caption" />
</xsl:otherwise>
</xsl:choose>
<![CDATA[]]>
</a>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="$zs2" />
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</div>
</xsl:when>
<xsl:when test="starts-with(f_name,'nextedit')">
<xsl:variable name="derwert" select="$zs2" />

Loading…
Cancel
Save