import java.io.*;
import java.lang.*;
+import java.lang.reflect.*;
import java.util.*;
import java.sql.*;
import freemarker.template.*;
import mir.misc.*;
+import mir.media.*;
import mir.storage.*;
import mir.module.*;
import mir.entity.*;
public String fileDesc;
protected HashMap additional = new HashMap();
+
+
public void handle(PrintWriter htmlout, EntityUsers user, boolean sync, boolean force)
throws StorageObjectException, ModuleException {
handleIt(htmlout,user,force);
}
+ /** @todo this should return the number of pages produced! */
public void handleIt(PrintWriter htmlout, EntityUsers user, boolean force)
throws StorageObjectException, ModuleException {
String currentMediaId;
EntityContent currentContent;
EntityList list;
- EntityGruppen userEntity=null;
+ EntityUsers userEntity=null;
SimpleHash imageHash = new SimpleHash();
int size = 0;
int listSize = 0;
//now produce the pages
if (list!=null || force==true) {
SimpleHash mergeData = HTMLTemplateProcessor.makeSimpleHashWithEntitylistInfos(list);
- //first we try to get the images
- SimpleList itemList = HTMLTemplateProcessor.makeSimpleList(list);
- if(list!=null){
- for (int k=0; k < list.size();k++) {
- currentContent = (EntityContent)list.elementAt(k);
- //images to content
- EntityList currentMedia = DatabaseContentToMedia.getInstance().getImages(currentContent);
- if (currentMedia!=null && currentMedia.getCount()>=1) {
- SimpleList mediaList = HTMLTemplateProcessor.makeSimpleList(currentMedia);
- mergeData.put("to_media", mediaList);
- }
- //content to html
- if(currentContent.getValue("is_html").equals("0")){
- String temp = (String)currentContent.getValue("description");
- if(temp!=null && temp.length()>0){
- temp = StringUtil.createHTML(temp);
- temp = StringUtil.decodeHTMLinTags(temp);
- currentContent.setValueForProperty("description",temp);
- }
- } else {
- String temp = (String)currentContent.getValue("description");
- if(temp!=null && temp.length()>0){
- temp = StringUtil.decodeHTMLinTags(temp);
- currentContent.setValueForProperty("description",temp);
- }
- }
- }
- }
-
//process hashmap additional and add to mergedata
if (additional != null) {
Set set = additional.keySet();