|
|
@ -9,6 +9,7 @@ import java.text.ParseException; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.Collection; |
|
|
|
import java.util.Collection; |
|
|
|
import java.util.Enumeration; |
|
|
|
import java.util.Enumeration; |
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.Hashtable; |
|
|
|
import java.util.Hashtable; |
|
|
|
import java.util.Iterator; |
|
|
|
import java.util.Iterator; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
@ -31,10 +32,14 @@ import de.memtext.util.DateUtils; |
|
|
|
import de.memtext.util.ServletHelper; |
|
|
|
import de.memtext.util.ServletHelper; |
|
|
|
import de.memtext.util.StringUtils; |
|
|
|
import de.memtext.util.StringUtils; |
|
|
|
import de.superx.common.DBServletException; |
|
|
|
import de.superx.common.DBServletException; |
|
|
|
|
|
|
|
import de.superx.common.RepositoryItemCollection; |
|
|
|
import de.superx.common.SuperX_el; |
|
|
|
import de.superx.common.SuperX_el; |
|
|
|
import de.superx.common.SxResultSet; |
|
|
|
import de.superx.common.SxResultSet; |
|
|
|
|
|
|
|
import de.superx.common.SxUser; |
|
|
|
import de.superx.common.TranslationContainer; |
|
|
|
import de.superx.common.TranslationContainer; |
|
|
|
import de.superx.util.SqlStringUtils; |
|
|
|
import de.superx.util.SqlStringUtils; |
|
|
|
|
|
|
|
import freemarker.template.TemplateException; |
|
|
|
|
|
|
|
import freemarker.template.TemplateModelException; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @author Daniel Quathamer Projektgruppe SuperX ServletUtils.java @ Diese |
|
|
|
* @author Daniel Quathamer Projektgruppe SuperX ServletUtils.java @ Diese |
|
|
@ -583,6 +588,48 @@ public class ServletUtils { |
|
|
|
} |
|
|
|
} |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public static StringBuffer addCustomElementsToXml(String mandantenID) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
StringBuffer result = new StringBuffer(""); |
|
|
|
|
|
|
|
Iterator it = SxPools.get(mandantenID).getRepository().keySet().iterator(); |
|
|
|
|
|
|
|
while (it.hasNext()) { |
|
|
|
|
|
|
|
String key = (String) it.next(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (key.startsWith("CUSTOM_CSS")) { |
|
|
|
|
|
|
|
String customcss=""; |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
customcss = ((RepositoryItemCollection) SxPools.get(mandantenID).getRepository().get(key)) |
|
|
|
|
|
|
|
.get("content").toString(); |
|
|
|
|
|
|
|
} catch (TemplateModelException e) { |
|
|
|
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(customcss!=null && !customcss.trim().equals("")) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
result.append("<custom_css><style type=\"text/css\"><![CDATA["+customcss+"]]></style></custom_css>"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (key.startsWith("CUSTOM_JS")) { |
|
|
|
|
|
|
|
String customjs=""; |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
customjs = ((RepositoryItemCollection) SxPools.get(mandantenID).getRepository().get(key)) |
|
|
|
|
|
|
|
.get("content").toString(); |
|
|
|
|
|
|
|
} catch (TemplateModelException e) { |
|
|
|
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(customjs!=null && !customjs.trim().equals("")) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
result.append("<custom_js><script language=\"javascript\"><![CDATA["+customjs+"]]></script></custom_js>"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Created on 15.01.2004
|
|
|
|
// Created on 15.01.2004
|
|
|
|