|
From: jiang <jia...@us...> - 2006-02-13 12:37:24
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/agent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2933/src/org/cobricks/agent Added Files: Attribute.java AgentManagerImpl.java properties.txt ActionRating.java ActionSendMail.java Agent.java AgentManager.java Condition.java ActionSendMsg.java Rule.java DRLCreator.java AgentServlet.java ActionAnnotation.java Action.java ActionSetAttr.java AgentPresenter.java Log Message: Agent Component --- NEW FILE: AgentPresenter.java --- /* * Copyright (c) 2004-2005 Cobricks Group. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted under the terms of the Cobricks Software * License, either version 1.0 of the License, or (at your option) any * later version (see www.cobricks.org). * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. */ package org.cobricks.agent; import java.io.File; import java.io.InputStream; import java.sql.Timestamp; import java.text.DateFormat; [...1533 lines suppressed...] return sh.toString(); } public final String addNewAction() { StringBuffer add=new StringBuffer("<form action='succ.html' method=post >"); add.append("<br><br><br><h1>To finish this rule:</h1>"); add.append("<input type=submit name=complete value='Click here to complete this rule'> "); add.append("<input type=hidden name=ruleflag value=true></form>"); add.append("<form action=completeRule.html method=post>"); add.append("<br><br><h1>To add more actions:</h1><br>"); add.append(" <h2>result:</h2><select name=result><option>Send Email <option>Send Message <option>Set Attribute <option selected>Set Annotation <option>Set Rating </select><p>"); add.append(" <table><tr><td><input type=submit value='Add Action'/></td>"); add.append(" <input type=hidden name=ruleflag value=false></form>"); add.append(" <input type=hidden name=flag value=true></tr></table></form>"); return add.toString(); } } --- NEW FILE: ActionSetAttr.java --- /* * Copyright (c) 2003-2005 Cobricks Group. All rights reserved. * * This file is part of a free software package; you can redistribute * it and/or modify it under the terms of the Cobricks Software Licence; * either version 1.0 of the License, or (at your option) any later * version (see www.cobricks.de). * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. */ package org.cobricks.agent; /** * * @author Han Jiang * @author Tong Tong * @author Ye Shen * @version $Date: 2006/02/13 12:37:05 $ */ public class ActionSetAttr extends Action { private String objectName; private int objectID; private String aName; private String aValue; public ActionSetAttr(){ type = Action.SETATTR; } public ActionSetAttr(String oName, int oID, String name, String value){ this(); objectName = oName; objectID = oID; aName = name; aValue = value; } // attrFromDB: UPDATE <objectName> <objectID> SET <aName>=<aValue> public ActionSetAttr(int actionID, String attrFromDB){ this.actionID = actionID; String[] strs = attrFromDB.split(" |="); objectName = strs[1]; objectID = Integer.parseInt(strs[2].trim()); aName = strs[4]; aValue = strs[5]; //TODO } /* (non-Javadoc) * @see java.lang.Object#toString() */ public String toString() { String result = "UPDATE "+ objectName +" "+objectID+" SET " + aName+ "="+aValue; return result; } /* (non-Javadoc) * @see org.cobricks.agent.Action#toHtmlString() */ public String toHtmlString() { // TODO Auto-generated method stub return null; } public String getAName() { return aName; } public void setAName(String name) { aName = name; } public String getAValue() { return aValue; } public void setAValue(String value) { aValue = value; } public int getObjectID() { return objectID; } public void setObjectID(int objectID) { this.objectID = objectID; } public String getObjectName() { return objectName; } public void setObjectName(String objectName) { this.objectName = objectName; } } --- NEW FILE: ActionSendMsg.java --- /* * Copyright (c) 2003-2005 Cobricks Group. All rights reserved. * * This file is part of a free software package; you can redistribute * it and/or modify it under the terms of the Cobricks Software Licence; * either version 1.0 of the License, or (at your option) any later * version (see www.cobricks.de). * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. */ package org.cobricks.agent; /** * * @author Han Jiang * @author Tong Tong * @author Ye Shen * @version $Date: 2006/02/13 12:37:05 $ */ public class ActionSendMsg extends Action { private int toUserID; // Das Attribut toSelf ist ¨¹berfl¨¹?ig. //private boolean toSelf; private int priority; private String subject; public ActionSendMsg(){ type = Action.SENDMSG; priority = -1; } public ActionSendMsg(int userID, int pri, String subj, String cont){ this(); toUserID = userID; priority = pri; content = cont; subject=subj; } /** * format of msgFromDB: Send Message:<toUserID>:<priority>:<subject> * * @param actionID : id of the action in the database * @param msgFromDB: action descreption * @param content: message content */ public ActionSendMsg(int actionID, String msgFromDB, String content){ this.actionID = actionID; String[] strs = msgFromDB.split(":"); toUserID =Integer.parseInt( strs[1]); priority = Integer.parseInt(strs[2]); subject=strs[3]; this.content = content; } /** * format: Send Message:<toUserID>:<priority>:<subject> */ public String toString() { StringBuffer result = new StringBuffer("Send Message:"); result.append(toUserID+":"); result.append(priority+":"); if (subject == null || subject.equals("")) result.append("No subject"); else result.append(subject); return result.toString(); } /* (non-Javadoc) * @see org.cobricks.agent.Action#toHtmlString() */ public String toHtmlString() { // TODO Auto-generated method stub return null; } /** * @return Returns the priority. */ public int getPriority() { return priority; } /** * @param priority The priority to set. */ public void setPriority(int priority) { this.priority = priority; } /** * @return Returns the toUserID. */ public int getToUserID() { return toUserID; } /** * @param toUserID The toUserID to set. */ public void setToUserID(int toUserID) { this.toUserID = toUserID; } /** * @return Returns the subject. */ public String getSubject(){ return subject; } /** * @param subject The subject to set. */ public void setSubject(String subject){ this.subject=subject; } } --- NEW FILE: ActionRating.java --- /* * Copyright (c) 2003-2005 Cobricks Group. All rights reserved. * * This file is part of a free software package; you can redistribute * it and/or modify it under the terms of the Cobricks Software Licence; * either version 1.0 of the License, or (at your option) any later * version (see www.cobricks.de). * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. */ package org.cobricks.agent; import java.util.ArrayList; import java.util.Iterator; /** * * @author Han Jiang * @author Tong Tong * @author Ye Shen * @version $Date: 2006/02/13 12:37:05 $ */ public class ActionRating extends Action { private int annoID; private String rating; public ActionRating(){ this.type = Action.SETRAT; } /* public ActionSendMail(String et, String subj, String cont){ this(); emailTo = et; subject = subj; content = cont; } */ // Format of mailFromDB: Set Rating:<annoID>:<rating> public ActionRating(int actionID, String ratFromDB){ this.actionID = actionID; String[] cont = ratFromDB.split(":",3); annoID = Integer.parseInt(cont[1]); rating = cont[2]; } /* * @see java.lang.Object#toString() */ public String toString() { StringBuffer result = new StringBuffer("Set Rating:"); result.append(annoID+":"); result.append(rating); return result.toString(); } /** * the output html format for Velocity template * * @see org.cobricks.agent.Action#toHtmlString() * @return the output html format for Velocity template (Ye Shen) * */ public String toHtmlString() { // TODO Auto-generated method stub return null; } /** * @return Returns the subject. */ public int getAnnoID() { return annoID; } /** * @param subject The subject to set. */ public void setAnnoID(int annoID) { this.annoID = annoID; } public String getRating() { return rating; } public void setRating(String rating) { this.rating = rating; } } --- NEW FILE: AgentManager.java --- /* * Copyright (c) 2005 Cobricks Group. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted under the terms of the Cobricks Software * License, either version 1.0 of the License, or (at your option) any * later version (see www.cobricks.org). * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. */ package org.cobricks.agent; import java.util.List; import org.cobricks.core.ComponentManagerInterface; /** * Interface of the manager class of the Message Component. * * @author mic...@ac... * @version $Date: 2006/02/13 12:37:05 $ */ public interface AgentManager extends ComponentManagerInterface { public void obtainRules(); public void insertRuleForUser(int userID, Rule rule); public void delRule(int userID, Rule rule); public void updateRule(int userID, Rule rule); public List getRulesForUser(int userID); } --- NEW FILE: Condition.java --- /* * Copyright (c) 2003-2005 Cobricks Group. All rights reserved. * * This file is part of a free software package; you can redistribute * it and/or modify it under the terms of the Cobricks Software Licence; * either version 1.0 of the License, or (at your option) any later * version (see www.cobricks.de). * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. */ package org.cobricks.agent; import java.util.HashMap; import java.util.Iterator; /** * * @author Han Jiang * @author Tong Tong * @author Ye Shen * @version $Date: 2006/02/13 12:37:05 $ */ public class Condition { private int conditionID; private String domain; private String action; private int userID; private String srcComponent; HashMap attrMap = new HashMap(); public Condition(){ attrMap = new HashMap(); } /** Get a condition from database * //Condition format: * <domain>:<action>:<userID>:<srcComponent>:{<aname>=|<|>|~<avaule>;}* * The character ~ stands for like * @param conditionID : the column rule_conditionID from table user_rulesConditions * @param conFromDB : the column rule_condition from table user_rulesConditions */ public Condition(int conditionID,String conFromDB){ this(conFromDB); this.conditionID = conditionID; } // Get a condition from database public Condition(String conFromDB){ String[] content = conFromDB.split(":"); domain = content[0]; System.out.println(domain); action = content[1]; System.out.println(action); userID = Integer.parseInt(content[2]); System.out.println(userID); srcComponent = content[3]; System.out.println(srcComponent); attrMap = new HashMap(); if (content.length==4) return; System.out.println(content[4]); String[] attrPaars = content[4].split(";"); System.out.println(attrPaars.length); System.out.println(attrPaars[0]); System.out.println(attrPaars[1]); for (int attIndex = 0; attIndex <attrPaars.length; attIndex++){ int type; if (attrPaars[attIndex].indexOf("=")> -1) type = Attribute.EQUAL; else if (attrPaars[attIndex].indexOf(">")> -1) type = Attribute.GREATER; else if (attrPaars[attIndex].indexOf("<")>-1) type = Attribute.SMALLER; else if (attrPaars[attIndex].indexOf("~")> -1) type = Attribute.LIKE; else continue; System.out.println(type); String[] attrPaar = attrPaars[attIndex].split("=|>|<|~"); System.out.println("attrpaar lentt"+attrPaar.length+attrPaar[0]); Attribute attr = new Attribute(attrPaar[0], type, attrPaar[1]); System.out.println(attr); attrMap.put(attrPaar[0], attr); } } // Get a condition from the Browser. Attention: we obtain the conditionID from the database. The value is // equivalent to the maximal ID in the table condition. public Condition(String d, String o, int userid, String s){ domain=d; srcComponent=s; userID= userid; action=o; } /** * <domain>:<action>:<userID>:<srcComponent>:{<aname>=<avaule>;}* * @return Returns the output for database. Save a condition into the database */ public String toString(){ StringBuffer result = new StringBuffer(); result.append(domain+":"+action+":"+userID+":"+srcComponent); if (attrMap ==null || attrMap.isEmpty()) return result.toString(); result.append(":"); for(Iterator keys= attrMap.keySet().iterator(); keys.hasNext();){ Attribute attr= (Attribute)attrMap.get(keys.next()); result.append(attr.toString()); result.append(";"); } result.deleteCharAt(result.length()-1); return result.toString(); } /** * add the attribut for condition * * @param name name of the attribut * @param value value of the attribut */ public void addAttr(String name, int type, String value){ if (type < 0 || type >3) return; Attribute attr = new Attribute (name, type, value); attrMap.put(name, attr); } /** * delete an attribut from the condition * * @param name name of the attribut */ public void delAttr(String name){ attrMap.remove(name); } /** * change the value of an attribut * * @param name name of the attribut * @param newvalue new value of the attribut */ public void changeAttr(String name, int type, String newValue){ delAttr(name); addAttr(name,type, newValue); } /** * the output html format for Velocity template * * @return the output html format for Velocity template (Ye Shen) */ public String toHtmlString(){ // TODO Auto-generated method stub StringBuffer show=new StringBuffer("<tr>"); show.append("<td>"+domain+"</td>"); show.append("<td>"+action+"</td>"); if(userID==0) show.append("<td><color=red>operator is not defined!</color></td>"); else show.append("<td>"+userID+"</td>"); show.append("<td>"+srcComponent+"</td>"); show.append("<td><table border>"); for (Iterator keys = attrMap.keySet().iterator();keys.hasNext();){ String key = (String)keys.next(); Attribute attr= (Attribute)attrMap.get(key); show.append("<tr><td>"+key+"</td><td>"); if (attr.getType()== Attribute.EQUAL) show.append("="); else if (attr.getType()== Attribute.GREATER) show.append(">"); else if (attr.getType()== Attribute.SMALLER) show.append("<"); else show.append(" like "); show.append("</td><td>"); show.append(attr.getValue()); show.append("</td></tr>"); } show.append("</table></td></tr>"); return show.toString(); } public HashMap getAttrMap() { return attrMap; } public int getUserID() { return userID; } public void setUserID(int userID) { this.userID = userID; } /** * @return Returns the conditionID. */ public int getConditionID() { return conditionID; } /** * @param conditionID The conditionID to set. */ public void setConditionID(int conditionID) { this.conditionID = conditionID; } /** * @return Returns the domain. */ public String getDomain() { return domain; } /** * @param domain The domain to set. */ public void setDomain(String domain) { this.domain = domain; } /** * @return Returns the option. */ public String getOption() { return action; } /** * @param option The option to set. */ public void setOption(String option) { this.action = option; } /** * @return Returns the srcComponent. */ public String getSrcComponent() { return srcComponent; } /** * @param srcComponent The srcComponent to set. */ public void setSrcComponent(String srcComponent) { this.srcComponent = srcComponent; } } --- NEW FILE: DRLCreator.java --- /* * Copyright (c) 2003-2005 Cobricks Group. All rights reserved. * * This file is part of a free software package; you can redistribute * it and/or modify it under the terms of the Cobricks Software Licence; * either version 1.0 of the License, or (at your option) any later * version (see www.cobricks.de). * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. */ package org.cobricks.agent; import java.util.Map; import java.util.Iterator; import java.util.List; import java.io.BufferedOutputStream; import java.io.FileOutputStream; import org.apache.log4j.Logger; import org.cobricks.core.CoreManager; import org.cobricks.user.User; import org.cobricks.user.UserManager; /** * * @author Han Jiang * @author Tong Tong * @author Ye Shen * @version $Date: 2006/02/13 12:37:05 $ */ public class DRLCreator { static Logger logger = Logger.getLogger(DRLCreator.class); Map totalRules; CoreManager coreManager; String DRL_dir; public DRLCreator(Map totalRules, String dir,CoreManager coreManager) { this.totalRules = totalRules; this.coreManager = coreManager; DRL_dir=dir; int key=-1; createDRL(key); } public DRLCreator(Map totalRules, String dir, int userid, CoreManager coreManager){ this.totalRules=totalRules; this.coreManager=coreManager; DRL_dir=dir; createDRL(userid); } public void createDRL(int key){ BufferedOutputStream bos; byte[] b; try { if(key==-1) bos = new BufferedOutputStream(new FileOutputStream(DRL_dir.concat("Agent.java.drl"))); else bos = new BufferedOutputStream(new FileOutputStream(DRL_dir.concat("Agent_"+key+".java.drl"))); String top="<?xml version=\"1.0\"?>\n" + "<rule-set name=\"Agent\"\n" + "xmlns=\"http://drools.org/rules\"\n" + "xmlns:java=\"http://drools.org/semantics/java\"\n" + "xmlns:xs=\"http://www.w3.org/2001/XMLSchema-instance\"\n" + "xs:schemaLocation=\"http://drools.org/rules rules.xsd\n" + "http://drools.org/semantics/java java.xsd\">\n"; b=top.getBytes(); bos.write(b); bos.close(); createDRL_function(key); Iterator iterator = totalRules.entrySet().iterator(); if(key==-1){ while(iterator.hasNext()){ List rulesForUser = (List)iterator.next(); if (rulesForUser == null || rulesForUser.isEmpty()) continue; for (int i=0; i<rulesForUser.size();i++){ Rule rule = (Rule)rulesForUser.get(i); String ru="<rule name=\""+rule.getRuleID()+"\">\n" + "<parameter identifier=\"coreManager\">\n" + "<class>CoreManager</class>\n" + "</parameter>\n" + "<parameter identifier=\"creator\">\n" + "<class>User</class>\n" + "</parameter>\n" + "<parameter identifier=\"domain\">\n" + "<class>String</class>\n" + "</parameter>\n"+ "<parameter identifier=\"opt\">\n" + "<class>String</class>\n" + "</parameter>\n"+ "<parameter identifier=\"src\">\n" + "<class>String</class>\n" + "</parameter>\n"; b=ru.getBytes(); bos = new BufferedOutputStream(new FileOutputStream(DRL_dir.concat("Agent_"+key+".java.drl"),true)); bos.write(b); bos.close(); createDRL_rule(key, rule.getConditions(), rule.getActions()); ru="</rule>\n"; b=ru.getBytes(); bos = new BufferedOutputStream(new FileOutputStream(DRL_dir.concat("Agent_"+key+".java.drl"),true)); bos.write(b); bos.close(); } } String end="</rule-set>"; b=end.getBytes(); bos = new BufferedOutputStream(new FileOutputStream(DRL_dir.concat("Agent_"+key+".java.drl"),true)); bos.write(b); bos.close(); } else{ List rulesForUser = (List)totalRules.get(new Integer(key)); if (rulesForUser == null || rulesForUser.isEmpty()) logger.debug("ERROR:this user has no rules!"); else {for (int i=0; i<rulesForUser.size();i++) { Rule rule = (Rule)rulesForUser.get(i); String ru="<rule name=\""+rule.getRuleID()+"\">\n" + "<parameter identifier=\"coreManager\">\n" + "<class>CoreManager</class>\n" + "</parameter>\n" + "<parameter identifier=\"creator\">\n" + "<class>User</class>\n" + "</parameter>\n" + "<parameter identifier=\"domain\">\n" + "<class>String</class>\n" + "</parameter>\n"+ "<parameter identifier=\"opt\">\n" + "<class>String</class>\n" + "</parameter>\n"+ "<parameter identifier=\"src\">\n" + "<class>String</class>\n" + "</parameter>\n"; b=ru.getBytes(); bos = new BufferedOutputStream(new FileOutputStream(DRL_dir.concat("Agent_"+key+".java.drl"),true)); bos.write(b); bos.close(); createDRL_rule(key, rule.getConditions(), rule.getActions()); ru="</rule>\n"; b=ru.getBytes(); bos = new BufferedOutputStream(new FileOutputStream(DRL_dir.concat("Agent_"+key+".java.drl"),true)); bos.write(b); bos.close(); } } String end="</rule-set>"; b=end.getBytes(); bos = new BufferedOutputStream(new FileOutputStream(DRL_dir.concat("Agent_"+key+".java.drl"),true)); bos.write(b); bos.close(); } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } public void createDRL_function(int key){ BufferedOutputStream bos; byte[] b; try { if(key==-1) bos = new BufferedOutputStream(new FileOutputStream(DRL_dir.concat("Agent.java.drl"),true)); else bos = new BufferedOutputStream(new FileOutputStream(DRL_dir.concat("Agent_"+key+".java.drl"),true)); String ac= "<import>org.cobricks.user.*</import>\n" + "<import>org.cobricks.category.*</import>\n"+ "<import>org.cobricks.item.*</import>\n"+ "<import>org.cobricks.context.*</import>\n"+ "<import>org.cobricks.core.util.MailUtil</import>\n"+ "<import>org.cobricks.message.MessageManager</import>\n" + "<import>org.cobricks.message.MessageManagerImpl</import>\n" + "<import>org.cobricks.core.ComponentDirectory</import>\n" + "<import>org.cobricks.message.Message</import>\n" + "<import>org.cobricks.core.CoreManager</import>\n" + "<import>java.lang.Object</import>\n" + "<import>java.lang.String</import>\n" + "<import>java.io.IOException</import>\n"+ "<import>java.util.Date</import>\n"+ "<import>java.util.Map</import>\n"+ "<import>java.util.HashMap</import>\n"+ "<import>java.util.List</import>\n"+ "<import>java.util.Iterator</import>\n"+ "<java:functions>\n"; ac=ac+"public void sendMsg(CoreManager coreManager,User creator, int recipientID, int priority, String subject, String message_content)\n" + "{\n" + "try{\n" + "MessageManager m;\n" + "ComponentDirectory componentDirectory = coreManager.getComponentDirectory();\n" + "m= (MessageManager)componentDirectory.getManager(\"messageManager\");\n" + "Message message = new Message();\n" + "message.addRecipient(recipientID);\n" + "message.setSubject(subject);\n" + "message.setPriority(priority);\n" + "message.setContent(message_content);\n" + "m.sendMessage(message, creator);\n" + "}\n" + "catch(Exception e){\n" + "System.out.print(e.toString());\n" + "}\n" + "}\n" ; ac=ac+"public void sendEmail(CoreManager coreManager, String smtphost, String emailfrom, String emailaddr, String subject, String m)\n"+ "{\n"+ "try{\n"+ "String emailto=new String();\n"+ "if(emailaddr.split(\"@\").length==1){\n"+ "UserManager userManager = (UserManager)coreManager.getComponentDirectory().getManager(\"userManager\");\n"+ "int id=userManager.getUserIdForUserLogin(emailaddr);\n"+ "User emailtouser=userManager.getUser(id);\n"+ "emailto = emailtouser.getAttributeAsString(User.EMAIL);\n"+ "}\n"+ "else if(emailaddr.split(\"@\").length==2){\n"+ "emailto=emailaddr;"+ "}\n"+ "MailUtil.sendMail(smtphost, emailto, emailfrom, subject, m);\n"+ "}\n" + "catch(Exception e){\n" + "System.out.print(e.toString());\n" + "}\n" + "}\n"; ac=ac+"public void setAttr(CoreManager coreManager,Item item,int id, String aname, String value)"+ "{\n"+ "try{\n"+ "if(id==0){\n"+ "item.setAttribute(aname,value);\n"+ "}\n"+ "else{\n"+ "ItemManager itemManager=(ItemManager)coreManager.getComponentDirectory().getManager(\"itemManager\");\n"+ "Item item=itemManager.getItem(id);\n"+ "item.setAttribute(aname,value);\n"+ "}\n"+ "}\n" + "catch(Exception e){\n" + "System.out.print(e.toString());\n" + "}\n" + "}\n"; ac=ac+"public void setAttr(CoreManager coreManager, Category category,int id, String aname, String value)"+ "{\n"+ "try{\n"+ "if(id==0){\n"+ "id=category.getId();\n"+ "}\n"+ "else{\n"+ "CategoryManager categoryManager=(CategoryManager)coreManager.getComponentDirectory().getManager(\"categoryManager\");\n"+ "Category category=categoryManager.getCategory(id);\n"+ "category.setAttribute(aname,value);\n"+ "}\n"+ "}\n" + "catch(Exception e){\n" + "System.out.print(e.toString());\n" + "}\n" + "}\n"; ac=ac+"public void setAttr(CoreManager coreManager, Context context,int id, String aname, String value)"+ "{\n"+ "try{\n"+ "if(id==0){\n"+ "id=context.getId();\n"+ "}\n"+ "else{\n"+ "ContextManager contextManager=(ContextManager)coreManager.getComponentDirectory().getManager(\"contextManager\");\n"+ "Context context=contextManager.getContext(id);\n"+ "context.setAttribute(aname,value);\n"+ "}\n"+ "}\n" + "catch(Exception e){\n" + "System.out.print(e.toString());\n" + "}\n" + "}\n"; ac=ac+"public void setAnnotation(CoreManager coreManager, User creator, Item item, String lang, String title, String content, int rating){\n"+ "try{"+ "ItemManager itemManager=(ItemManager)coreManager.getComponentDirectory().getManager(\"itemManager\");\n"+ "int aitemid=item.getAnnotationCount()+1;\n"+ "Date datum=new Date();\n"+ "ItemAnnotation itemannotation=new ItemAnnotation(itemManager,aitemid, item.getId(), creator.getId(), datum, lang, title, content, rating);\n"+ "item.addItemAnnotation(itemannotation... [truncated message content] |