You can subscribe to this list here.
| 2004 |
Jan
|
Feb
(11) |
Mar
(106) |
Apr
(146) |
May
(79) |
Jun
(233) |
Jul
(218) |
Aug
(160) |
Sep
(155) |
Oct
(80) |
Nov
(176) |
Dec
(115) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(77) |
Feb
(106) |
Mar
(10) |
Apr
(54) |
May
(29) |
Jun
(29) |
Jul
(65) |
Aug
(80) |
Sep
|
Oct
(42) |
Nov
(45) |
Dec
(33) |
| 2006 |
Jan
(49) |
Feb
(52) |
Mar
(8) |
Apr
(3) |
May
(108) |
Jun
(43) |
Jul
(13) |
Aug
(1) |
Sep
(58) |
Oct
(66) |
Nov
(70) |
Dec
(115) |
| 2007 |
Jan
(26) |
Feb
(3) |
Mar
(17) |
Apr
(1) |
May
(4) |
Jun
(3) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(1) |
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
(10) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
| 2009 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Michael K. <ko...@us...> - 2006-12-11 10:08:13
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/item In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv24156/org/cobricks/item Modified Files: ItemSearch.java Log Message: Index: ItemSearch.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/item/ItemSearch.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- ItemSearch.java 29 Nov 2006 15:15:59 -0000 1.29 +++ ItemSearch.java 11 Dec 2006 10:08:05 -0000 1.30 @@ -1468,7 +1468,7 @@ (new parser(new Lexer(new StringReader(query))).parse()).value; } catch (Exception e) { - logger.warn(LogUtil.exall("Parsing failed!", e)); + logger.warn(LogUtil.exall("Parsing query "+query+" failed!", e)); logger.info("Could not parse query!\n Please try again."); return sqlResults; } |
|
From: Michael K. <ko...@us...> - 2006-12-10 21:51:21
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/core/db In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv14159 Modified Files: DBAccess.java DBAccessImpl.java Log Message: Index: DBAccessImpl.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/core/db/DBAccessImpl.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- DBAccessImpl.java 8 Dec 2006 16:22:41 -0000 1.31 +++ DBAccessImpl.java 10 Dec 2006 21:51:16 -0000 1.32 @@ -1481,6 +1481,63 @@ { return dataSource.getConnection(); } + + + /** + * + */ + public List getTables() + { + List result = new ArrayList(); + try { + Connection conn = dataSource.getConnection(); + DatabaseMetaData databaseMetaData = conn.getMetaData(); + String[] ocat = { "TABLE" }; + ResultSet rs = databaseMetaData.getTables(null, "%", "%", ocat); + if (rs != null) { + while (rs.next()) { + String tabletype = rs.getString(4); + if (tabletype!=null && + !tabletype.equalsIgnoreCase("table")) continue; + String tablename = rs.getString(3); + result.add(tablename); + } + } + } catch (Exception e) { } + return result; + } + public List getColumns(String tablename) + { + List result = new ArrayList(); + try { + Connection conn = dataSource.getConnection(); + DatabaseMetaData databaseMetaData = conn.getMetaData(); + ResultSet rs = + databaseMetaData.getColumns(null, "%", tablename, "%"); + if (rs != null) { + while (rs.next()) { + String colname = rs.getString(4); + String typename = rs.getString(6); + typename = typename.toLowerCase(); + int datatype = rs.getInt(5); + // int = 4, varchar = 12, date = 91, ts = 93 + int datasize = rs.getInt(7); + int nullable = rs.getInt("NULLABLE"); + String s = "<tr><td>" + colname + "</td><td>" + + typename + "(" + + datasize + ")</td>"; + if (nullable == 0) + s += "<td>not null</td>"; + else + s += "<td></td>"; + s += "</tr>"; + result.add(s); + } + } + } catch (Exception e) { } + return result; + } + } Index: DBAccess.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/core/db/DBAccess.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- DBAccess.java 8 Dec 2006 16:22:40 -0000 1.13 +++ DBAccess.java 10 Dec 2006 21:51:16 -0000 1.14 @@ -89,4 +89,7 @@ public Connection getConnection() throws SQLException; + public List getTables(); + public List getColumns(String tablename); + } |
|
From: Michael K. <ko...@us...> - 2006-12-10 18:35:43
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/portal In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7672 Modified Files: PortalPresenter.java Log Message: Index: PortalPresenter.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/portal/PortalPresenter.java,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- PortalPresenter.java 8 Dec 2006 16:22:41 -0000 1.55 +++ PortalPresenter.java 10 Dec 2006 18:35:39 -0000 1.56 @@ -46,9 +46,11 @@ import org.cobricks.core.util.DateUtil; import org.cobricks.core.util.LogUtil; import org.cobricks.core.util.MailUtil; +import org.cobricks.core.util.NewsUtil; import org.cobricks.core.util.XMLStylesheetTransformer; import org.cobricks.item.ItemManager; import org.cobricks.category.CategoryPresenter; +import org.cobricks.user.User; /** * Collection of methods for the Portal Component user interface. @@ -1035,6 +1037,37 @@ /** + * Post article in Usenet News - the text is constructed from a + * template in the web space + */ + public String postNews(String newsgroup, String subject, + String templatename, PortalRequest portalRequest) + { + if (newsgroup == null || newsgroup.length()<1) { + newsgroup = coreManager.getProperty("news.default.newsgroup"); + } + if (newsgroup == null || newsgroup.length()<1) { + return null; + } + + String content = parse(templatename, portalRequest); + + String sender = coreManager.getProperty("news.default.sender"); + PortalUser puser = portalRequest.getPortalUser(); + if (puser != null) { + User user = puser.getUser(); + if (user != null) { + sender = user.getEmail(); + } + } + + NewsUtil.postArticle(newsgroup, subject, + content.toString(), sender); + return null; + } + + + /** * Return all cookies of the request */ public String getCookies(PortalRequest portalRequest) |
|
From: Michael K. <ko...@us...> - 2006-12-10 18:35:12
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/core/util In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7276 Modified Files: MailUtil.java Added Files: NewsUtil.java Log Message: --- NEW FILE: NewsUtil.java --- /* * Copyright (c) 2006 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.core.util; import java.io.*; import java.util.*; import org.apache.log4j.Logger; /** * Class with static methods for posting news * * @author mic...@ac... * @version $Date: 2006/12/10 18:35:05 $ */ public class NewsUtil { static Logger logger = Logger.getLogger(NewsUtil.class); static public void postArticle(String newsgroups, String subject, String content) { postArticle(newsgroups, subject, content, null); } static public void postArticle(String newsgroups, String subject, String content, String from) { try { File tmpfile = File.createTempFile("news", ".txt"); String filename = tmpfile.getAbsolutePath(); PrintWriter out = new PrintWriter(new FileWriter(tmpfile)); out.println("Newsgroups: "+newsgroups); out.println("Subject: "+subject); if (from != null) { out.println("From: "+from); } out.println("Distribution: world"); out.println("Organization: Technische Universität München, "+ "Institut für Informatik"); out.println(""); out.println(content); out.println(""); out.flush(); out.close(); String[] cmdarr = new String[3]; cmdarr[0] = "/bin/sh"; cmdarr[1] = "-c"; cmdarr[2] = "/bin/cat "+filename+" | /usr/bin/inews -h"; Runtime rt = Runtime.getRuntime(); Process p = rt.exec(cmdarr); System.err.println("posting initiated"); } catch(Exception e) { e.printStackTrace(System.err); } } } Index: MailUtil.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/core/util/MailUtil.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- MailUtil.java 8 Dec 2006 07:48:07 -0000 1.6 +++ MailUtil.java 10 Dec 2006 18:35:05 -0000 1.7 @@ -18,7 +18,7 @@ import javax.mail.*; import javax.mail.internet.*; -import org.apache.log4j.*; +import org.apache.log4j.Logger; /** |
|
From: Michael K. <ko...@us...> - 2006-12-08 16:23:58
|
Update of /cvsroot/cobricks/drehscheibe-in In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv905 Modified Files: build.xml Log Message: Index: build.xml =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/build.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- build.xml 8 Dec 2006 07:43:14 -0000 1.8 +++ build.xml 8 Dec 2006 16:23:54 -0000 1.9 @@ -141,20 +141,8 @@ <!-- Create JAR file for webspace --> <jar destfile="${dist.home}/webapp.jar" basedir="${build.home}/webapps/${webappname}"> - <include name="user/**" /> - <include name="portal/**" /> <include name="myintum/kurs_verwaltung/**" /> <include name="ADMIN/**" /> - <!-- - <include name="course/**" /> - <include name="item/**" /> - <include name="notfound.html.de" /> - <include name="noaccess.html.de" /> - <include name="noaccess-expired.html.de" /> - <include name="notfound.html.en" /> - <include name="noaccess.html.en" /> - <include name="noaccess-expired.html.en" /> - --> </jar> </target> |
|
From: Michael K. <ko...@us...> - 2006-12-08 16:22:54
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/message In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv586/org/cobricks/message Modified Files: MessageManagerImpl.java Log Message: Index: MessageManagerImpl.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/message/MessageManagerImpl.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- MessageManagerImpl.java 7 Dec 2006 11:50:54 -0000 1.12 +++ MessageManagerImpl.java 8 Dec 2006 16:22:41 -0000 1.13 @@ -692,10 +692,6 @@ velocityContext.put("obj", o); Velocity.evaluate(velocityContext, sw, "message template", templ); - // different subject for email - if (o instanceof Item) { - subject = "[Item] "+((Item)o).getTitle(); - } } catch (Exception e) { logger.warn(LogUtil.ex("failed parsing template", e)); } |
|
From: Michael K. <ko...@us...> - 2006-12-08 16:22:45
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/course/db In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv586/org/cobricks/course/db Modified Files: tables.txt Log Message: Index: tables.txt =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/course/db/tables.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- tables.txt 30 Nov 2006 14:01:59 -0000 1.3 +++ tables.txt 8 Dec 2006 16:22:41 -0000 1.4 @@ -9,4 +9,5 @@ course_room course_module course_timetable +course_log course |
|
From: Michael K. <ko...@us...> - 2006-12-08 16:22:45
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/core/db In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv586/org/cobricks/core/db Modified Files: DBAccess.java DBAccessImpl.java Log Message: Index: DBAccessImpl.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/core/db/DBAccessImpl.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- DBAccessImpl.java 30 Nov 2006 14:01:59 -0000 1.30 +++ DBAccessImpl.java 8 Dec 2006 16:22:41 -0000 1.31 @@ -1238,26 +1238,48 @@ public String sqlExecute(String sql) { - return sqlExecute(sql, false); + return sqlExecute(sql, null, false); } + public String sqlExecute(String sql, List objects) + { + return sqlExecute(sql, objects, false); + } + + public String sqlExecute(String sql, boolean donotlogerrors) + { + return sqlExecute(sql, null, donotlogerrors); + } + /** * Execute the given SQL statement. * * @param donotlogerrors if true, then exceptions will not be logged */ - public String sqlExecute(String sql, boolean donotlogerrors) + public String sqlExecute(String sql, List objects, + boolean donotlogerrors) { if (sql==null || sql.trim().length()<1) return ""; logger.debug("sqlExecute("+sql+")"); String result = ""; Connection conn = null; + PreparedStatement pstmt = null; Statement stmt = null; try { conn = dataSource.getConnection(); - stmt = conn.createStatement(); - if (dbtype == DBTYPE_ORACLE) stmt.setEscapeProcessing(false); - stmt.executeUpdate(sql); + if (objects == null || objects.size()<1) { + stmt = conn.createStatement(); + if (dbtype == DBTYPE_ORACLE) stmt.setEscapeProcessing(false); + stmt.executeUpdate(sql); + } else { + pstmt = conn.prepareStatement(sql); + if (dbtype == DBTYPE_ORACLE) pstmt.setEscapeProcessing(false); + ListIterator li = objects.listIterator(); + for (int i=1; i<=objects.size(); i++) { + setPreparedObject(pstmt, li.next(), i, null); + } + pstmt.execute(); + } } catch(Exception e) { if (donotlogerrors) logger.error("Failed executing sql statement"); @@ -1268,6 +1290,7 @@ } } finally { try { stmt.close(); } catch (Exception e) { } + try { pstmt.close(); } catch (Exception e) { } try { conn.close(); } catch (Exception e) { } } return result; Index: DBAccess.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/core/db/DBAccess.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- DBAccess.java 24 Nov 2006 12:53:28 -0000 1.12 +++ DBAccess.java 8 Dec 2006 16:22:40 -0000 1.13 @@ -68,6 +68,7 @@ public Map sqlQuerySingleRow(String sql); public String sqlExecute(String sql); + public String sqlExecute(String sql, List objects); public String sqlExecute(String sql, boolean donotlogerrors); // create a new value for the primary key column of the given table |
|
From: Michael K. <ko...@us...> - 2006-12-08 16:22:45
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/course In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv586/org/cobricks/course Modified Files: Course.java CourseManager.java CourseManagerImpl.java CoursePresenter.java CourseServlet.java Log Message: Index: CourseManager.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/course/CourseManager.java,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- CourseManager.java 30 Nov 2006 14:01:59 -0000 1.33 +++ CourseManager.java 8 Dec 2006 16:22:41 -0000 1.34 @@ -12,6 +12,7 @@ package org.cobricks.course; +import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -592,4 +593,16 @@ public int getLecturerIdByName(String lname); + + public List getCourseUpdateHistory(int cid, Date fromdate); + public List getCourseUpdateHistory(int cid); + public List getCourseModuleUpdateHistory(int cmid, boolean includecourses, + Date fromdate); + public List getCourseModuleUpdateHistory(int cmid); + public void addCourseUpdateHistory(String acc, + int cid, int cmid, int userid, + String cterm, String cname, + String hostname, Date logtime); + public void resetCourseUpdateHistory(Date todate); + } Index: CoursePresenter.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/course/CoursePresenter.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- CoursePresenter.java 6 Dec 2006 09:39:18 -0000 1.26 +++ CoursePresenter.java 8 Dec 2006 16:22:41 -0000 1.27 @@ -144,14 +144,6 @@ return null; } - public List getSemesters() { - ArrayList al = new ArrayList(); - al.add(new String[] {"2000s","SS 2000"}); - al.add(new String[] {"2000w","WS 2000/2001"}); - al.add(new String[] {"2001s","SS 2001"}); - return al; - } - public List getDaysofWeek() { ArrayList al = new ArrayList(); al.add(new String[] {"1","Mo"}); Index: CourseServlet.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/course/CourseServlet.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- CourseServlet.java 6 Dec 2006 09:39:18 -0000 1.26 +++ CourseServlet.java 8 Dec 2006 16:22:41 -0000 1.27 @@ -16,6 +16,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.HashMap; +import java.util.Date; import java.util.Iterator; import java.util.List; import java.util.Map; @@ -23,6 +24,8 @@ import java.util.StringTokenizer; import javax.servlet.ServletConfig; import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import org.apache.log4j.Logger; @@ -349,6 +352,20 @@ try { int cid = courseManager.createCourse(attrs, portalUser.getUser()); + Course c = courseManager.getCourse(cid); + + HttpServletRequest request = prequest.getHttpServletRequest(); + String hostname = request.getRemoteHost(); + if (hostname == null) + hostname = request.getRemoteAddr(); + courseManager. + addCourseUpdateHistory("create", cid, + c.getCourseModule().getId(), + portalUser.getUserId(), + c.getTerm(), + c.getFullName(), + hostname, new Date()); + prequest.setReturnCode(1001); return "success"; } catch (Exception e) { @@ -390,7 +407,21 @@ try { int cid = Integer.parseInt(prequest.getRequestParameter("cid")); + Course c = courseManager.getCourse(cid); courseManager.updateCourse(cid, attrs, portalUser.getUser()); + + HttpServletRequest request = prequest.getHttpServletRequest(); + String hostname = request.getRemoteHost(); + if (hostname == null) + hostname = request.getRemoteAddr(); + courseManager. + addCourseUpdateHistory("update", cid, + c.getCourseModule().getId(), + portalUser.getUserId(), + c.getTerm(), + c.getFullName(), + hostname, new Date()); + prequest.setReturnCode(1002); return "success"; } catch (Exception e) { @@ -426,7 +457,21 @@ try { int cid = Integer.parseInt(prequest.getRequestParameter("cid")); + Course c = courseManager.getCourse(cid); courseManager.deleteCourse(cid, portalUser.getUser()); + + HttpServletRequest request = prequest.getHttpServletRequest(); + String hostname = request.getRemoteHost(); + if (hostname == null) + hostname = request.getRemoteAddr(); + courseManager. + addCourseUpdateHistory("delete", cid, + c.getCourseModule().getId(), + portalUser.getUserId(), + c.getTerm(), + c.getFullName(), + hostname, new Date()); + prequest.setReturnCode(1003); return "success"; } catch (Exception e) { Index: CourseManagerImpl.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/course/CourseManagerImpl.java,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- CourseManagerImpl.java 6 Dec 2006 09:39:18 -0000 1.60 +++ CourseManagerImpl.java 8 Dec 2006 16:22:41 -0000 1.61 @@ -254,19 +254,30 @@ if (o != null) sqlAttrs2.put("dcrid", o); o = attrs.get("dstartdate"+i); if ((o!=null) && (o.toString().length()>1)) { + if (!(o instanceof Date)) { + o = DateUtil.string2Date(o.toString()); + } sqlAttrs2.put("dstartdate", o); - } else sqlAttrs2.put("dstartdate", - CoursePresenter. - getTermStartDateAsDate((String)sqlAttrs. - get("cterm"))); + } else { + sqlAttrs2. + put("dstartdate", + CoursePresenter. + getTermStartDateAsDate((String)sqlAttrs. + get("cterm"))); + } o = attrs.get("denddate"+i); - if ((o!=null) && (o.toString().length()>1)) + if ((o!=null) && (o.toString().length()>1)) { + if (!(o instanceof Date)) { + o = DateUtil.string2Date(o.toString()); + } sqlAttrs2.put("denddate", o); - else - sqlAttrs2.put("denddate", - CoursePresenter. - getTermEndDateAsDate((String)sqlAttrs. + } else { + sqlAttrs2. + put("denddate", + CoursePresenter. + getTermEndDateAsDate((String)sqlAttrs. get("cterm"))); + } o = attrs.get("dcycle"+i); if (o != null) sqlAttrs2.put("dcycle", o); o = attrs.get("dtype"+i); @@ -557,8 +568,19 @@ where += "AND cmtype = '"+attrs.get("cmtype")+"' "; if (attrs.get("cmhidden")!=null) where += "AND cmhidden = '"+attrs.get("cmhidden")+"' "; - if (attrs.get("cterm")!=null) - where += "AND cterm = '"+attrs.get("cterm")+"' "; + if (attrs.get("cterm")!=null) { + String tmps = (String)attrs.get("ctermadd"); + int count = 1; + try { count = Integer.parseInt(tmps); } catch (Exception e) {} + tmps = (String)attrs.get("cterm"); + where += ("AND (cterm = '"+tmps+"'"); + while (count>1) { + count--; + tmps = getNextTerm(tmps); + where += (" OR cterm='"+tmps+"'"); + } + where += ")"; + } if (attrs.get("cycle")!=null) where += "AND cmcycle = '"+attrs.get("cycle")+"' "; if (attrs.get("clang")!=null) @@ -592,7 +614,8 @@ } if (attrs.get("crid")!=null) { from = checkAndConcat(from,",course_date "); - where = checkAndConcat(where,"AND course_date.cid = course.cid "); + where = + checkAndConcat(where,"AND course_date.cid = course.cid "); where += "AND course_date.dcrid = '"+attrs.get("crid")+"' "; } if (attrs.get("weekday")!=null) { @@ -2305,7 +2328,143 @@ } return 0; } - + + + /** + * + */ + public List getCourseUpdateHistory(int cid, Date fromdate) + { + List result = new ArrayList(); + String sql = "select * " + +"from course_log where cid="+Integer.toString(cid); + List sqlObjects = new ArrayList(); + if (fromdate != null) { + sql += " and logtime >= ?"; + sqlObjects.add(fromdate); + } + sql += " order by logtime desc"; + List sqlres = dbAccess.sqlQuery(sql); + ListIterator i = sqlres.listIterator(); + while (i.hasNext()) { + Map m = (Map)i.next(); + result.add(m); + } + return result; + } + + public List getCourseUpdateHistory(int cid) + { + return getCourseUpdateHistory(cid, null); + } + + public List getCourseModuleUpdateHistory(int cmid, boolean includecourses, + Date fromdate) + { + List result = new ArrayList(); + String sql = "select * " + +"from course_log where cmid="+Integer.toString(cmid); + List sqlObjects = new ArrayList(); + if (fromdate != null) { + sql += " and logtime >= ?"; + sqlObjects.add(fromdate); + } + if (!includecourses) { + sql += " and cid = 0"; + } + sql += " order by logtime desc"; + List sqlres = dbAccess.sqlQuery(sql); + ListIterator i = sqlres.listIterator(); + while (i.hasNext()) { + Map m = (Map)i.next(); + result.add(m); + } + return result; + } + + public List getCourseModuleUpdateHistory(int cmid) + { + return getCourseModuleUpdateHistory(cmid, true, null); + } + + + /** + * + */ + public void addCourseUpdateHistory(String acc, + int cid, int cmid, int userid, + String cterm, String cname, + String hostname, Date logtime) + { + logger.debug("add course log entry"); + Map attrs = new HashMap(); + attrs.put("acc", acc); + attrs.put("cid", new Integer(cid)); + attrs.put("cmid", new Integer(cmid)); + attrs.put("loguid", new Integer(userid)); + if (cterm != null) + attrs.put("cterm", cterm); + if (cname != null) + attrs.put("cname", cname); + if (hostname != null) + attrs.put("hostname", hostname); + if (logtime == null) + logtime = new Date(); + attrs.put("logtime", logtime); + dbAccess.sqlInsert("course_log", attrs); + } + + + /** + * + */ + public void resetCourseUpdateHistory(Date todate) + { + if (todate == null) return; + String sql = "delete from course_log where logtime < ?"; + List sqlObjects = new ArrayList(); + sqlObjects.add(todate); + dbAccess.sqlExecute(sql, sqlObjects); + } + + + /** + * + */ + public String getPrevTerm(String cterm) + { + try { + String sem = cterm.substring(4,5); + int year = Integer.parseInt(cterm.substring(0,4)); + if (sem.equals("w")) { + sem = "s"; + } else { + year--; + sem = "w"; + } + return Integer.toString(year)+sem; + } catch (Exception e) { + } + return cterm; + } + + public String getNextTerm(String cterm) + { + try { + String sem = cterm.substring(4,5); + int year = Integer.parseInt(cterm.substring(0,4)); + if (sem.equals("w")) { + year++; + sem = "s"; + } else { + sem = "w"; + } + return Integer.toString(year)+sem; + } catch (Exception e) { + } + return cterm; + } + /** * Index: Course.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/course/Course.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- Course.java 18 Oct 2006 16:47:50 -0000 1.23 +++ Course.java 8 Dec 2006 16:22:41 -0000 1.24 @@ -320,7 +320,18 @@ return (Date)attrs.get("clastupdate"); } - /** Returns<br /> + /** + * @return Date of the last course update + */ + public int getLastUpdateUserId() + { + Integer i = (Integer)attrs.get("clastupdateuserid"); + if (i == null) return(0); + return i.intValue(); + } + + + /** Returns * 0 if the course is not imported<br /> * 1 if the course is imported for example from the univus system * @return int which represents one of the import states |
|
From: Michael K. <ko...@us...> - 2006-12-08 16:22:45
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/portal In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv586/org/cobricks/portal Modified Files: PortalPresenter.java Log Message: Index: PortalPresenter.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/portal/PortalPresenter.java,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- PortalPresenter.java 6 Dec 2006 09:41:30 -0000 1.54 +++ PortalPresenter.java 8 Dec 2006 16:22:41 -0000 1.55 @@ -966,6 +966,7 @@ public String dateFormat(String lang, Object o) { + if (o == null) return ""; if (o instanceof Date) { try { DateFormat df = getDateTimeFormatter(lang, true); |
|
From: Michael K. <ko...@us...> - 2006-12-08 12:52:35
|
Update of /cvsroot/cobricks/cobricks2/web/WEB-INF/conf In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29147 Added Files: log.properties.orig velocity.properties Log Message: --- NEW FILE: velocity.properties --- # logging runtime.log.logsystem.class=org.apache.velocity.runtime.log.SimpleLog4JLogSystem runtime.log.logsystem.log4j.category=org.cobricks.portal.velocity runtime.log.invalid.references=false # portal manager resource loader for loading templates from the # webspace (file system or database) resource.loader=portal portal.resource.loader.description= portal.resource.loader.class=org.cobricks.portal.velocity.PortalResourceLoader portal.resource.loader.cache=false portal.resource.loader.modificationCheckInterval=0 velocimacro.library=velocity.macro.library.vm --- NEW FILE: log.properties.orig --- log4j.rootLogger=INFO,A1 log4j.appender.A1=org.apache.log4j.ConsoleAppender log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%7p (%F:%L) - %m%n log4j.appender.A1.Encoding=UTF-8 log4j.logger.org.cobricks=DEBUG log4j.logger.org.cobricks.portal.velocity=WARN log4j.logger.org.apache=WARN log4j.logger.javax.xml=WARN log4j.defaultInitOverride=true |
|
From: Michael K. <ko...@us...> - 2006-12-08 12:49:08
|
Update of /cvsroot/cobricks/drehscheibe-in/tomcat/5.0/webapps In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv28334 Added Files: readme.txt Log Message: --- NEW FILE: readme.txt --- platzhalter |
|
From: Michael K. <ko...@us...> - 2006-12-08 12:47:54
|
Update of /cvsroot/cobricks/drehscheibe-in/web/WEB-INF/conf/org.cobricks.message/templates In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27948/conf/org.cobricks.message/templates Added Files: item.txt itemshort.txt Log Message: --- NEW FILE: item.txt --- ITEM PUBLISHED ON COBRICKS PLATFORM (created by by $obj.getAttributeQualified("creator",$coreManager).getName() at $portalPresenter.formatDate($obj.getAttribute("creationtime"))) $obj.getTitle() $corePresenter.formatText($obj.getContent(),76,-1) --- NEW FILE: itemshort.txt --- TITLE: $obj.getTitle() (created by by $obj.getAttributeQualified("creator",$coreManager).getName() at $portalPresenter.formatDate($obj.getAttribute("creationtime"))) $corePresenter.formatText($obj.getContent(),76,5) |
|
From: Michael K. <ko...@us...> - 2006-12-08 12:47:54
|
Update of /cvsroot/cobricks/drehscheibe-in/web/WEB-INF/conf In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27948/conf Added Files: itemontology.xml userontology.xml velocity.macro.library.vm velocity.properties Log Message: --- NEW FILE: velocity.properties --- # logging runtime.log.logsystem.class=org.apache.velocity.runtime.log.SimpleLog4JLogSystem runtime.log.logsystem.log4j.category=org.cobricks.portal.velocity runtime.log.invalid.references=false # portal manager resource loader for loading templates from the # webspace (file system or database) resource.loader=portal portal.resource.loader.description= portal.resource.loader.class=org.cobricks.portal.velocity.PortalResourceLoader portal.resource.loader.cache=false portal.resource.loader.modificationCheckInterval=0 velocimacro.library=velocity.macro.library.vm --- NEW FILE: userontology.xml --- <userontology> <class name="universityuser" parent="user"> <attr name="basic.university.status" type="string(10)"> <description lang="de">Universitaet Status</description> <description lang="en">University Status</description> <value>---</value> <value>Student</value> <value>Alumni</value> <value>Mitarbeiter</value> <value>Professor</value> <value>Dozent</value> <value>Gast</value> <value>Extern</value> </attr> <attr name="basic.university.graduation" type="int"> <description lang="de">Abschlussjahr</description> <description lang="en">Graduation</description> </attr> <attr name="basic.university.subject" type="string(30)"> <description lang="de">Studiengang</description> <description lang="en">Major subject</description> <value>---</value> <value>Bachelor Informatik</value> <value>Bachelor Wirtschaftsinformatik</value> <value>Bachelor Bioinformatik</value> <value>Master Informatik</value> <value>Master Wirtschaftsinformatik</value> <value>Master Bioinformatik</value> <value>Master Angewandte Informatik</value> <value>Master Computational Science and Engineering</value> <value>Lehramt Informatik</value> <value>Aufbaustudium Informatik</value> <value>Diplom Informatik</value> <value>Sonstige</value> </attr> <attr name="basic.personal.card" type="string(10000)"> <description lang="de">Visitenkarte</description> <description lang="en">Business card</description> </attr> </class> </userontology> --- NEW FILE: velocity.macro.library.vm --- #macro( showerrmsg $msg ) <div class="error"> <p>$msg</p> </div> #end #macro( showinfomsg $msg ) <div class="info"> <p>$msg</p> </div> #end --- NEW FILE: itemontology.xml --- <itemontology> <class name="tummsg" parent="item" javaclassname="org.cobricks.item.Item"> <description lang="de">Mitteilung</description> <attr name="roleread" type="string(30)"> <default>mitarbeiter</default> </attr> <attr name="roleupdate" type="string(30)"> <default>mitarbeiter</default> </attr> </class> <class name="teachmsg" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehre aktuell</description> </class> <class name="idp" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Interdisziplinaeresprojekt</description> <attr name="aufgabesteller" type="string(50)"/> <attr name="betreuer" type="string(50)"/> </class> <class name="da" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Diplomarbeit</description> <attr name="aufgabensteller" type="string(50)"/> <attr name="betreuer" type="string(50)"/> </class> <class name="ba" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Bachlorarbeit</description> <attr name="aufgabensteller" type="string(50)"/> <attr name="betreuer" type="string(50)"/> </class> <class name="ma" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Masterarbeit</description> <attr name="aufgabensteller" type="string(50)"/> <attr name="betreuer" type="string(50)"/> </class> <class name="sypro" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Systementwicklungsprojekt</description> <attr name="aufgabensteller" type="string(50)"/> <attr name="betreuer" type="string(50)"/> </class> <class name="fww" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">FWW Beitrag</description> </class> <class name="fww-intern" parent="fww" javaclassname="org.cobricks.item.Item"> <description lang="de">FWW Beitrag (intern)</description> </class> <class name="vwm" parent="tummsg" javaclassname="org.cobricks.item.Item"> </class> <class name="job" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Stellenangebot</description> </class> <class name="fipro" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Infokaffee-Protokoll</description> <attr name="roleread" type="string(30)"> <default>professor</default> </attr> </class> <class name="fipra" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Infokaffee-Praesentation</description> <attr name="roleread" type="string(30)"> <default>professor</default> </attr> </class> <class name="fidoc" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Infokaffee-Dokument</description> <attr name="roleread" type="string(30)"> <default>professor</default> </attr> </class> <class name="bookmark" parent="tummsg" javaclassname="org.cobricks.item.Item"> </class> <class name="conv" parent="tummsg" javaclassname="org.cobricks.item.Item"> </class> <class name="tumdate" parent="date" javaclassname="org.cobricks.item.Item"> <description lang="de">Veranstaltungsankuendigung</description> </class> <class name="odate" parent="tumdate" javaclassname="org.cobricks.item.Item"> <description lang="de">Kolloquium</description> </class> <class name="eventmsg" parent="item" javaclassname="org.cobricks.item.Item"> <description lang="de">Veranstaltungsankuendigung</description> </class> <class name="inpress" parent="eventmsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Presse ueber InTUM</description> </class> <class name="outpress" parent="eventmsg" javaclassname="org.cobricks.item.Item"> <description lang="de">InTUM an Presse</description> </class> <class name="lstdate-I1" parent="tumdate" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I1 Termin</description> </class> <class name="lstmsg-I1" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I1 Nachricht</description> </class> <class name="lstdate-I2" parent="tumdate" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I2 Termin</description> </class> <class name="lstmsg-I2" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I2 Nachricht</description> </class> <class name="lstdate-I3" parent="tumdate" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I3 Termin</description> </class> <class name="lstmsg-I3" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I3 Nachricht</description> </class> <class name="lstdate-I4" parent="tumdate" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I4 Termin</description> </class> <class name="lstmsg-I4" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I4 Nachricht</description> </class> <class name="lstdate-I5" parent="tumdate" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I5 Termin</description> </class> <class name="lstmsg-I5" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I5 Nachricht</description> </class> <class name="lstdate-I6" parent="tumdate" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I6 Termin</description> </class> <class name="lstmsg-I6" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I6 Nachricht</description> </class> <class name="lstdate-I7" parent="tumdate" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I7 Termin</description> </class> <class name="lstmsg-I7" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I7 Nachricht</description> </class> <class name="lstdate-I8" parent="tumdate" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I8 Termin</description> </class> <class name="lstmsg-I8" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I8 Nachricht</description> </class> <class name="lstdate-I9" parent="tumdate" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I9 Termin</description> </class> <class name="lstmsg-I9" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I9 Nachricht</description> </class> <class name="lstdate-I10" parent="tumdate" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I10 Termin</description> </class> <class name="lstmsg-I10" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I10 Nachricht</description> </class> <class name="lstdate-I11" parent="tumdate" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I11 Termin</description> </class> <class name="lstmsg-I11" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I11 Nachricht</description> </class> <class name="lstdate-I12" parent="tumdate" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I12 Termin</description> </class> <class name="lstmsg-I12" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I12 Nachricht</description> </class> <class name="lstdate-I13" parent="tumdate" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I13 Termin</description> </class> <class name="lstmsg-I13" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I13 Nachricht</description> </class> <class name="lstdate-I14" parent="tumdate" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I14 Termin</description> </class> <class name="lstmsg-I14" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I14 Nachricht</description> </class> <class name="lstdate-I15" parent="tumdate" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I15 Termin</description> </class> <class name="lstmsg-I15" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I15 Nachricht</description> </class> <class name="lstdate-I16" parent="tumdate" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I16 Termin</description> </class> <class name="lstmsg-I16" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I16 Nachricht</description> </class> <class name="lstdate-I17" parent="tumdate" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I17 Termin</description> </class> <class name="lstmsg-I17" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I17 Nachricht</description> </class> <class name="lstdate-I18" parent="tumdate" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I18 Termin</description> </class> <class name="lstmsg-I18" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I18 Nachricht</description> </class> <class name="lstdate-I19" parent="tumdate" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I19 Termin</description> </class> <class name="lstmsg-I19" parent="tummsg" javaclassname="org.cobricks.item.Item"> <description lang="de">Lehrstuhl I19 Nachricht</description> </class> </itemontology> |
|
From: Michael K. <ko...@us...> - 2006-12-08 12:47:26
|
Update of /cvsroot/cobricks/drehscheibe-in/web/WEB-INF/conf/org.cobricks.message/templates In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27918/templates Log Message: Directory /cvsroot/cobricks/drehscheibe-in/web/WEB-INF/conf/org.cobricks.message/templates added to the repository |
|
From: Michael K. <ko...@us...> - 2006-12-08 12:47:11
|
Update of /cvsroot/cobricks/drehscheibe-in/web/WEB-INF/conf/org.cobricks.message In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27843/org.cobricks.message Log Message: Directory /cvsroot/cobricks/drehscheibe-in/web/WEB-INF/conf/org.cobricks.message added to the repository |
|
From: Michael K. <ko...@us...> - 2006-12-08 12:40:58
|
Update of /cvsroot/cobricks/drehscheibe-in/web/WEB-INF/conf In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25254/conf Log Message: Directory /cvsroot/cobricks/drehscheibe-in/web/WEB-INF/conf added to the repository |
|
From: Wolfgang W. <wo...@us...> - 2006-12-08 10:22:42
|
Update of /cvsroot/cobricks/drehscheibe-in/src/de/tum/cobricks/user In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6801/src/de/tum/cobricks/user Modified Files: LdapUserHandlerMyTUM.java Log Message: Index: LdapUserHandlerMyTUM.java =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/src/de/tum/cobricks/user/LdapUserHandlerMyTUM.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- LdapUserHandlerMyTUM.java 8 Dec 2006 07:27:46 -0000 1.4 +++ LdapUserHandlerMyTUM.java 8 Dec 2006 10:22:37 -0000 1.5 @@ -307,7 +307,7 @@ } catch (AuthenticationException au) { - logger.debug("Userauthentication failed "+au.getMessage()); + logger.warn("Userauthentication failed "+au.getMessage()); logger.warn("MyTUM, auth. failed, userlogin =" + userlogin); return false; } |
|
From: Michael K. <ko...@us...> - 2006-12-08 07:48:11
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/user/attribute In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12831/org/cobricks/user/attribute Modified Files: AttributeDescriptor.java AttributeDescriptorImpl.java AttributeDescriptorManager.java UserJoin.java Log Message: Index: UserJoin.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/user/attribute/UserJoin.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- UserJoin.java 30 May 2006 14:32:01 -0000 1.12 +++ UserJoin.java 8 Dec 2006 07:48:08 -0000 1.13 @@ -71,7 +71,10 @@ * @return **/ public List getUserIdsByConditions(Map conds, String sortBy, - boolean orFlag, UserManager uM, DBAccess dbAccess, String userclass, int numberOfResults) { + boolean orFlag, UserManager uM, + DBAccess dbAccess, + String userclass, int numberOfResults) + { List result = null; StringBuffer sql = new StringBuffer(" "); StringBuffer from = new StringBuffer(" "); @@ -100,26 +103,26 @@ from = new StringBuffer(" from "); where = new StringBuffer(" where "); - Map userMainAttrs = (Map)conds.get(UserManagerImpl.TABLE_USER_MAIN); - + Map userMainAttrs = (Map) + conds.get(UserManagerImpl.TABLE_USER_MAIN); if (userMainAttrs != null) { user_mainIs = true; firstTableName = UserManagerImpl.TABLE_USER_MAIN; - from.append(UserManagerImpl.TABLE_USER_MAIN); from.append(" "); sql.append(UserManagerImpl.TABLE_USER_MAIN); sql.append(".userid "); - + for (Iterator i = userMainAttrs.entrySet().iterator(); - i.hasNext();) { + i.hasNext();) { Map.Entry elem = (Map.Entry)i.next(); - selectedAttributes.add(addWhereCondition( - (String)elem.getKey(), elem.getValue(), - UserManagerImpl.TABLE_USER_MAIN, where, objects, - true, uM, userclass)); - + selectedAttributes. + add(addWhereCondition((String)elem.getKey(), + elem.getValue(), + UserManagerImpl.TABLE_USER_MAIN, + where, objects, + true, uM, userclass)); where.append(andOr); } } @@ -128,18 +131,19 @@ Map.Entry elem = (Map.Entry)i.next(); String tabName = (String)elem.getKey(); - if (!tabName.equalsIgnoreCase(UserManagerImpl.TABLE_USER_MAIN)) { + if (!tabName.equalsIgnoreCase(UserManagerImpl. + TABLE_USER_MAIN)) { for (Iterator k = ((Map)elem.getValue()).entrySet() - .iterator(); k.hasNext();) { + .iterator(); k.hasNext();) { Map.Entry attr = (Map.Entry)k.next(); - + tableNumber++; String currentTableName = AS_TABLE_PREFIX + tableNumber; if ((firstTableName == null) - && (user_mainIs == false)) { + && (user_mainIs == false)) { from.append(tabName); from.append(" as "); firstTableName = currentTableName; @@ -181,7 +185,8 @@ tableNumber++; //if (conds.containsKey(sortByEntry.getTableName())) { - if (!(sortByEntry.getTableName().equalsIgnoreCase(UserManagerImpl.TABLE_USER_MAIN))) { + if (!(sortByEntry.getTableName(). + equalsIgnoreCase(UserManagerImpl.TABLE_USER_MAIN))) { where.append(AS_TABLE_PREFIX + tableNumber); where.append(".aname = '"); where.append(sortByEntry.getName()); @@ -238,7 +243,8 @@ **/ public AttributeDescriptor addWhereCondition(String aname, Object avalue, String uaTable, StringBuffer sql, List objects, boolean isUserMain, - UserManager uM, String userclass) { + UserManager uM, String userclass) + { // TBD: use table descriptor for determining the attribute type and for // acting upon this information ... String newTail = " = ? "; Index: AttributeDescriptorManager.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/user/attribute/AttributeDescriptorManager.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- AttributeDescriptorManager.java 10 Aug 2005 13:35:34 -0000 1.7 +++ AttributeDescriptorManager.java 8 Dec 2006 07:48:08 -0000 1.8 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004 Cobricks Group. All rights reserved. + * Copyright (c) 2004-2006 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 @@ -69,19 +69,22 @@ } public AttributeDescriptor getAttributeDescriptorFor(String attributeName) - throws CobricksException { + throws CobricksException + { // First of all, we lookup requested attribute in the local cache: - AttributeDescriptor result = (AttributeDescriptor)attributeDescriptors2Names - .get(attributeName); + AttributeDescriptor result = + (AttributeDescriptor)attributeDescriptors2Names + .get(attributeName); // if not found there, create new descriptor: if (result == null) { OntologyClassAttr UserProfileModel model = getUserProfileModel(); - if (model != null) + if (model != null) + - // in an exceptional case, that attribute is not part of ontology, we - // create it's descriptor "manually": + // in an exceptional case, that attribute is not part of + // ontology, we create it's descriptor "manually": if ( null) { if (attributeName.equalsIgnoreCase(User.USERLOGIN)) { result = new AttributeDescriptorImpl(User.USERLOGIN, @@ -163,18 +166,19 @@ return null; } - private String getTableForAttr(String aname) { + private String getTableForAttr(String aname) + { String belong = null; if (aname.equalsIgnoreCase(User.EMAIL) - || aname.equalsIgnoreCase(User.FIRSTNAME) - || aname.equalsIgnoreCase(User.LASTNAME) - || aname.equalsIgnoreCase(User.URI) - || aname.equalsIgnoreCase(User.GLOBALID) - || aname.equalsIgnoreCase(User.LASTLOGIN) - || aname.equalsIgnoreCase(User.PASSWORDCRYPT) - || aname.equalsIgnoreCase(User.REGTIME) - || aname.equalsIgnoreCase(User.USERLOGIN) - || aname.equalsIgnoreCase(User.USERCLASS)) { + || aname.equalsIgnoreCase(User.FIRSTNAME) + || aname.equalsIgnoreCase(User.LASTNAME) + || aname.equalsIgnoreCase(User.URI) + || aname.equalsIgnoreCase(User.GLOBALID) + || aname.equalsIgnoreCase(User.LASTLOGIN) + || aname.equalsIgnoreCase(User.PASSWORDCRYPT) + || aname.equalsIgnoreCase(User.REGTIME) + || aname.equalsIgnoreCase(User.USERLOGIN) + || aname.equalsIgnoreCase(User.USERCLASS)) { belong = UserManagerImpl.TABLE_USER_MAIN; return belong; } else { @@ -222,19 +226,21 @@ return null; } - private Map getReferenceTypeToTableName() { + private Map getReferenceTypeToTableName() + { if (referenceTypeToTableName == null) { referenceTypeToTableName = new HashMap(); - + for (int i = 0; i < tableArray.length; i++) { referenceTypeToTableName.put(typeArray[i], tableArray[i]); } } - + return referenceTypeToTableName; } - private String getUserMainFieldNameByAttributeName(String attributeName) { + private String getUserMainFieldNameByAttributeName(String attributeName) + { // lazy creation of attributeNames2UserMainFieldNames: if (attributeNames2UserMainFieldNames == null) { attributeNames2UserMainFieldNames = new HashMap(); Index: AttributeDescriptor.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/user/attribute/AttributeDescriptor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- AttributeDescriptor.java 31 Mar 2004 21:25:08 -0000 1.2 +++ AttributeDescriptor.java 8 Dec 2006 07:48:08 -0000 1.3 @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2003-2006 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.user.attribute; import org.cobricks.core.OntologyDataType; @@ -5,47 +17,51 @@ /** * @author irina **/ -public interface AttributeDescriptor { - /** - * @return - */ - String getConditionFieldName(); - /** - * @return - */ - String getContextClassName(); - /** - * @return - */ - String getName(); - /** - * @return - */ - String getReferenceTypeName(); - /** - * @return - */ - String getTableName(); - /** - * @return - */ - String getValueFieldName(); - /** - * - * @return - */ - String getUserClassName(); - - /** - * - * @return OntologyDataType - */ - OntologyDataType getOntologyDataType(); - /** - * - * @return true if the table contains separate condition column. - */ - boolean isConditionFieldSeparated(); + +public interface AttributeDescriptor +{ + + /** + * @return + */ + String getConditionFieldName(); + /** + * @return + */ + String getContextClassName(); + /** + * @return + */ + String getName(); + /** + * @return + */ + String getReferenceTypeName(); + /** + * @return + */ + String getTableName(); + /** + * @return + */ + String getValueFieldName(); + /** + * + * @return + */ + String getUserClassName(); + + /** + * + * @return OntologyDataType + */ + OntologyDataType getOntologyDataType(); + + /** + * + * @return true if the table contains separate condition column. + */ + boolean isConditionFieldSeparated(); - Object valueToCondition(Object value); + Object valueToCondition(Object value); } Index: AttributeDescriptorImpl.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/user/attribute/AttributeDescriptorImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- AttributeDescriptorImpl.java 31 Mar 2004 21:25:08 -0000 1.2 +++ AttributeDescriptorImpl.java 8 Dec 2006 07:48:08 -0000 1.3 @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2003-2006 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.user.attribute; import org.cobricks.core.OntologyDataType; @@ -6,8 +18,11 @@ /** * @author Irina Zhitomirskaja iri...@ya... **/ + public class AttributeDescriptorImpl - implements AttributeDescriptor { + implements AttributeDescriptor +{ + private String conditionFieldName; private String contextClassName; private String name; @@ -70,14 +85,16 @@ /** * @return **/ - public String getReferenceTypeName() { + public String getReferenceTypeName() + { return referenceTypeName; } /** * @return **/ - public String getTableName() { + public String getTableName() + { return tableName; } |
|
From: Michael K. <ko...@us...> - 2006-12-08 07:48:11
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/user In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12831/org/cobricks/user Modified Files: UserManagerImpl.java UserPresenter.java userontology.xml Log Message: Index: UserPresenter.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/user/UserPresenter.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- UserPresenter.java 6 Dec 2006 09:41:30 -0000 1.42 +++ UserPresenter.java 8 Dec 2006 07:48:07 -0000 1.43 @@ -386,7 +386,8 @@ aname = ""; while (underlineToken.hasMoreTokens()) { - aname = aname.concat(underlineToken.nextToken().concat(".")); + aname = aname.concat(underlineToken.nextToken(). + concat(".")); } } @@ -424,8 +425,9 @@ } logger.debug("Calling UserManager.searchUsers with "+attrsForSearch); - result = userManager.searchUsers(attrsForSearch, sortBy, orFlag, - numberOfResults, userclass); + result = userManager. + searchUsers(attrsForSearch, sortBy, orFlag, + numberOfResults, userclass); return result; } Index: UserManagerImpl.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/user/UserManagerImpl.java,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- UserManagerImpl.java 7 Dec 2006 11:50:55 -0000 1.71 +++ UserManagerImpl.java 8 Dec 2006 07:48:07 -0000 1.72 @@ -713,12 +713,9 @@ } /** - * DOCUMENT_ME! - * * @param query - * DOCUMENT_ME! * - * @return DOCUMENT_ME! + * @return List of User objects */ public List getUserIdList(Map query) throws Exception @@ -727,14 +724,10 @@ } /** - * DOCUMENT_ME! - * * @param query - * DOCUMENT_ME! * @param orflag - * DOCUMENT_ME! * - * @return DOCUMENT_ME! + * @return List of User objects */ public List getUserIdList(Map query, boolean orflag) throws Exception @@ -746,7 +739,7 @@ * @param query * @param orflag * - * @return + * @return List of User objects */ public List getUserIdList(Map query, boolean orFlag, String sortBy, int numberOfResults, String userclass) @@ -813,8 +806,10 @@ } } - List result = userJoin.getUserIdsByConditions(conditions, sortBy, - orFlag, this, dbAccess, userclass, numberOfResults); + List result = userJoin. + getUserIdsByConditions(conditions, sortBy, + orFlag, this, dbAccess, userclass, + numberOfResults); int j = 0; for (Iterator i = result.iterator(); i.hasNext();) { @@ -1482,11 +1477,12 @@ * DOCUMENT_ME! * * @param attrs - * DOCUMENT_ME! * @param sortby - * DOCUMENT_ME! + * @param orFlag + * @param numberOfResults + * @param userclass * - * @return DOCUMENT_ME! + * @return List of User objects */ public List searchUsers(Map attrs, String sortby, boolean orFlag, int numberOfResults, String userclass) Index: userontology.xml =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/user/userontology.xml,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- userontology.xml 13 Nov 2006 10:02:14 -0000 1.18 +++ userontology.xml 8 Dec 2006 07:48:08 -0000 1.19 @@ -212,6 +212,7 @@ </attr> <attr name="app.org.cobricks.emailprefix" type="string(15)"/> + <attr name="app.org.cobricks.notification" type="string(15)"/> </class> |
|
From: Michael K. <ko...@us...> - 2006-12-08 07:48:11
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/message In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12831/org/cobricks/message Modified Files: ChannelEmail.java ChannelNewsletter.java Log Message: Index: ChannelNewsletter.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/message/ChannelNewsletter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ChannelNewsletter.java 16 Feb 2006 15:21:08 -0000 1.1 +++ ChannelNewsletter.java 8 Dec 2006 07:48:07 -0000 1.2 @@ -150,6 +150,14 @@ // subject String subject = "Newsletter"; // TBD + String prefix = (String) + user.getAttribute("app.org.cobricks.emailprefix"); + if (prefix == null || prefix.length()<1) { + prefix = coreManager.getProperty("mail.subject.prefix"); + } + if (prefix!=null && prefix.length()>0) { + subject = prefix + " " + subject; + } // and now send email logger.info("sending email to "+emailto); Index: ChannelEmail.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/message/ChannelEmail.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ChannelEmail.java 13 Nov 2006 10:04:46 -0000 1.6 +++ ChannelEmail.java 8 Dec 2006 07:48:07 -0000 1.7 @@ -101,11 +101,17 @@ // subject String subject = message.getSubject(); - // tbd: subject prefix + String prefix = (String)user. + getAttribute("app.org.cobricks.emailprefix"); + if (prefix == null || prefix.length()<1) { + prefix = coreManager.getProperty("mail.subject.prefix"); + } + if (prefix!=null && prefix.length()>0) { + subject = prefix + " " + subject; + } // content String content = message.getContent().toString(); - // tbd? // and now send email logger.info("sending email to "+emailto); |
|
From: Michael K. <ko...@us...> - 2006-12-08 07:48:10
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/core In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12831/org/cobricks/core Modified Files: properties.txt Log Message: Index: properties.txt =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/core/properties.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- properties.txt 18 Oct 2006 16:47:49 -0000 1.4 +++ properties.txt 8 Dec 2006 07:48:07 -0000 1.5 @@ -44,6 +44,7 @@ #mail.smtp.host=smtp.domain.com #mail.smtp.user=username #mail.smtp.pw=userpw +mail.subject.prefix=[C2] # google maps api key and url for that key (for geocoder etc) google.maps.api.key= |
|
From: Michael K. <ko...@us...> - 2006-12-08 07:48:10
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/core/util In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12831/org/cobricks/core/util Modified Files: MailUtil.java Log Message: Index: MailUtil.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/core/util/MailUtil.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- MailUtil.java 30 May 2006 14:32:00 -0000 1.5 +++ MailUtil.java 8 Dec 2006 07:48:07 -0000 1.6 @@ -133,7 +133,7 @@ Session mailSession = Session.getDefaultInstance(sessionProps, null); MimeMessage msg = new MimeMessage(mailSession); - msg.setContent(content,"text/plain;charset=iso-8859-15"); + msg.setContent(content,"text/plain;charset=utf-8"); msg.setRecipients(Message.RecipientType.TO, toaddr); msg.setFrom(new InternetAddress(fromaddr)); msg.setHeader("X-Mailer", "Cobricks-2"); @@ -150,4 +150,3 @@ } } - |
|
From: Michael K. <ko...@us...> - 2006-12-08 07:48:10
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/category In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12831/org/cobricks/category Modified Files: CategoryPresenter.java Log Message: Index: CategoryPresenter.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/category/CategoryPresenter.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- CategoryPresenter.java 6 Dec 2006 09:41:29 -0000 1.23 +++ CategoryPresenter.java 8 Dec 2006 07:48:06 -0000 1.24 @@ -258,7 +258,8 @@ /** - * This auxiliary method is used to get the category object with the given ID. + * This auxiliary method is used to get the category object with the + * given ID. * @param catid The ID of the desired category as String * @return The category object */ @@ -279,7 +280,8 @@ /** - * This auxiliary method is used to get the category object with the given ID. + * This auxiliary method is used to get the category object with the + * given ID. * @param catid The ID of the desired category as String * @return The category object */ |
|
From: Michael K. <ko...@us...> - 2006-12-08 07:43:17
|
Update of /cvsroot/cobricks/drehscheibe-in In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv11276 Modified Files: build.xml Log Message: Index: build.xml =================================================================== RCS file: /cvsroot/cobricks/drehscheibe-in/build.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- build.xml 24 Nov 2006 08:00:21 -0000 1.7 +++ build.xml 8 Dec 2006 07:43:14 -0000 1.8 @@ -248,6 +248,10 @@ <copy todir="${build.home}/webapps/${webappname}"> <fileset dir="${web.home}"/> </copy> + <!-- Copy ADMIN pages --> + <copy todir="${build.home}/webapps/${webappname}/ADMIN"> + <fileset dir="${cobricks.home}/web/ADMIN"/> + </copy> <!-- copy Cobricks configuration --> <copy todir="${build.home}/webapps/${webappname}/WEB-INF/conf"> @@ -380,7 +384,7 @@ <java fork="yes" classname="de.tum.cobricks.course.importModules" classpathref="exec.classpath"> <jvmarg value="-Dfile.encoding=utf-8"/> - <arg line="build/webapps/ROOT/WEB-INF/conf Module_061115a.xml"/> + <arg line="build/webapps/ROOT/WEB-INF/conf Module_061129.xml"/> </java> </target> |