rapforums-developer Mailing List for RAP Forums (Page 2)
Status: Beta
Brought to you by:
brippe
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(12) |
Oct
(4) |
Nov
|
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(34) |
Feb
(3) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(6) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
(32) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Brad R. <br...@us...> - 2005-02-04 00:57:29
|
Update of /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17716 Modified Files: SQLTask.java Log Message: no message Index: SQLTask.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/tools/SQLTask.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SQLTask.java 26 Jan 2004 19:01:11 -0000 1.2 --- SQLTask.java 4 Feb 2005 00:57:19 -0000 1.3 *************** *** 39,43 **** * * @author Brad Rippe (br...@fu...) ! * @version 0.8.3 $Revision %G% */ public class SQLTask extends Task { --- 39,43 ---- * * @author Brad Rippe (br...@fu...) ! * @version 0.9.0 $Revision %G% */ public class SQLTask extends Task { |
Update of /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17651 Modified Files: DatabaseNames.java RAPDB.java RAPDBConfig.java RAPDBException.java RAPDBService.java Log Message: no message Index: RAPDBException.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/database/RAPDBException.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RAPDBException.java 26 Jan 2004 18:55:50 -0000 1.3 --- RAPDBException.java 4 Feb 2005 00:56:53 -0000 1.4 *************** *** 25,33 **** import edu.fullcoll.uportal.channels.rap.forum.RAPException; /** - * This exception is thrown when there is an error with the database. * * @author Brad Rippe (br...@fu...) ! * @version 0.8.3 $Revision %G% */ public class RAPDBException extends RAPException { --- 25,32 ---- import edu.fullcoll.uportal.channels.rap.forum.RAPException; /** * This exception is thrown when there is an error with the database. * * @author Brad Rippe (br...@fu...) ! * @version 0.9.0 $Revision %G% */ public class RAPDBException extends RAPException { Index: RAPDB.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/database/RAPDB.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RAPDB.java 26 Jan 2004 18:55:50 -0000 1.3 --- RAPDB.java 4 Feb 2005 00:56:53 -0000 1.4 *************** *** 55,59 **** * * @author Brad Rippe (br...@fu...) ! * @version 0.8.3 $Revision %G% */ public class RAPDB extends RAPDBService { --- 55,59 ---- * * @author Brad Rippe (br...@fu...) ! * @version 0.9.0 $Revision %G% */ public class RAPDB extends RAPDBService { *************** *** 68,71 **** --- 68,73 ---- = "select forumid, name, description, creationdate, modifieddate, " + "categoryid from rapforum where forumid=?"; + private final static String SELECT_FORUM_NAME + = "select name from rapforum where forumid=?"; private final static String SELECT_FORUM4 = "select forumid, name, description, creationdate, modifieddate, " *************** *** 74,81 **** --- 76,87 ---- = "select forumid, name, description, creationDate " +"from rapforum where categoryid = ?"; + private final static String SELECT_ALL_FORUM_IDS + = "select forumid from rapforum order by forumid"; private final static String INSERT_FORUM = "insert into rapforum (forumid, name, description, categoryid, creationdate, modifieddate) VALUES (?, ?, ?, ?, ?, ?)"; private final static String DELETE_FORUM = "delete from rapforum where categoryid = ? AND forumid = ?"; + private final static String RENAME_FORUM + = "update rapforum set name = ? where forumid = ?"; // THREAD QUERIES *************** *** 134,138 **** // CATEGORY QUERIES private final static String SELECT_ALL_CATEGORIES ! = "select categoryid, name, description, creationdate, modifieddate, lft, rgt from rapcategory"; private final static String SELECT_CATEGORY = "select categoryid, name, description, creationdate, modifieddate, lft, rgt " --- 140,144 ---- // CATEGORY QUERIES private final static String SELECT_ALL_CATEGORIES ! = "select categoryid, name, description, creationdate, modifieddate, lft, rgt from rapcategory order by name"; private final static String SELECT_CATEGORY = "select categoryid, name, description, creationdate, modifieddate, lft, rgt " *************** *** 169,173 **** e.printStackTrace(); ! throw new RAPDBException("Unkown Error Occured", e); } finally { // "closing" the Connection closes its handle and --- 175,179 ---- e.printStackTrace(); ! throw new RAPDBException("Unknown Error Occured", e); } finally { // "closing" the Connection closes its handle and *************** *** 259,263 **** LogService.instance().log(LogService.ERROR, "DB ERROR: " + e); e.printStackTrace(); ! throw new RAPDBException("Unkown Error Occured", e); } finally { // "closing" the Connection closes its handle and --- 265,269 ---- LogService.instance().log(LogService.ERROR, "DB ERROR: " + e); e.printStackTrace(); ! throw new RAPDBException("Unknown Error Occured", e); } finally { // "closing" the Connection closes its handle and *************** *** 283,291 **** * Returns the forum with the specified forum id * @param the id of the forum ! * @return the forum with the specified id, otherwise null if the forum now found. * @see edu.fullcoll.uportal.channels.rap.forum.IForum */ public IForum getForum(int forumID) throws RAPDBException { IForum forum = null; PreparedStatement stmt = null; --- 289,299 ---- * Returns the forum with the specified forum id * @param the id of the forum ! * @return the forum with the specified id, otherwise null if the forum not found. * @see edu.fullcoll.uportal.channels.rap.forum.IForum */ public IForum getForum(int forumID) throws RAPDBException { + System.out.println("Getting forum "+forumID); + IForum forum = null; PreparedStatement stmt = null; *************** *** 313,317 **** LogService.instance().log(LogService.ERROR, "DB ERROR: " + sqle.getMessage()); sqle.printStackTrace(); - throw new RAPDBException("Nested SQL Error", sqle); } catch (Exception e) { --- 321,324 ---- *************** *** 319,323 **** e.printStackTrace(); System.out.println(e.getMessage()); ! throw new RAPDBException("Unkown Error Occured", e); } finally { // "closing" the Connection closes its handle and --- 326,330 ---- e.printStackTrace(); System.out.println(e.getMessage()); ! throw new RAPDBException("Unknown Error Occured", e); } finally { // "closing" the Connection closes its handle and *************** *** 331,334 **** --- 338,382 ---- /** + * Returns the forum name with the specified forum id + * @param the id of the forum + * @return the forum name with the specified id, otherwise an empty string if the forum not found. + */ + public String getForumName(int forumID) throws RAPDBException { + IForum forum = null; + PreparedStatement stmt = null; + ResultSet rs = null; + Connection dbConnection = null; + + try { + dbConnection = getDBConnection(); + //todo change to callable + stmt = dbConnection.prepareStatement(SELECT_FORUM_NAME, + ResultSet.TYPE_SCROLL_INSENSITIVE, + ResultSet.CONCUR_READ_ONLY); + stmt.setInt(1, forumID); + rs = stmt.executeQuery(); + if (rs.next()) { + return rs.getString("name"); + } + } catch (SQLException sqle) { + LogService.instance().log(LogService.ERROR, "DB ERROR: " + sqle.getMessage()); + sqle.printStackTrace(); + throw new RAPDBException("Nested SQL Error", sqle); + } catch (Exception e) { + LogService.instance().log(LogService.ERROR, "DB ERROR: " + e.getMessage()); + e.printStackTrace(); + System.out.println(e.getMessage()); + throw new RAPDBException("Unknown Error Occured", e); + } finally { + // "closing" the Connection closes its handle and + // returns the actual connection to its pool: + closeStatement(stmt); + closeResultSet(rs); + closeConnection(dbConnection); + } + return ""; + } + + /** * Returns a collection of forums by the specified category id. * @param catID the category id for the associated forums *************** *** 361,365 **** LogService.instance().log(LogService.ERROR, "DB ERROR: " + e); e.printStackTrace(); ! throw new RAPDBException("Unkown Error Occured", e); } finally { closeStatement(stmt); --- 409,449 ---- LogService.instance().log(LogService.ERROR, "DB ERROR: " + e); e.printStackTrace(); ! throw new RAPDBException("Unknown Error Occured", e); ! } finally { ! closeStatement(stmt); ! closeResultSet(rs); ! closeConnection(dbConnection); ! } ! } ! ! /** ! * Returns a collection of forums by the specified category id. ! * @param catID the category id for the associated forums ! * @return a collection of forums associated with a category ! */ ! public Collection getForumIDs() throws RAPDBException { ! PreparedStatement stmt = null; ! ResultSet rs = null; ! Connection dbConnection = null; ! try { ! dbConnection = getDBConnection(); ! stmt = dbConnection.prepareStatement(SELECT_ALL_FORUM_IDS, ! ResultSet.TYPE_SCROLL_INSENSITIVE, ! ResultSet.CONCUR_READ_ONLY); ! rs = stmt.executeQuery(); ! ArrayList forumids = new ArrayList(); ! while(rs.next()) { ! int forumID = rs.getInt("forumid"); ! if(forumID != 0) { ! Integer tempInt = new Integer(forumID); ! forumids.add(tempInt.toString()); ! } ! } ! return forumids; ! ! } catch(Exception e) { ! LogService.instance().log(LogService.ERROR, "DB ERROR: " + e); ! e.printStackTrace(); ! throw new RAPDBException("Unknown Error Occured", e); } finally { closeStatement(stmt); *************** *** 410,414 **** e.printStackTrace(); System.out.println(e.getMessage()); ! throw new RAPDBException("Unkown Error Occured", e); } finally { // "closing" the Connection closes its handle and --- 494,535 ---- e.printStackTrace(); System.out.println(e.getMessage()); ! throw new RAPDBException("Unknown Error Occured", e); ! } finally { ! // "closing" the Connection closes its handle and ! // returns the actual connection to its pool: ! closeStatement(stmt); ! closeConnection(dbConnection); ! } ! } ! ! /** ! * Renames a forum's name. ! * @param newName the new title of the forum. ! * @param forumID the id of the forum to be removed. ! * @return the row count for the number of forums renamed. ! */ ! public int renameForum(String newName, int forumID) throws RAPDBException { ! PreparedStatement stmt = null; ! Connection dbConnection = null; ! try { ! //rename the forum ! dbConnection = getDBConnection(); ! stmt = dbConnection.prepareStatement(RENAME_FORUM, ! ResultSet.TYPE_SCROLL_INSENSITIVE, ! ResultSet.CONCUR_READ_ONLY); ! stmt.setString(1, newName); ! stmt.setInt(2, forumID); ! ! return stmt.executeUpdate(); ! ! } catch (SQLException sqle) { ! LogService.instance().log(LogService.ERROR, "DB ERROR: " + sqle.getMessage()); ! sqle.printStackTrace(); ! throw new RAPDBException("Nested SQL Error", sqle); ! } catch (Exception e) { ! LogService.instance().log(LogService.ERROR, "DB ERROR: " + e.getMessage()); ! e.printStackTrace(); ! System.out.println(e.getMessage()); ! throw new RAPDBException("Unknown Error Occured", e); } finally { // "closing" the Connection closes its handle and *************** *** 443,447 **** //Set creation and modified dates GregorianCalendar cal = new GregorianCalendar(); ! Date creationModDate = new java.sql.Date(cal.getTimeInMillis()); stmt.setInt(1, threadID); --- 564,568 ---- //Set creation and modified dates GregorianCalendar cal = new GregorianCalendar(); ! java.sql.Date creationModDate = new java.sql.Date(cal.getTimeInMillis()); stmt.setInt(1, threadID); *************** *** 467,471 **** e.printStackTrace(); ! throw new RAPDBException("Unkown Error Occured", e); } finally { closeStatement(stmt); --- 588,592 ---- e.printStackTrace(); ! throw new RAPDBException("Unknown Error Occured", e); } finally { closeStatement(stmt); *************** *** 520,524 **** e.printStackTrace(); ! throw new RAPDBException("Unkown Error Occured", e); } finally { closeStatement(stmt); --- 641,645 ---- e.printStackTrace(); ! throw new RAPDBException("Unknown Error Occured", e); } finally { closeStatement(stmt); *************** *** 566,570 **** e.printStackTrace(); ! throw new RAPDBException("Unkown Error Occured", e); } finally { closeStatement(stmt); --- 687,691 ---- e.printStackTrace(); ! throw new RAPDBException("Unknown Error Occured", e); } finally { closeStatement(stmt); *************** *** 604,608 **** e.printStackTrace(); ! throw new RAPDBException("Unkown Error Occured", e); } finally { // "closing" the Connection closes its handle and --- 725,729 ---- e.printStackTrace(); ! throw new RAPDBException("Unknown Error Occured", e); } finally { // "closing" the Connection closes its handle and *************** *** 655,659 **** e.printStackTrace(); System.out.println(e.getMessage()); ! throw new RAPDBException("Unkown Error Occured", e); } finally { // "closing" the Connection closes its handle and --- 776,780 ---- e.printStackTrace(); System.out.println(e.getMessage()); ! throw new RAPDBException("Unknown Error Occured", e); } finally { // "closing" the Connection closes its handle and *************** *** 725,729 **** e.printStackTrace(); ! throw new RAPDBException("Unkown Error Occured", e); } finally { closeStatement(stmt); --- 846,850 ---- e.printStackTrace(); ! throw new RAPDBException("Unknown Error Occured", e); } finally { closeStatement(stmt); *************** *** 786,790 **** e.printStackTrace(); ! throw new RAPDBException("Unkown Error Occured", e); } finally { closeStatement(stmt); --- 907,911 ---- e.printStackTrace(); ! throw new RAPDBException("Unknown Error Occured", e); } finally { closeStatement(stmt); *************** *** 837,841 **** e.printStackTrace(); ! throw new RAPDBException("Unkown Error Occured", e); } finally { closeStatement(stmt); --- 958,962 ---- e.printStackTrace(); ! throw new RAPDBException("Unknown Error Occured", e); } finally { closeStatement(stmt); *************** *** 886,890 **** e.printStackTrace(); ! throw new RAPDBException("Unkown Error Occured", e); } finally { closeStatement(stmt); --- 1007,1011 ---- e.printStackTrace(); ! throw new RAPDBException("Unknown Error Occured", e); } finally { closeStatement(stmt); *************** *** 940,944 **** e.printStackTrace(); ! throw new RAPDBException("Unkown Error Occured", e); } finally { closeStatement(stmt); --- 1061,1065 ---- e.printStackTrace(); ! throw new RAPDBException("Unknown Error Occured", e); } finally { closeStatement(stmt); *************** *** 991,995 **** e.printStackTrace(); ! throw new RAPDBException("Unkown Error Occured", e); } finally { closeStatement(stmt); --- 1112,1116 ---- e.printStackTrace(); ! throw new RAPDBException("Unknown Error Occured", e); } finally { closeStatement(stmt); *************** *** 1028,1032 **** e.printStackTrace(); System.out.println(e.getMessage()); ! throw new RAPDBException("Unkown Error Occured", e); } finally { // "closing" the Connection closes its handle and --- 1149,1153 ---- e.printStackTrace(); System.out.println(e.getMessage()); ! throw new RAPDBException("Unknown Error Occured", e); } finally { // "closing" the Connection closes its handle and *************** *** 1089,1093 **** LogService.instance().log(LogService.ERROR, "DB ERROR: " + e); e.printStackTrace(); ! throw new RAPDBException("Unkown Error Occured", e); } finally { // "closing" the Connection closes its handle and --- 1210,1214 ---- LogService.instance().log(LogService.ERROR, "DB ERROR: " + e); e.printStackTrace(); ! throw new RAPDBException("Unknown Error Occured", e); } finally { // "closing" the Connection closes its handle and *************** *** 1142,1146 **** e.printStackTrace(); System.out.println(e.getMessage()); ! throw new RAPDBException("Unkown Error Occured", e); } finally { // "closing" the Connection closes its handle and --- 1263,1267 ---- e.printStackTrace(); System.out.println(e.getMessage()); ! throw new RAPDBException("Unknown Error Occured", e); } finally { // "closing" the Connection closes its handle and *************** *** 1185,1189 **** e.printStackTrace(); System.out.println(e.getMessage()); ! throw new RAPDBException("Unkown Error Occured", e); } finally { // "closing" the Connection closes its handle and --- 1306,1310 ---- e.printStackTrace(); System.out.println(e.getMessage()); ! throw new RAPDBException("Unknown Error Occured", e); } finally { // "closing" the Connection closes its handle and *************** *** 1233,1237 **** e.printStackTrace(); System.out.println(e.getMessage()); ! throw new RAPDBException("Unkown Error Occured", e); } finally { // "closing" the Connection closes its handle and --- 1354,1358 ---- e.printStackTrace(); System.out.println(e.getMessage()); ! throw new RAPDBException("Unknown Error Occured", e); } finally { // "closing" the Connection closes its handle and *************** *** 1267,1272 **** String name = rs.getString("name"); String desc = rs.getString("description"); Date creationDate = rs.getDate("creationdate"); ! Date modifiedDate = rs.getDate("modifieddate"); int lft = rs.getInt("lft"); int rgt = rs.getInt("rgt"); --- 1388,1395 ---- String name = rs.getString("name"); String desc = rs.getString("description"); + // SQL the date is stored as date + // ORACLE the date is stored as TimeStamp Date creationDate = rs.getDate("creationdate"); ! Date modifiedDate = rs.getDate("modifieddate"); int lft = rs.getInt("lft"); int rgt = rs.getInt("rgt"); *************** *** 1281,1285 **** e.printStackTrace(); ! throw new RAPDBException("Unkown Error Occured", e); } finally { closeStatement(stmt); --- 1404,1408 ---- e.printStackTrace(); ! throw new RAPDBException("Unknown Error Occured", e); } finally { closeStatement(stmt); *************** *** 1326,1330 **** e.printStackTrace(); ! throw new RAPDBException("Unkown Error Occured", e); } finally { closeStatement(stmt); --- 1449,1453 ---- e.printStackTrace(); ! throw new RAPDBException("Unknown Error Occured", e); } finally { closeStatement(stmt); *************** *** 1384,1388 **** e.printStackTrace(); ! throw new RAPDBException("Unkown Error Occured", e); } finally { closeStatement(stmt); --- 1507,1511 ---- e.printStackTrace(); ! throw new RAPDBException("Unknown Error Occured", e); } finally { closeStatement(stmt); *************** *** 1440,1444 **** e.printStackTrace(); System.out.println(e.getMessage()); ! throw new RAPDBException("Unkown Error Occured", e); } finally { // "closing" the Connection closes its handle and --- 1563,1567 ---- e.printStackTrace(); System.out.println(e.getMessage()); ! throw new RAPDBException("Unknown Error Occured", e); } finally { // "closing" the Connection closes its handle and Index: RAPDBConfig.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/database/RAPDBConfig.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RAPDBConfig.java 26 Jan 2004 18:55:38 -0000 1.1 --- RAPDBConfig.java 4 Feb 2005 00:56:53 -0000 1.2 *************** *** 28,32 **** * * @author br...@fu... (Brad Rippe) ! * @version 0.8.3 $Revision %G% */ public class RAPDBConfig { --- 28,32 ---- * * @author br...@fu... (Brad Rippe) ! * @version 0.9.0 $Revision %G% */ public class RAPDBConfig { Index: DatabaseNames.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/database/DatabaseNames.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DatabaseNames.java 26 Jan 2004 18:55:50 -0000 1.3 --- DatabaseNames.java 4 Feb 2005 00:56:53 -0000 1.4 *************** *** 28,32 **** * * @author Brad Rippe (br...@fu...) ! * @version 0.8.3 $Revision %G% */ public interface DatabaseNames { --- 28,32 ---- * * @author Brad Rippe (br...@fu...) ! * @version 0.9.0 $Revision %G% */ public interface DatabaseNames { Index: RAPDBService.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/database/RAPDBService.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RAPDBService.java 26 Jan 2004 18:55:50 -0000 1.3 --- RAPDBService.java 4 Feb 2005 00:56:53 -0000 1.4 *************** *** 36,40 **** * * @author Brad Rippe (br...@fu...) ! * @version 0.8.3 $Revision %G% * @see org.jasig.portal.RDBMServices * @see edu.fullcoll.uportal.channels.rap.forum.database.RAPDBConfig --- 36,40 ---- * * @author Brad Rippe (br...@fu...) ! * @version 0.9.0 $Revision %G% * @see org.jasig.portal.RDBMServices * @see edu.fullcoll.uportal.channels.rap.forum.database.RAPDBConfig |
From: Brad R. <br...@us...> - 2005-02-04 00:56:46
|
Update of /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17601 Modified Files: AdminModeCommand.java ForumModeCommand.java IForumCommand.java MainModeCommand.java PostModeCommand.java SearchModeCommand.java ThreadModeCommand.java UnAuthorizedModeCommand.java Log Message: no message Index: ThreadModeCommand.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands/ThreadModeCommand.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ThreadModeCommand.java 21 Jul 2004 17:15:04 -0000 1.4 --- ThreadModeCommand.java 4 Feb 2005 00:56:34 -0000 1.5 *************** *** 23,27 **** package edu.fullcoll.uportal.channels.rap.forum.commands; - import org.jasig.portal.ChannelRuntimeData; import org.jasig.portal.utils.XSLT; import org.xml.sax.ContentHandler; --- 23,26 ---- *************** *** 32,36 **** import edu.fullcoll.uportal.channels.rap.forum.filter.IFilterManager; import edu.fullcoll.uportal.channels.rap.forum.filter.RAPFilterManager; - import edu.fullcoll.uportal.channels.rap.forum.database.RAPDB; import edu.fullcoll.uportal.channels.rap.forum.xml.ViewXMLFactory; import edu.fullcoll.uportal.channels.rap.forum.xml.RAPViewXML; --- 31,34 ---- *************** *** 50,54 **** * * @author Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public class ThreadModeCommand implements IForumCommand { --- 48,52 ---- * * @author Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% */ public class ThreadModeCommand implements IForumCommand { *************** *** 96,100 **** forumsRootElement.getChild("rapforum").getChild("rapcomments").getChildren().iterator(); ! //get and filter the suject and body tags Element e = null; String subject = null; --- 94,98 ---- forumsRootElement.getChild("rapforum").getChild("rapcomments").getChildren().iterator(); ! //get and filter the subject and body tags Element e = null; String subject = null; *************** *** 113,117 **** Element nameElement = new Element("username"); ! nameElement.setText((session.staticData).getPerson().getAttribute("displayName") + ""); forumsRootElement.addContent(nameElement); --- 111,119 ---- Element nameElement = new Element("username"); ! String username = (String) (session.staticData).getPerson().getAttribute("displayName"); ! if(username == null) ! username = (String) (session.staticData).getPerson().getAttribute((session.staticData).getPerson().USERNAME); ! ! nameElement.setText(username); forumsRootElement.addContent(nameElement); *************** *** 129,133 **** xml += writer.toString(); //System.out.println("ThreadMode "+xml); //DEBUG ! // Transform xml XSLT xslt = new XSLT(forum); --- 131,135 ---- xml += writer.toString(); //System.out.println("ThreadMode "+xml); //DEBUG ! // Transform xml XSLT xslt = new XSLT(forum); *************** *** 135,138 **** --- 137,142 ---- xslt.setXSL("CForum.ssl", stylesheet, (session.runtimeData).getBrowserInfo()); xslt.setStylesheetParameter("baseActionURL", (session.runtimeData).getBaseActionURL()); + // I'm sure there is a better way than this to get the base url + xslt.setStylesheetParameter("serverInfo", forum.getUportalBaseURL()); xslt.setTarget(out); xslt.transform(); Index: AdminModeCommand.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands/AdminModeCommand.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AdminModeCommand.java 21 Jul 2004 17:14:45 -0000 1.4 --- AdminModeCommand.java 4 Feb 2005 00:56:34 -0000 1.5 *************** *** 24,34 **** import org.jasig.portal.utils.XSLT; import org.xml.sax.ContentHandler; import org.jasig.portal.PortalException; import org.jasig.portal.groups.IGroupMember; - import org.jasig.portal.security.IAuthorizationPrincipal; - import org.jasig.portal.security.IPermission; import org.jasig.portal.services.GroupService; import org.jasig.portal.services.LogService; import edu.fullcoll.uportal.channels.rap.forum.CForum; --- 24,36 ---- import org.jasig.portal.utils.XSLT; + import org.w3c.dom.Document; import org.xml.sax.ContentHandler; + import org.xml.sax.InputSource; + import org.xml.sax.SAXException; import org.jasig.portal.PortalException; import org.jasig.portal.groups.IGroupMember; import org.jasig.portal.services.GroupService; import org.jasig.portal.services.LogService; + import org.jasig.portal.ChannelRuntimeData; import edu.fullcoll.uportal.channels.rap.forum.CForum; *************** *** 38,41 **** --- 40,44 ---- import edu.fullcoll.uportal.channels.rap.forum.database.RAPDB; import edu.fullcoll.uportal.channels.rap.forum.IDManager; + import edu.fullcoll.uportal.channels.rap.forum.permissions.RapPermissionsManager; import edu.fullcoll.uportal.channels.rap.forum.xml.RAPViewXML; import edu.fullcoll.uportal.channels.rap.forum.xml.ViewXMLFactory; *************** *** 43,48 **** --- 46,55 ---- import edu.fullcoll.uportal.channels.rap.forum.ForumSessionData; + import org.jdom.Element; import org.jdom.output.XMLOutputter; import java.io.StringWriter; + import java.util.Iterator; + import javax.xml.parsers.DocumentBuilder; + import javax.xml.parsers.DocumentBuilderFactory; *************** *** 51,57 **** * * @author Brad Rippe (br...@fu...) and Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public class AdminModeCommand implements IForumCommand { /** * This method provides the administration functionality by rendering --- 58,65 ---- * * @author Brad Rippe (br...@fu...) and Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% */ public class AdminModeCommand implements IForumCommand { + /** * This method provides the administration functionality by rendering *************** *** 66,69 **** --- 74,78 ---- String stylesheet = "admin"; StringWriter writer = new StringWriter(INITITAL_BUFFER_SIZE); + boolean authorized = true; try { *************** *** 98,156 **** if (type.equals("createForum")) { ! ! IAuthorizationPrincipal ap = session.staticData.getAuthorizationPrincipal(); ! IPermission[] perms = ap.getAllPermissions(forum.getOwnerToken(), "Create", (session.runtimeData).getParameter("forum") ); ! ! for(int i = 0; i < perms.length; i++) { ! if(perms[i].getType().equals("GRANT")) { ! if (isAdmin || isManager) { ! writer.write("<type>createForum</type>"); ! RAPViewXML viewXML = ViewXMLFactory.createRAPViewXML(); ! XMLOutputter outputter = new XMLOutputter(); ! outputter.output(viewXML.getCategoryXML().detachRootElement(), writer); ! } else { ! writer.write("<type>noAccess</type>"); ! } ! } else { ! // Unauthorized access to post ! UnAuthorizedModeCommand command = new UnAuthorizedModeCommand(); ! session.unauthorizedMsg = "Sorry, you do not have appropriate permission to create new forums.<br/><br/>"+ ! "Please contact your forum administrator for appropriate access.<br/><br/>Thank you!"; ! command.execute(forum, session, out); ! break; ! } ! } } else if (type.equals("prePerm")) { ! IAuthorizationPrincipal ap = session.staticData.getAuthorizationPrincipal(); ! IPermission[] perms = ap.getAllPermissions(forum.getOwnerToken(), "Create", (session.runtimeData).getParameter("forum") ); ! ! for(int i = 0; i < perms.length; i++) { ! if(perms[i].getType().equals("GRANT")) { ! if (isAdmin || isManager) { ! //go to select forum to assign permissions to ! //fix xml here ! //need to get a list of forum names here to add to the xml ! writer.write("<type>prePerm</type>"); ! RAPViewXML viewXML = ViewXMLFactory.createRAPViewXML(); ! XMLOutputter outputter = new XMLOutputter(); ! outputter.output(viewXML.getCategoryXML().detachRootElement(), writer); ! RAPDB dbCon = new RAPDB(); ! outputter.output(viewXML.getForumsXML(1, dbCon.getForumCount()).detachRootElement(), writer); ! } else { ! writer.write("<type>noAccess</type>"); ! } ! } else { ! // Unauthorized access to post ! UnAuthorizedModeCommand command = new UnAuthorizedModeCommand(); ! session.unauthorizedMsg = "Sorry, you do not have appropriate permission to assign permissions to forums.<br/><br/>"+ ! "Please contact your forum administrator for appropriate access.<br/><br/>Thank you!"; ! command.execute(forum, session, out); ! break; ! } ! } } else if (type.equals("adminForum")) { if (isAdmin || isManager) { //display main administration view --- 107,154 ---- if (type.equals("createForum")) { ! ! boolean canCreateForum = RapPermissionsManager.hasPermissionsForForum(session.staticData.getAuthorizationPrincipal(), ! "Create", (String) session.runtimeData.getParameter("forum")); ! // Users must also be part of the Rap Administrator's to create forums ! if ((isAdmin || isManager) && canCreateForum) { ! writer.write("<type>createForum</type>"); ! RAPViewXML viewXML = ViewXMLFactory.createRAPViewXML(); ! XMLOutputter outputter = new XMLOutputter(); ! outputter.output(viewXML.getCategoryXML().detachRootElement(), writer); ! } else { ! // Unauthorized access to post ! UnAuthorizedModeCommand command = new UnAuthorizedModeCommand(); ! session.unauthorizedMsg = "Sorry, you do not have appropriate permission to create new forums.<br/><br/>"+ ! "Please contact your forum administrator for appropriate access.<br/><br/>Thank you!"; ! command.execute(forum, session, out); ! authorized = false; ! } } else if (type.equals("prePerm")) { ! ! // Users must also be part of the Rap Administrators or Rap Managers ! // to assign permissions - currently all administrators can assign permissions ! if (isAdmin || isManager) { ! //go to select forum to assign permissions to ! //fix xml here ! //need to get a list of forum names here to add to the xml ! writer.write("<type>prePerm</type>"); ! RAPViewXML viewXML = ViewXMLFactory.createRAPViewXML(); ! XMLOutputter outputter = new XMLOutputter(); ! outputter.output(viewXML.getCategoryXML().detachRootElement(), writer); ! RAPDB dbCon = new RAPDB(); ! outputter.output(viewXML.getForumsXML(1, dbCon.getForumCount(), null).detachRootElement(), writer); ! } else { ! // Unauthorized access to post ! UnAuthorizedModeCommand command = new UnAuthorizedModeCommand(); ! session.unauthorizedMsg = "Sorry, you do not have appropriate permission to assign permissions to forums.<br/><br/>"+ ! "Please contact your forum administrator for appropriate access.<br/><br/>Thank you!"; ! command.execute(forum, session, out); ! authorized = false; ! } } else if (type.equals("adminForum")) { + // Main Administration View for Forum Administators if (isAdmin || isManager) { //display main administration view *************** *** 164,169 **** } else if (type.equals("doForum")) { ! ! if (isAdmin || isManager) { //create the forum String name = (session.runtimeData).getParameter("name"); --- 162,169 ---- } else if (type.equals("doForum")) { ! boolean canCreateForum = RapPermissionsManager.hasPermissionsForForum(session.staticData.getAuthorizationPrincipal(), ! "Create", (String) session.runtimeData.getParameter("forum")); ! // Users must also be part of the Rap Administrator's to create forums ! if ((isAdmin || isManager) && canCreateForum) { //create the forum String name = (session.runtimeData).getParameter("name"); *************** *** 172,214 **** validateInsert(forum, writer, name, description, IDManager.FORUM_TYPE, session); ! } else { ! writer.write("<type>noAccess</type>"); ! } ! ! } else if (type.equals("deleteForum")) { ! ! IAuthorizationPrincipal ap = session.staticData.getAuthorizationPrincipal(); ! IPermission[] perms = ap.getAllPermissions(forum.getOwnerToken(), "Delete", (session.runtimeData).getParameter("forum") ); ! ! for(int i = 0; i < perms.length; i++) { ! if(perms[i].getType().equals("GRANT")) { ! ! if (isAdmin || isManager) { ! writer.write("<type>deleteForum</type>"); ! //delete forum ! RAPViewXML rapViewXML = ViewXMLFactory.createRAPViewXML(); ! XMLOutputter outputter = new XMLOutputter(); ! outputter.output(rapViewXML.getCategoryXML().detachRootElement(), writer); ! RAPDB dbCon = new RAPDB(); ! outputter.output(rapViewXML.getForumsXML(1, dbCon.getForumCount()).detachRootElement(), writer); ! String name = (session.runtimeData).getParameter("name"); ! //validateInsert(forum, writer, name, description, IDManager.FORUM_TYPE); ! } else { ! writer.write("<type>noAccess</type>"); ! } ! ! } else { ! // Unauthorized access to post ! UnAuthorizedModeCommand command = new UnAuthorizedModeCommand(); ! session.unauthorizedMsg = "Sorry, you do not have appropriate permission to delete forums.<br/><br/>"+ ! "Please contact your forum administrator for appropriate access.<br/><br/>Thank you!"; ! command.execute(forum, session, out); ! break; ! } } } else if (type.equals("doDeleteForum")) { ! ! if (isAdmin || isManager) { //delete category writer.write("<type>doDeleteForum</type>"); --- 172,213 ---- validateInsert(forum, writer, name, description, IDManager.FORUM_TYPE, session); ! } else { ! // Unauthorized access to post ! UnAuthorizedModeCommand command = new UnAuthorizedModeCommand(); ! session.unauthorizedMsg = "Sorry, you do not have appropriate permission to create new forums.<br/><br/>"+ ! "Please contact your forum administrator for appropriate access.<br/><br/>Thank you!"; ! command.execute(forum, session, out); ! authorized = false; } + } else if (type.equals("deleteForum")) { + boolean canDeleteForum = RapPermissionsManager.hasPermissionsForForum(session.staticData.getAuthorizationPrincipal(), + "Delete", (String) session.runtimeData.getParameter("forum")); + // Users must also be part of the Rap Administrator's to create forums + if ((isAdmin || isManager) && canDeleteForum) { + writer.write("<type>deleteForum</type>"); + //delete forum + RAPViewXML rapViewXML = ViewXMLFactory.createRAPViewXML(); + XMLOutputter outputter = new XMLOutputter(); + outputter.output(rapViewXML.getCategoryXML().detachRootElement(), writer); + outputter.output(rapViewXML.getForumNameXML().detachRootElement(), writer); + String name = (session.runtimeData).getParameter("name"); + //validateInsert(forum, writer, name, description, IDManager.FORUM_TYPE); + } else { + // Unauthorized access to delete + UnAuthorizedModeCommand command = new UnAuthorizedModeCommand(); + session.unauthorizedMsg = "Sorry, you do not have appropriate permission to delete forums.<br/><br/>"+ + "Please contact your forum administrator for appropriate access.<br/><br/>Thank you!"; + command.execute(forum, session, out); + authorized = false; + } + } else if (type.equals("doDeleteForum")) { ! ! boolean canDeleteForum = RapPermissionsManager.hasPermissionsForForum(session.staticData.getAuthorizationPrincipal(), ! "Delete", (String) session.runtimeData.getParameter("forum")); ! ! // Users must also be part of the Rap Administrator's to create forums ! if ((isAdmin || isManager) && canDeleteForum) { //delete category writer.write("<type>doDeleteForum</type>"); *************** *** 226,233 **** } ! } else { ! writer.write("<type>noAccess</type>"); ! } } else if (type.equals("createCat")) { --- 225,286 ---- } ! } else { ! // Unauthorized access to delete ! UnAuthorizedModeCommand command = new UnAuthorizedModeCommand(); ! session.unauthorizedMsg = "Sorry, you do not have appropriate permission to delete forums.<br/><br/>"+ ! "Please contact your forum administrator for appropriate access.<br/><br/>Thank you!"; ! command.execute(forum, session, out); ! authorized = false; ! } ! ! } else if (type.equals("renameForum")) { ! ! // Users must also be part of the Rap Administrator's to rename forums ! if (isAdmin || isManager) { ! writer.write("<type>renameForum</type>"); ! ! RAPViewXML rapViewXML = ViewXMLFactory.createRAPViewXML(); ! XMLOutputter outputter = new XMLOutputter(); ! outputter.output(rapViewXML.getCategoryXML().detachRootElement(), writer); ! outputter.output(rapViewXML.getForumNameXML().detachRootElement(), writer); ! String name = (session.runtimeData).getParameter("name"); ! //validateInsert(forum, writer, name, description, IDManager.FORUM_TYPE); ! ! } else { ! // Unauthorized access to rename forums ! UnAuthorizedModeCommand command = new UnAuthorizedModeCommand(); ! session.unauthorizedMsg = "Sorry, you do not have appropriate permission to rename forums.<br/><br/>"+ ! "Please contact your forum administrator for appropriate access.<br/><br/>Thank you!"; ! command.execute(forum, session, out); ! authorized = false; ! } ! ! } else if (type.equals("doRenameForum")) { ! ! // Users must also be part of the Rap Administrator's to rename forums ! if (isAdmin || isManager) { ! //rename forum ! writer.write("<type>doRenameForum</type>"); ! String newName = (session.runtimeData).getParameter("newName"); ! String forumID = (session.runtimeData).getParameter("forumid"); ! ! if(forumID != null && newName != null) { ! RAPDB dbCon = new RAPDB(); ! if(dbCon.renameForum(newName, Integer.parseInt(forumID)) == 1) ! writer.write("<forumrename>success</forumrename>"); ! else ! writer.write("<forumrename>failed</forumrename>"); ! } else { ! writer.write("<forumrename>failed</forumrename>"); ! } + } else { + // Unauthorized access to post + UnAuthorizedModeCommand command = new UnAuthorizedModeCommand(); + session.unauthorizedMsg = "Sorry, you do not have appropriate permission to rename forums.<br/><br/>"+ + "Please contact your forum administrator for appropriate access.<br/><br/>Thank you!"; + command.execute(forum, session, out); + authorized = false; + } } else if (type.equals("createCat")) { *************** *** 283,286 **** --- 336,408 ---- writer.write("<type>noAccess</type>"); } + + } else if (type.equals("importCat")) { + + if (isAdmin || isManager) { + writer.write("<type>importCat</type>"); + } else { + writer.write("<type>noAccess</type>"); + } + + } else if (type.equals("doImport")) { + + writer.write("<type>doImport</type>"); + + if (isAdmin || isManager) { + + // upload the file + ChannelRuntimeData crd = (session.runtimeData); + if(crd.getObjectParameter( "localFile" ) != null) { + + try{ + // spawn a thread here + // run in the backgroud + org.jasig.portal.MultipartDataSource mpds = (org.jasig.portal.MultipartDataSource) crd.getObjectParameter( "localFile" ); + + // now we have the imported xml... we need to create the forums and categorgies + // first let's create an xml document + DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + Document doc = docBuilder.parse(new InputSource(mpds.getInputStream())); + + // get categories + // unfortunately I have to switch to jdom because its much nice to work with + // I'll use fully quailfied objects to avoid confusion from w3c and jdom objects + // No error protection yet + org.jdom.input.DOMBuilder jDomBuilder = new org.jdom.input.DOMBuilder(); + org.jdom.Document jDoc = jDomBuilder.build(doc); + org.jdom.Element jRoot = jDoc.getRootElement(); + + Iterator itr = (jRoot.getChildren()).iterator(); // categories + while(itr.hasNext()) { + Element category = (Element)itr.next(); + + int catID = IDManager.getInstance().nextCategoryID(); + RAPDB rapDB = new RAPDB(); + rapDB.insertCategory(catID, category.getAttribute("name").getValue(), + category.getAttribute("description").getValue(), 0, 0); + + Iterator forumsItr = (category.getChildren()).iterator(); // forums + while(forumsItr.hasNext()) { + Element forumEl = (Element)forumsItr.next(); + // add forum to category + IForum newForum = new RAPForumsManager().createForum(forumEl.getAttribute("name").getValue(), + forumEl.getAttribute("description").getValue(), + catID); + } + } + + } catch(SAXException saxe) { + LogService.instance().log(LogService.ERROR, saxe); + saxe.printStackTrace(); + } catch(Exception e) { + LogService.instance().log(LogService.ERROR, e); + e.printStackTrace(); + } + } + + } else { + writer.write("<type>noAccess</type>"); + } + } *************** *** 290,305 **** LogService.instance().log(LogService.ERROR, e); } ! xml += writer.toString(); ! xml += "</rap>"; ! ! //System.out.println("Admin "+xml); ! ! // Transform xml ! XSLT xslt = new XSLT(forum); ! xslt.setXML(xml); ! xslt.setXSL("CForum.ssl", stylesheet, (session.runtimeData).getBrowserInfo()); ! xslt.setStylesheetParameter("baseActionURL", (session.runtimeData).getBaseActionURL()); ! xslt.setTarget(out); ! xslt.transform(); } --- 412,430 ---- LogService.instance().log(LogService.ERROR, e); } ! ! if(authorized) { ! xml += writer.toString(); ! xml += "</rap>"; ! ! //System.out.println("Admin "+xml); ! ! // Transform xml ! XSLT xslt = new XSLT(forum); ! xslt.setXML(xml); ! xslt.setXSL("CForum.ssl", stylesheet, (session.runtimeData).getBrowserInfo()); ! xslt.setStylesheetParameter("baseActionURL", (session.runtimeData).getBaseActionURL()); ! xslt.setTarget(out); ! xslt.transform(); ! } } Index: PostModeCommand.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands/PostModeCommand.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PostModeCommand.java 21 Jul 2004 17:15:04 -0000 1.4 --- PostModeCommand.java 4 Feb 2005 00:56:34 -0000 1.5 *************** *** 42,45 **** --- 42,46 ---- import java.io.StringWriter; import java.util.GregorianCalendar; + import java.sql.Time; /** *************** *** 48,52 **** * * @author Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public class PostModeCommand implements IForumCommand { --- 49,53 ---- * * @author Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% */ public class PostModeCommand implements IForumCommand { *************** *** 82,90 **** if (postType.equals("post")) { int forumID = Integer.parseInt((session.runtimeData).getParameter("forum")); Document doc = rapViewXML.getPostXML(forumID); Element rootElement = doc.getRootElement(); Element nameElement = new Element("username"); ! nameElement.setText((session.staticData).getPerson().getAttribute("displayName") + ""); rootElement.addContent(nameElement); Element userIDElement = new Element("userid"); --- 83,97 ---- if (postType.equals("post")) { + String username = (String) (session.staticData).getPerson().getAttribute("displayName"); + /* + Want to post all user's real names to make the forums more personal... + if(username == null) + username = (String) (session.staticData).getPerson().getAttribute((session.staticData).getPerson().USERNAME); + */ int forumID = Integer.parseInt((session.runtimeData).getParameter("forum")); Document doc = rapViewXML.getPostXML(forumID); Element rootElement = doc.getRootElement(); Element nameElement = new Element("username"); ! nameElement.setText(username); rootElement.addContent(nameElement); Element userIDElement = new Element("userid"); Index: MainModeCommand.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands/MainModeCommand.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MainModeCommand.java 21 Jul 2004 17:15:04 -0000 1.4 --- MainModeCommand.java 4 Feb 2005 00:56:34 -0000 1.5 *************** *** 23,33 **** package edu.fullcoll.uportal.channels.rap.forum.commands; - import org.jasig.portal.ChannelRuntimeData; import org.jasig.portal.utils.XSLT; import org.xml.sax.ContentHandler; import org.jasig.portal.PortalException; import org.jasig.portal.services.LogService; import edu.fullcoll.uportal.channels.rap.forum.CForum; import edu.fullcoll.uportal.channels.rap.forum.database.RAPDB; import edu.fullcoll.uportal.channels.rap.forum.xml.ViewXMLFactory; --- 23,35 ---- package edu.fullcoll.uportal.channels.rap.forum.commands; import org.jasig.portal.utils.XSLT; import org.xml.sax.ContentHandler; import org.jasig.portal.PortalException; + import org.jasig.portal.groups.IGroupMember; + import org.jasig.portal.services.GroupService; import org.jasig.portal.services.LogService; import edu.fullcoll.uportal.channels.rap.forum.CForum; + import edu.fullcoll.uportal.channels.rap.forum.RAPForumCategory; import edu.fullcoll.uportal.channels.rap.forum.database.RAPDB; import edu.fullcoll.uportal.channels.rap.forum.xml.ViewXMLFactory; *************** *** 39,42 **** --- 41,55 ---- import org.jdom.output.XMLOutputter; import java.io.StringWriter; + import java.util.Calendar; + import java.util.GregorianCalendar; + import java.util.ArrayList; + import java.util.Hashtable; + import java.util.Iterator; + + import javax.naming.Binding; + import javax.naming.Context; + import javax.naming.InitialContext; + import javax.naming.NamingEnumeration; + import javax.naming.NamingException; /** *************** *** 45,51 **** * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...), Tung Lai Thanh (lt...@ya...) ! * @version 0.8.3 $Revision %G% */ public class MainModeCommand implements IForumCommand { /** --- 58,67 ---- * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...), Tung Lai Thanh (lt...@ya...) ! * @version 0.9.0 $Revision %G% */ public class MainModeCommand implements IForumCommand { + + //public static StringBuffer mainXML = null; + //public static GregorianCalendar cacheDate = null; /** *************** *** 58,65 **** public void execute(CForum forum, ForumSessionData session, ContentHandler out) throws PortalException { final int INITITAL_BUFFER_SIZE = 5000; ! String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; String stylesheet = "main"; ! xml += "<rap>"; int lpg = 0; --- 74,81 ---- public void execute(CForum forum, ForumSessionData session, ContentHandler out) throws PortalException { final int INITITAL_BUFFER_SIZE = 5000; ! StringBuffer xml = new StringBuffer("<?xml version=\"1.0\" encoding=\"utf-8\"?>"); String stylesheet = "main"; ! xml.append("<rap>"); int lpg = 0; *************** *** 74,94 **** try { String username = (String) (session.staticData).getPerson().getAttribute("displayName"); if(username == null) ! username = (String) (session.staticData).getPerson().getAttribute((session.staticData).getPerson().USERNAME); writer.write("<username>" + username + "</username>"); writer.write("<currentpage>" + (Math.ceil(lpg / 5) + 1) + "" + "</currentpage>"); ! writer.write("<forumnumber>" + new RAPDB().getForumCount() + "</forumnumber>"); ! ! int startRow = 1; ! if(lpg != 0) ! startRow = lpg+1; ! int endRow = 5; ! if(lpg != 0) ! endRow = lpg + 5; ! ! // Displays only 5 forums at a time RAPViewXML rapViewXML = ViewXMLFactory.createRAPViewXML(); ! Document doc = rapViewXML.getForumsXML(startRow, endRow); Element forumsRootElement = doc.getRootElement(); XMLOutputter outputter = new XMLOutputter(" ", true); --- 90,106 ---- try { String username = (String) (session.staticData).getPerson().getAttribute("displayName"); + String loginUsername = (String) (session.staticData).getPerson().getAttribute((session.staticData).getPerson().USERNAME); if(username == null) ! username = loginUsername; + int forumCount = new RAPDB().getForumCount(); writer.write("<username>" + username + "</username>"); writer.write("<currentpage>" + (Math.ceil(lpg / 5) + 1) + "" + "</currentpage>"); ! writer.write("<forumnumber>" + forumCount + "</forumnumber>"); ! writer.write("<sessionnumber>" + countSessions() + "</sessionnumber>"); ! RAPViewXML rapViewXML = ViewXMLFactory.createRAPViewXML(); ! ! Document doc = rapViewXML.getForumsXML(1, forumCount, loginUsername); // startRow, endRow Element forumsRootElement = doc.getRootElement(); XMLOutputter outputter = new XMLOutputter(" ", true); *************** *** 99,108 **** LogService.instance().log(LogService.ERROR, e); } ! xml += writer.toString(); ! xml += "</rap>"; // Transform xml XSLT xslt = new XSLT(forum); ! xslt.setXML(xml); xslt.setXSL("CForum.ssl", stylesheet, (session.runtimeData).getBrowserInfo()); xslt.setStylesheetParameter("baseActionURL", (session.runtimeData).getBaseActionURL()); --- 111,125 ---- LogService.instance().log(LogService.ERROR, e); } ! xml.append(writer.toString()); ! xml.append("</rap>"); ! ! //add new category information for display ! xml = addCategoryXML(xml); + //System.out.println(xml.toString()); + // Transform xml XSLT xslt = new XSLT(forum); ! xslt.setXML(xml.toString()); xslt.setXSL("CForum.ssl", stylesheet, (session.runtimeData).getBrowserInfo()); xslt.setStylesheetParameter("baseActionURL", (session.runtimeData).getBaseActionURL()); *************** *** 110,113 **** --- 127,228 ---- xslt.transform(); } + + private int countSessions() throws NamingException { + + Hashtable environment = new Hashtable(5); + // Get the uPortal context + environment.put(Context.INITIAL_CONTEXT_FACTORY, "org.jasig.portal.jndi.PortalInitialContextFactory"); + InitialContext ctx = null; + try { + ctx = new InitialContext(environment); + int tcnt = 0; + StringBuffer xml = new StringBuffer(1024); + NamingEnumeration bindings = ctx.listBindings("/"); + while (bindings.hasMore()) { + Binding bd = (Binding)bindings.next(); + String name = bd.getName(); + if (name.equals("sessions")) { + try { + NamingEnumeration bndngs = ((Context)bd.getObject()).listBindings("/"); + while (bndngs.hasMoreElements()) { + Binding bd2 = (Binding)bndngs.next(); + tcnt++; + } // while + } catch (Exception e) { e.printStackTrace(System.out); } + } /*else { + if (bd.getObject() instanceof Context) + countSessions((Context)bd.getObject()); + } // if*/ + } //while + return tcnt; + } catch (NamingException ne) { + LogService.log(LogService.INFO, ne); + return 0; + } + } // countSessions + /** + * Major hack... needs fix... + * @param xml + * @return + */ + private StringBuffer addCategoryXML(StringBuffer xml) { + + if(xml == null || xml.indexOf("<rapforums />") != -1) { + //LogService.instance().log(LogService.INFO, "NO FORUMS*********"); + return xml; + } + + /* + GregorianCalendar now = new GregorianCalendar(); + if(mainXML != null && (cacheDate != null && cacheDate.after(now))) { + System.out.println("Serving cache"); + return mainXML; + } + */ + + // cache expired, get new xml + int catIndx = 1; + int catIndxEnd = 1; + int forumIndx = 0; + int endForumIndx = 0; + boolean contLoop = true; + int emptyCatIndx = 0; + String preCat = ""; + + while(contLoop) { + forumIndx = xml.indexOf("<rapforum>", forumIndx); // find the beginning of the forums + + // end of forums + if(forumIndx == -1) { + endForumIndx = xml.indexOf("</rapforum>", emptyCatIndx)+11; // find the end of the forums + xml.insert(endForumIndx, "</category>"); + break; + } + // search for the category + catIndx = xml.indexOf("<categoryname>", forumIndx)+14; // find the category + catIndxEnd = xml.indexOf("</categoryname>", catIndx); + String cat = xml.substring(catIndx, catIndxEnd); // get the category + emptyCatIndx = forumIndx+cat.length()+23; + // if this is a new category, insert the category information + if(preCat.equals("")) { + xml.insert(forumIndx, "<category><name>"+cat+"</name>"); + } else if(!preCat.equals(cat)){ + xml.insert(forumIndx, "</category><category><name>"+cat+"</name>"); + } + //System.out.println("Category "+catName+" = "+cat); + // forum is in the same category, continue search for a forum + // in a new category + forumIndx=emptyCatIndx+12; + preCat = cat; + } + + //can't cache because the list of forums is different for each user + + //mainXML = xml; // update cached xml + //cacheDate = new GregorianCalendar(); + //cacheDate.add(GregorianCalendar.HOUR, 3); + //LogService.instance().log(LogService.INFO, "XML AFTER**********"+xml.toString()); + return xml; + } } Index: UnAuthorizedModeCommand.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands/UnAuthorizedModeCommand.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UnAuthorizedModeCommand.java 21 Jul 2004 17:15:45 -0000 1.1 --- UnAuthorizedModeCommand.java 4 Feb 2005 00:56:34 -0000 1.2 *************** *** 47,52 **** public void execute(CForum forum, ForumSessionData session, ContentHandler out) throws PortalException { StringBuffer xml = new StringBuffer("<?xml version=\"1.0\" encoding=\"utf-8\"?><rap>"); xml.append("<name>"); ! xml.append((session.staticData).getPerson().getAttribute("displayName")); xml.append("</name><message>"); xml.append(session.unauthorizedMsg); --- 47,57 ---- public void execute(CForum forum, ForumSessionData session, ContentHandler out) throws PortalException { StringBuffer xml = new StringBuffer("<?xml version=\"1.0\" encoding=\"utf-8\"?><rap>"); + + String username = (String) (session.staticData).getPerson().getAttribute("displayName"); + if(username == null) + username = (String) (session.staticData).getPerson().getAttribute((session.staticData).getPerson().USERNAME); + xml.append("<name>"); ! xml.append(username); xml.append("</name><message>"); xml.append(session.unauthorizedMsg); Index: IForumCommand.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands/IForumCommand.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** IForumCommand.java 21 Jul 2004 17:15:04 -0000 1.4 --- IForumCommand.java 4 Feb 2005 00:56:34 -0000 1.5 *************** *** 36,40 **** * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public interface IForumCommand { --- 36,40 ---- * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% */ public interface IForumCommand { Index: SearchModeCommand.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands/SearchModeCommand.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SearchModeCommand.java 21 Jul 2004 17:15:04 -0000 1.4 --- SearchModeCommand.java 4 Feb 2005 00:56:34 -0000 1.5 *************** *** 46,50 **** * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public class SearchModeCommand implements IForumCommand { --- 46,50 ---- * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% */ public class SearchModeCommand implements IForumCommand { *************** *** 129,133 **** try { ! writer.write("<username>" + (session.staticData).getPerson().getAttribute("displayName") + "</username>"); // Get the xml from the query --- 129,137 ---- try { ! String username = (String) (session.staticData).getPerson().getAttribute("displayName"); ! if(username == null) ! username = (String) (session.staticData).getPerson().getAttribute((session.staticData).getPerson().USERNAME); ! ! writer.write("<username>" + username + "</username>"); // Get the xml from the query Index: ForumModeCommand.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands/ForumModeCommand.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ForumModeCommand.java 21 Jul 2004 17:15:04 -0000 1.4 --- ForumModeCommand.java 4 Feb 2005 00:56:34 -0000 1.5 *************** *** 44,48 **** * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public class ForumModeCommand implements IForumCommand { --- 44,48 ---- * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% */ public class ForumModeCommand implements IForumCommand { *************** *** 82,86 **** Element nameElement = new Element("username"); ! nameElement.setText((session.staticData).getPerson().getAttribute("displayName") + ""); forumsRootElement.addContent(nameElement); --- 82,90 ---- Element nameElement = new Element("username"); ! String username = (String) (session.staticData).getPerson().getAttribute("displayName"); ! if(username == null) ! username = (String) (session.staticData).getPerson().getAttribute((session.staticData).getPerson().USERNAME); ! ! nameElement.setText(username); forumsRootElement.addContent(nameElement); |
Update of /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17518 Modified Files: CForum.java ForumSearch.java ForumSessionData.java IDManager.java IForum.java IForumCategory.java IForumComment.java IForumsManager.java IForumThread.java ISearchManager.java IUser.java IUserManager.java NestedException.java RAPException.java RAPForum.java RAPForumCategory.java RAPForumComment.java RAPForumsManager.java RAPForumThread.java RAPIDManagerException.java RAPUser.java Log Message: no message Index: IUserManager.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/IUserManager.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IUserManager.java 26 Jan 2004 18:50:07 -0000 1.3 --- IUserManager.java 4 Feb 2005 00:56:07 -0000 1.4 *************** *** 29,33 **** * * @author Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public interface IUserManager { --- 29,33 ---- * * @author Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% */ public interface IUserManager { Index: ForumSearch.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/ForumSearch.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ForumSearch.java 26 Jan 2004 18:50:07 -0000 1.3 --- ForumSearch.java 4 Feb 2005 00:56:07 -0000 1.4 *************** *** 36,40 **** * * @author Brad Rippe (br...@fu...) ! * @version 0.8.3 $Revision %G% */ public class ForumSearch implements ISearchManager { --- 36,40 ---- * * @author Brad Rippe (br...@fu...) ! * @version 0.9.0 $Revision %G% */ public class ForumSearch implements ISearchManager { Index: IForum.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/IForum.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IForum.java 26 Jan 2004 18:50:07 -0000 1.3 --- IForum.java 4 Feb 2005 00:56:07 -0000 1.4 *************** *** 34,38 **** * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public interface IForum --- 34,38 ---- * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% */ public interface IForum Index: RAPForumCategory.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/RAPForumCategory.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RAPForumCategory.java 26 Jan 2004 18:50:07 -0000 1.3 --- RAPForumCategory.java 4 Feb 2005 00:56:07 -0000 1.4 *************** *** 28,32 **** * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public class RAPForumCategory implements IForumCategory { --- 28,32 ---- * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% */ public class RAPForumCategory implements IForumCategory { Index: RAPIDManagerException.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/RAPIDManagerException.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RAPIDManagerException.java 26 Jan 2004 18:50:07 -0000 1.3 --- RAPIDManagerException.java 4 Feb 2005 00:56:07 -0000 1.4 *************** *** 27,31 **** * * @author Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% * @see edu.fullcoll.uportal.channels.rap.forum.RAPForumsManager */ --- 27,31 ---- * * @author Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% * @see edu.fullcoll.uportal.channels.rap.forum.RAPForumsManager */ Index: RAPForumComment.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/RAPForumComment.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RAPForumComment.java 26 Jan 2004 18:50:07 -0000 1.3 --- RAPForumComment.java 4 Feb 2005 00:56:07 -0000 1.4 *************** *** 30,34 **** * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% * @testcase test.edu.fullcoll.uportal.channels.rap.forum.TestRAPForumComment */ --- 30,34 ---- * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% * @testcase test.edu.fullcoll.uportal.channels.rap.forum.TestRAPForumComment */ Index: NestedException.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/NestedException.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NestedException.java 26 Jan 2004 18:50:07 -0000 1.3 --- NestedException.java 4 Feb 2005 00:56:07 -0000 1.4 *************** *** 30,34 **** * * @author Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public class NestedException extends Exception { --- 30,34 ---- * * @author Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% */ public class NestedException extends Exception { Index: IDManager.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/IDManager.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IDManager.java 26 Jan 2004 18:50:07 -0000 1.3 --- IDManager.java 4 Feb 2005 00:56:07 -0000 1.4 *************** *** 31,35 **** * * @author Brad Rippe (br...@fu...) ! * @version 0.8.3 $Revision %G% * @testcase test.edu.fullcoll.uportal.channels.rap.forum.TestIDManager */ --- 31,35 ---- * * @author Brad Rippe (br...@fu...) ! * @version 0.9.0 $Revision %G% * @testcase test.edu.fullcoll.uportal.channels.rap.forum.TestIDManager */ Index: ISearchManager.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/ISearchManager.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ISearchManager.java 26 Jan 2004 18:50:07 -0000 1.3 --- ISearchManager.java 4 Feb 2005 00:56:07 -0000 1.4 *************** *** 30,34 **** * * @author Brad Rippe (br...@fu...) ! * @version 0.8.3 $Revision %G% */ public interface ISearchManager { --- 30,34 ---- * * @author Brad Rippe (br...@fu...) ! * @version 0.9.0 $Revision %G% */ public interface ISearchManager { Index: IUser.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/IUser.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IUser.java 26 Jan 2004 18:50:07 -0000 1.3 --- IUser.java 4 Feb 2005 00:56:07 -0000 1.4 *************** *** 30,34 **** * * @author Brad Rippe (br...@fu...), Christopher Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public interface IUser { --- 30,34 ---- * * @author Brad Rippe (br...@fu...), Christopher Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% */ public interface IUser { Index: RAPForumThread.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/RAPForumThread.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RAPForumThread.java 26 Jan 2004 18:50:07 -0000 1.3 --- RAPForumThread.java 4 Feb 2005 00:56:07 -0000 1.4 *************** *** 35,39 **** * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% * @testcase test.edu.fullcoll.uportal.channels.rap.forum.TestRAPForumThread */ --- 35,39 ---- * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% * @testcase test.edu.fullcoll.uportal.channels.rap.forum.TestRAPForumThread */ Index: CForum.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/CForum.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CForum.java 21 Jul 2004 17:16:16 -0000 1.4 --- CForum.java 4 Feb 2005 00:56:07 -0000 1.5 *************** *** 27,30 **** --- 27,31 ---- import org.jasig.portal.ChannelRuntimeData; import org.jasig.portal.ChannelRuntimeProperties; + import org.jasig.portal.PortalControlStructures; import org.jasig.portal.PortalEvent; import org.jasig.portal.PortalException; *************** *** 33,44 **** import org.jasig.portal.services.GroupService; import org.jasig.portal.services.AuthorizationService; - import org.xml.sax.ContentHandler; import org.jasig.portal.services.LogService; import org.jasig.portal.channels.permissionsmanager.CPermissionsManagerServantFactory; - import org.jasig.portal.channels.groupsmanager.CGroupsManagerServantFactory; - import org.jasig.portal.security.IAuthorizationPrincipal; import org.jasig.portal.IPermissible; import org.jasig.portal.IMultithreadedChannel; import edu.fullcoll.uportal.channels.rap.forum.database.RAPDBException; import edu.fullcoll.uportal.channels.rap.forum.database.RAPDBConfig; --- 34,45 ---- import org.jasig.portal.services.GroupService; import org.jasig.portal.services.AuthorizationService; import org.jasig.portal.services.LogService; import org.jasig.portal.channels.permissionsmanager.CPermissionsManagerServantFactory; import org.jasig.portal.IPermissible; + import org.jasig.portal.IPrivileged; import org.jasig.portal.IMultithreadedChannel; + import org.xml.sax.ContentHandler; + import edu.fullcoll.uportal.channels.rap.forum.database.RAPDBException; import edu.fullcoll.uportal.channels.rap.forum.database.RAPDBConfig; *************** *** 51,54 **** --- 52,57 ---- import edu.fullcoll.uportal.channels.rap.forum.commands.SearchModeCommand; import edu.fullcoll.uportal.channels.rap.forum.database.RAPDB; + import edu.fullcoll.uportal.channels.rap.forum.permissions.RapPermissionsManager; + import edu.fullcoll.uportal.channels.rap.forum.commands.UnAuthorizedModeCommand; import java.util.HashMap; *************** *** 56,61 **** import java.util.Calendar; import java.sql.Timestamp; ! import org.jasig.portal.security.IPermission; ! import edu.fullcoll.uportal.channels.rap.forum.commands.UnAuthorizedModeCommand; /** --- 59,64 ---- import java.util.Calendar; import java.sql.Timestamp; ! ! import javax.servlet.http.HttpServletRequest; /** *************** *** 65,74 **** * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...), and Tung Lai Thanh (lt...@ya...) ! * @version 0.8.3 $Revision %G% */ ! public class CForum implements IPermissible, IMultithreadedChannel { public static String EVERYONE_KEY = "local.0"; ! public CForum() { init(); --- 68,77 ---- * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...), and Tung Lai Thanh (lt...@ya...) ! * @version 0.9.0 $Revision %G% */ ! public class CForum implements IPermissible, IMultithreadedChannel, IPrivileged { public static String EVERYONE_KEY = "local.0"; ! public CForum() { init(); *************** *** 80,89 **** try { // This should resemble exact forum ! tasks.put("Subscribe", "Subscribe to Forum"); ! tasks.put("Post", "Post to Forum"); ! tasks.put("Reply", "Reply to Forum"); tasks.put("Delete", "Delete Forum"); tasks.put("Create", "Create Forum"); ! tasks.put("AssignPermissions", "Assign Permissions for this Forum"); } catch(Exception e) { LogService.instance().log(LogService.ERROR, e); --- 83,91 ---- try { // This should resemble exact forum ! tasks.put("Read", "Read Forum"); ! tasks.put("Post", "Post/Reply to Forum"); tasks.put("Delete", "Delete Forum"); tasks.put("Create", "Create Forum"); ! tasks.put("AssignPermissions", "Assign Permissions for this Forum"); } catch(Exception e) { LogService.instance().log(LogService.ERROR, e); *************** *** 174,177 **** --- 176,185 ---- session.isAdminUser = true; } + + //spawn on another thread + //RAPViewXML rapViewXML = ViewXMLFactory.createRAPViewXML(); + //RAPDB dbCon = new RAPDB(); + //rapViewXML.getForumsXML(1, dbCon.getForumCount(), null); + } catch (Exception e) { LogService.instance().log(LogService.ERROR, e); *************** *** 210,213 **** --- 218,222 ---- if(modeStr.equals("AssignPermissions") && session.servantChannel == null) { + //System.out.println("AssignPermissions"); session.myvalidity = now; try { *************** *** 217,225 **** } catch (Exception e) { LogService.instance().log(LogService.ERROR, "RapForums.setRuntimeData(): Problem instantiating servant"+e); ! } } ! if(modeStr.equals("AssignGroup") && session.servantChannel == null) { session.myvalidity = now; if(hasValue(rd.getParameter("subscriberGroup"))) { --- 226,236 ---- } catch (Exception e) { LogService.instance().log(LogService.ERROR, "RapForums.setRuntimeData(): Problem instantiating servant"+e); ! } } ! /* REMOVE THE GROUP ASSIGNMENT FOR NOW ! if(modeStr.equals("AssignGroups") && session.servantChannel == null) { + System.out.println("Assign Groups"); session.myvalidity = now; if(hasValue(rd.getParameter("subscriberGroup"))) { *************** *** 230,236 **** } } - } ! if(session.servantChannel != null) { --- 241,247 ---- } } } ! */ ! if(session.servantChannel != null) { *************** *** 257,271 **** } - /*if(!hasValue(rd.getParameter("command"))) { - rd.remove("command"); - } else { - session.myvalidity = now; - }*/ - if (!hasValue(rd.getParameter("view"))) { ! if (hasValue(session.staticData.get("view"))) { ! ! if (hasValue(session.staticData.get("view"), "AssignGroups") || ! hasValue(session.staticData.get("view"), "AssignPermissions")) { rd.setParameter("view", (String)session.fromViews.get(session.staticData.getParameter("view"))); } else { --- 268,276 ---- } if (!hasValue(rd.getParameter("view"))) { ! //System.out.println("!hasValue(rd.getParameter(\"view\"))"); ! if (hasValue(session.staticData.get("view"))) { ! //hasValue(session.staticData.get("view"), "AssignGroups") || ! if (hasValue(session.staticData.get("view"), "AssignPermissions")) { rd.setParameter("view", (String)session.fromViews.get(session.staticData.getParameter("view"))); } else { *************** *** 275,281 **** } else { rd.setParameter("view", "forum"); // this can probably be removed... ! if (!rd.getParameter("view").equals(session.staticData.get("view"))) { ! session.myvalidity = now; ! } } } --- 280,286 ---- } else { rd.setParameter("view", "forum"); // this can probably be removed... ! if (!rd.getParameter("view").equals(session.staticData.get("view"))) { ! session.myvalidity = now; ! } } } *************** *** 288,301 **** } - // this is really the forum id, but let's get it working first - /*if(!hasValue(rd.getParameter("topicID"))) { - if(hasValue(rd.getParameter("topicID")) && !hasValue(rd.get("view"))) { - rd.setParameter("topicID", session.staticData.getParameter("topicID")); - } else { - rd.remove("topicID"); - session.staticData.remove("topicID"); - } - }*/ - if (hasValue(rd.getParameter("fromView"))) { session.fromViews.put(rd.getParameter("view"), rd.getParameter("fromView")); --- 293,296 ---- *************** *** 305,311 **** session.staticData.setParameter("view", rd.getParameter("view")); } if (hasValue(rd.getParameter("topicID"))) { session.staticData.setParameter("topicID", rd.getParameter("topicID")); ! } if(session.servantChannel == null) { --- 300,308 ---- session.staticData.setParameter("view", rd.getParameter("view")); } + + /* - 12/21 -remove if (hasValue(rd.getParameter("topicID"))) { session.staticData.setParameter("topicID", rd.getParameter("topicID")); ! }*/ if(session.servantChannel == null) { *************** *** 315,318 **** --- 312,329 ---- } + // if there aren't any forums in the db + // allow the user to add forums by directing them + // to the admin features + try { + + int forumCount = new RAPDB().getForumCount(); + if(forumCount == 0 && !modeStr.equals("admin")) { + modeStr = "admin"; + (session.runtimeData).setParameter("type", "adminForum"); + } + } catch(RAPDBException e) { + LogService.instance().log(LogService.ERROR, "RapForums.setRuntimeData(): "+e); + } + if (modeStr.equals("forum")) { session.mode = FORUM_MODE; *************** *** 329,343 **** } else if (modeStr.equals("AssignPermissions")) { session.mode = PERMISSIONS_MODE; ! } else if (modeStr.equals("AssignGroups")) { ! session.mode = GROUPS_MODE; } else if (modeStr.equals("back")) { //session.mode = modeStr; } else { ! session.mode = MAIN_MODE; ! } ! //System.out.println("mode "+session.mode); ! //} else { ! // session.mode = MAIN_MODE; ! //} } --- 340,350 ---- } else if (modeStr.equals("AssignPermissions")) { session.mode = PERMISSIONS_MODE; ! /*} else if (modeStr.equals("AssignGroups")) { ! session.mode = GROUPS_MODE;*/ } else if (modeStr.equals("back")) { //session.mode = modeStr; } else { ! session.mode = MAIN_MODE; // fix main in case there aren't any forums available ! } } *************** *** 347,352 **** */ public void renderXML(ContentHandler out, String uid) throws PortalException { ! long time1 = Calendar.getInstance().getTime().getTime(); ! try { ForumSessionData session = getSessionData(uid); --- 354,358 ---- */ public void renderXML(ContentHandler out, String uid) throws PortalException { ! try { ForumSessionData session = getSessionData(uid); *************** *** 358,428 **** LogService.instance().log(LogService.DEBUG, "RapForums.renderXML(): defering to servant render"); } else { ! switch (session.mode) { ! case MAIN_MODE: { ! MainModeCommand command = new MainModeCommand(); ! command.execute(this, session, out); ! session.lastRenderedDoc = new Timestamp(Calendar.getInstance().getTime().getTime()); break; } ! case FORUM_MODE: { ! IAuthorizationPrincipal ap = session.staticData.getAuthorizationPrincipal(); ! IPermission[] perms = ap.getAllPermissions(getOwnerToken(), "Subscribe", (session.runtimeData).getParameter("forum") ); ! ! for(int i = 0; i < perms.length; i++) { ! if(perms[i].getType().equals("GRANT")) { ! ForumModeCommand command = new ForumModeCommand(); ! command.execute(this, session, out); ! session.lastRenderedDoc = new Timestamp(Calendar.getInstance().getTime().getTime()); ! break; ! } else { ! // Unauthorized access to post ! UnAuthorizedModeCommand command = new UnAuthorizedModeCommand(); ! session.unauthorizedMsg = "Sorry, you do not have appropriate permission to view messages in this forum.<br/><br/>"+ ! "Please contact your forum administrator for appropriate access.<br/><br/>Thank you!"; ! command.execute(this, session, out); ! break; ! } ! } } ! case THREAD_MODE: { ! IAuthorizationPrincipal ap = session.staticData.getAuthorizationPrincipal(); ! IPermission[] perms = ap.getAllPermissions(getOwnerToken(), "Post", (session.runtimeData).getParameter("forum") ); ! ! for(int i = 0; i < perms.length; i++) { ! if(perms[i].getType().equals("GRANT")) { ! ThreadModeCommand command = new ThreadModeCommand(); ! command.execute(this, session, out); ! session.lastRenderedDoc = new Timestamp(Calendar.getInstance().getTime().getTime()); ! break; ! } else { ! // Unauthorized access to post ! UnAuthorizedModeCommand command = new UnAuthorizedModeCommand(); ! session.unauthorizedMsg = "Sorry, you do not have appropriate permission to post messages to this forum.<br/><br/>"+ ! "Please contact your forum administrator for appropriate access.<br/><br/>Thank you!"; ! command.execute(this, session, out); ! break; ! } ! } } ! case POST_MODE: { ! //check authorization for user before displaying a particular view ! IAuthorizationPrincipal ap = session.staticData.getAuthorizationPrincipal(); ! IPermission[] perms = ap.getAllPermissions(getOwnerToken(), "Post", (session.runtimeData).getParameter("forum") ); ! ! for(int i = 0; i < perms.length; i++) { ! if(perms[i].getType().equals("GRANT")) { ! PostModeCommand command = new PostModeCommand(); ! command.execute(this, session, out); ! session.lastRenderedDoc = new Timestamp(Calendar.getInstance().getTime().getTime()); ! break; ! } else { ! // Unauthorized access to post ! UnAuthorizedModeCommand command = new UnAuthorizedModeCommand(); ! session.unauthorizedMsg = "Sorry, you do not have appropriate permission to post messages to this forum.<br/><br/>"+ ! "Please contact your forum administrator for appropriate access.<br/><br/>Thank you!"; ! command.execute(this, session, out); ! break; ! } ! } break; } --- 364,403 ---- LogService.instance().log(LogService.DEBUG, "RapForums.renderXML(): defering to servant render"); } else { ! ! switch (session.mode) { ! ! case MAIN_MODE: { ! executeMainMode(out, session); break; } ! case FORUM_MODE: { ! if(RapPermissionsManager.hasPermissionsForForum(session.staticData.getAuthorizationPrincipal(), ! "Read", (String) session.runtimeData.getParameter("forum"))) { ! executeForumMode(out, session); ! } else { ! executeUnauthorizedMode(out, session, "Sorry, you do not have appropriate permission to view messages in this forum. <br/><br/>"+ ! "Please contact your forum administrator for appropriate access. <br/><br/>Thank you!"); ! } ! break; } ! case THREAD_MODE: { ! if(RapPermissionsManager.hasPermissionsForForum(session.staticData.getAuthorizationPrincipal(), ! "Read", (String) session.runtimeData.getParameter("forum"))) { ! executeThreadMode(out, session); ! } else { ! executeUnauthorizedMode(out, session, "Sorry, you do not have appropriate permission to post messages to this forum. <br/><br/>"+ ! "Please contact your forum administrator for appropriate access.<br/><br/>Thank you!"); ! } ! break; } ! case POST_MODE: { ! if(RapPermissionsManager.hasPermissionsForForum(session.staticData.getAuthorizationPrincipal(), ! "Post", (String) session.runtimeData.getParameter("forum"))) { ! executePostMode(out, session); ! ! } else { ! executeUnauthorizedMode(out, session, "Sorry, you do not have appropriate permission to post messages to this forum. <br/><br/>"+ ! "Please contact your forum administrator for appropriate access.<br/><br/> Thank you!"); ! } break; } *************** *** 437,445 **** command.execute(this, session, out); break; ! } case ABOUT_MODE: { ! AboutModeCommand aboutCommand = new AboutModeCommand(); ! aboutCommand.execute(this, session, out); ! session.lastRenderedDoc = new Timestamp(Calendar.getInstance().getTime().getTime()); break; } --- 412,418 ---- command.execute(this, session, out); break; ! } case ABOUT_MODE: { ! executeAboutMode(out, session); break; } *************** *** 453,456 **** --- 426,475 ---- } + private void executePostMode(ContentHandler out, ForumSessionData session) + throws PortalException { + PostModeCommand command = new PostModeCommand(); + command.execute(this, session, out); + session.lastRenderedDoc = new Timestamp(Calendar.getInstance().getTime().getTime()); + } + + private void executeThreadMode(ContentHandler out, ForumSessionData session) + throws PortalException { + ThreadModeCommand command = new ThreadModeCommand(); + command.execute(this, session, out); + session.lastRenderedDoc = new Timestamp(Calendar.getInstance().getTime().getTime()); + } + + private void executeUnauthorizedMode( + ContentHandler out, + ForumSessionData session, + String msg) + throws PortalException { + // Unauthorized access to post + UnAuthorizedModeCommand command = new UnAuthorizedModeCommand(); + session.unauthorizedMsg = msg; + command.execute(this, session, out); + } + + private void executeMainMode(ContentHandler out, ForumSessionData session) + throws PortalException { + MainModeCommand command = new MainModeCommand(); + command.execute(this, session, out); + session.lastRenderedDoc = new Timestamp(Calendar.getInstance().getTime().getTime()); + } + + private void executeForumMode(ContentHandler out, ForumSessionData session) + throws PortalException { + ForumModeCommand command = new ForumModeCommand(); + command.execute(this, session, out); + session.lastRenderedDoc = new Timestamp(Calendar.getInstance().getTime().getTime()); + } + + private void executeAboutMode(ContentHandler out, ForumSessionData session) + throws PortalException { + AboutModeCommand aboutCommand = new AboutModeCommand(); + aboutCommand.execute(this, session, out); + session.lastRenderedDoc = new Timestamp(Calendar.getInstance().getTime().getTime()); + } + /** * Returns the Admin Group for uPortal *************** *** 510,514 **** everyoneGroup.addMember(forumAdminGroup); ! everyoneGroup.updateMembers(); } --- 529,533 ---- everyoneGroup.addMember(forumAdminGroup); ! everyoneGroup.updateMembers(); } *************** *** 630,633 **** --- 649,668 ---- return ""; } + + /** + * Passes portal control structure to the channel. + * @param pcs + */ + public void setPortalControlStructures(PortalControlStructures pcs) { + HttpServletRequest req = pcs.getHttpServletRequest(); + + uportalBaseURL = req.getScheme()+"://"+req.getServerName()+":"+ + req.getServerPort() + + req.getContextPath(); + } + + public String getUportalBaseURL() { + return uportalBaseURL; + } private static final int MAIN_MODE = 42; *************** *** 638,657 **** private static final int ADMIN_MODE = 47; private static final int PERMISSIONS_MODE = 48; ! private static final int GROUPS_MODE = 49; private static final int ABOUT_MODE = 31337; - // TODO: REMOVE IN ForumSessionData - //private int mode; // determines whether we return in normal or about mode - //private ChannelStaticData staticData; - //private ChannelRuntimeData runtimeData; - private IEntityGroup adminGroup; //the uportal admin group, able to add rap forum admins private IEntityGroup forumAdminGroup; // the rap forum group for admins private IEntityGroup forumManagerGroup; //the rap forum group a step down from admins ! // permissions private static HashMap tasks = null; protected static HashMap sessions = new HashMap(); - } --- 673,686 ---- private static final int ADMIN_MODE = 47; private static final int PERMISSIONS_MODE = 48; ! private static final int GROUPS_MODE = 49; // NOT IN USE YET private static final int ABOUT_MODE = 31337; private IEntityGroup adminGroup; //the uportal admin group, able to add rap forum admins private IEntityGroup forumAdminGroup; // the rap forum group for admins private IEntityGroup forumManagerGroup; //the rap forum group a step down from admins ! private static String uportalBaseURL = ""; // permissions private static HashMap tasks = null; protected static HashMap sessions = new HashMap(); } Index: ForumSessionData.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/ForumSessionData.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ForumSessionData.java 21 Jul 2004 17:17:06 -0000 1.1 --- ForumSessionData.java 4 Feb 2005 00:56:07 -0000 1.2 *************** *** 28,32 **** * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public class ForumSessionData { --- 28,32 ---- * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% */ public class ForumSessionData { Index: IForumThread.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/IForumThread.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IForumThread.java 26 Jan 2004 18:50:07 -0000 1.3 --- IForumThread.java 4 Feb 2005 00:56:07 -0000 1.4 *************** *** 32,36 **** * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public interface IForumThread { --- 32,36 ---- * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% */ public interface IForumThread { Index: RAPForum.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/RAPForum.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RAPForum.java 26 Jan 2004 18:50:07 -0000 1.3 --- RAPForum.java 4 Feb 2005 00:56:07 -0000 1.4 *************** *** 35,39 **** * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% * @testcase test.edu.fullcoll.uportal.channels.rap.forum.TestRAPForum */ --- 35,39 ---- * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% * @testcase test.edu.fullcoll.uportal.channels.rap.forum.TestRAPForum */ Index: IForumCategory.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/IForumCategory.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IForumCategory.java 26 Jan 2004 18:50:07 -0000 1.3 --- IForumCategory.java 4 Feb 2005 00:56:07 -0000 1.4 *************** *** 30,34 **** * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public interface IForumCategory { --- 30,34 ---- * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% */ public interface IForumCategory { Index: RAPUser.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/RAPUser.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RAPUser.java 26 Jan 2004 18:50:07 -0000 1.3 --- RAPUser.java 4 Feb 2005 00:56:07 -0000 1.4 *************** *** 30,34 **** * * @author Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public class RAPUser implements IUser { --- 30,34 ---- * * @author Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% */ public class RAPUser implements IUser { Index: RAPException.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/RAPException.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RAPException.java 26 Jan 2004 18:50:07 -0000 1.3 --- RAPException.java 4 Feb 2005 00:56:07 -0000 1.4 *************** *** 29,33 **** * * @author Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% * @see edu.fullcoll.uportal.channels.rap.forum.NestedException */ --- 29,33 ---- * * @author Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% * @see edu.fullcoll.uportal.channels.rap.forum.NestedException */ Index: IForumsManager.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/IForumsManager.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IForumsManager.java 26 Jan 2004 18:50:07 -0000 1.3 --- IForumsManager.java 4 Feb 2005 00:56:07 -0000 1.4 *************** *** 30,34 **** * * @author Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public interface IForumsManager { --- 30,34 ---- * * @author Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% */ public interface IForumsManager { Index: IForumComment.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/IForumComment.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IForumComment.java 26 Jan 2004 18:50:07 -0000 1.3 --- IForumComment.java 4 Feb 2005 00:56:07 -0000 1.4 *************** *** 29,33 **** * Interface for a forum comment. * @author Brad Rippe (br...@fu...), Christopher Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public interface IForumComment --- 29,33 ---- * Interface for a forum comment. * @author Brad Rippe (br...@fu...), Christopher Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% */ public interface IForumComment Index: RAPForumsManager.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/RAPForumsManager.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RAPForumsManager.java 26 Jan 2004 18:50:07 -0000 1.3 --- RAPForumsManager.java 4 Feb 2005 00:56:07 -0000 1.4 *************** *** 36,40 **** * * @author Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public class RAPForumsManager implements IForumsManager { --- 36,40 ---- * * @author Chris Pereda (cp...@fu...) ! * @version 0.9.0 $Revision %G% */ public class RAPForumsManager implements IForumsManager { |
From: Brad R. <br...@us...> - 2005-02-04 00:36:46
|
Update of /cvsroot/rapforums/src/stylesheets/edu/fullcoll/uportal/channels/rap/forum In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13817 Modified Files: admin.xml admin.xsl CForum.ssl Log Message: no message Index: admin.xml =================================================================== RCS file: /cvsroot/rapforums/src/stylesheets/edu/fullcoll/uportal/channels/rap/forum/admin.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin.xml 26 Jan 2004 19:04:03 -0000 1.2 --- admin.xml 4 Feb 2005 00:36:37 -0000 1.3 *************** *** 3,7 **** <username>Brad Rippe</username> <userid>brippe</userid> ! <type>deleteForum</type> <categories> <category> --- 3,7 ---- <username>Brad Rippe</username> <userid>brippe</userid> ! <type>renameForum</type> <categories> <category> Index: admin.xsl =================================================================== RCS file: /cvsroot/rapforums/src/stylesheets/edu/fullcoll/uportal/channels/rap/forum/admin.xsl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** admin.xsl 3 Feb 2004 22:21:24 -0000 1.3 --- admin.xsl 4 Feb 2005 00:36:37 -0000 1.4 *************** *** 20,27 **** } </style> ! <!-- todo remove ! <base href="G:/uportal/FCForums/FCForums/webpages/"/> ! <link rel="stylesheet" href="file://G:/uportal/FCForums/FCForums/webpages/stylesheets/edu/fullcoll/uportal/channels/rap/forum/sun001.css"></link> ! --> <!-- Show our logo --> <table class="uportal-background-light" cellpadding="1" cellspacing="0" border="0" width="100%"> --- 20,24 ---- } [...1002 lines suppressed...] + <a href="{$baseActionURL}?mode=admin&type=createCat" class="header" title="Add a new category">Add Category</a> + <br/> + <a href="{$baseActionURL}?mode=admin&type=deleteCat" class="header" title="Delete a category">Delete Category</a> + <br/> + <a href="{$baseActionURL}?mode=admin&type=createForum" class="header" title="Add a forum">Add Forum</a> + <br/> + <a href="{$baseActionURL}?mode=admin&type=deleteForum" class="header" title="Delete a forum">Delete Forum</a> + <br/> + <a href="{$baseActionURL}?mode=admin&type=renameForum" class="header" title="Rename forum">Rename + Forum</a> + <br/> + <hr/> + <a href="{$baseActionURL}?mode=admin&type=importCat" class="header" title="Add Categories and Forums">Import Categories and Forums</a> + <br/> + </td> + </tr> + </tbody> + </table> + </xsl:template> </xsl:stylesheet> Index: CForum.ssl =================================================================== RCS file: /cvsroot/rapforums/src/stylesheets/edu/fullcoll/uportal/channels/rap/forum/CForum.ssl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** CForum.ssl 17 Sep 2003 19:54:03 -0000 1.1.1.1 --- CForum.ssl 4 Feb 2005 00:36:37 -0000 1.2 *************** *** 1,7 **** <?xml version="1.0"?> <!-- CForum.ssl channel --> - - <?xml-stylesheet href="normal_netscape.xsl" title="normal" type="text/xsl" media="netscape"?> - <?xml-stylesheet href="normal_explorer.xsl" title="normal" type="text/xsl" media="explorer"?> <?xml-stylesheet title="main" href="main.xsl" type="text/xsl" media="explorer"?> --- 1,4 ---- *************** *** 11,14 **** --- 8,12 ---- <?xml-stylesheet title="post" href="post.xsl" type="text/xsl" media="explorer"?> <?xml-stylesheet title="profile" href="profile.xsl" type="text/xsl" media="explorer"?> + <?xml-stylesheet title="unauthorizedaction" href="unauthorizedaction.xsl" type="text/xsl" media="explorer"?> <?xml-stylesheet title="admin" href="admin.xsl" type="text/xsl" media="explorer"?> <?xml-stylesheet href="about.xsl" title="about" type="text/xsl" default="true"?> |
From: Brad R. <br...@us...> - 2005-02-04 00:36:34
|
Update of /cvsroot/rapforums/src/stylesheets/edu/fullcoll/uportal/channels/rap/forum In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13774 Modified Files: main.xml main.xsl Log Message: no message Index: main.xsl =================================================================== RCS file: /cvsroot/rapforums/src/stylesheets/edu/fullcoll/uportal/channels/rap/forum/main.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** main.xsl 26 Jan 2004 19:04:03 -0000 1.2 --- main.xsl 4 Feb 2005 00:36:23 -0000 1.3 *************** *** 1,253 **** <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> ! ! <xsl:output method="html" indent="no" /> ! <xsl:variable name="newline"> ! <xsl:text> </xsl:text> ! </xsl:variable> ! ! <!-- this get's overwritten by the servlet --> ! <xsl:param name="baseActionURL">baseActionURL_false</xsl:param> ! <xsl:variable name="amp">&</xsl:variable> ! <xsl:variable name="nbsp"> </xsl:variable> ! <xsl:variable name="mediaPath" select="'media/edu/fullcoll/uportal/channels/rap'"/> ! ! <xsl:template name="incr"> ! <xsl:param name="current"/> ! <xsl:param name="max"/> ! <xsl:call-template name="loop"> ! <xsl:with-param name="current" select="$current + 1"/> ! <xsl:with-param name="max" select="$max"/> ! </xsl:call-template> ! </xsl:template> ! <xsl:template name="loop"> ! <xsl:param name="current"/> ! <xsl:param name="max"/> ! <xsl:if test="number($current) <= number($max)"> ! <!-- loop code to perform work goes here --> ! ! <xsl:variable name="currentMinus1"> ! <xsl:value-of select="$current - 1"/> ! </xsl:variable> ! <xsl:variable name="lastNumOnPg"> ! <xsl:value-of select="$currentMinus1 * 5"/> ! </xsl:variable> ! ! <!-- Don't link to the current page we are on --> ! <xsl:choose> ! <xsl:when test=" $current = /rap/currentpage "> ! <xsl:value-of select="$current"/>  </xsl:when> ! <xsl:otherwise> ! <a> ! <xsl:attribute name="href"><xsl:value-of select="$baseActionURL"/>?mode=main&t=5&lpg=<xsl:value-of select="$lastNumOnPg"/></xsl:attribute> ! <xsl:value-of select="$current"/> ! </a>   </xsl:otherwise> ! </xsl:choose> ! ! <!-- end loop code to perform work --> ! <xsl:call-template name="incr"> ! <xsl:with-param name="current" select="$current"/> ! <xsl:with-param name="max" select="$max"/> ! </xsl:call-template> ! </xsl:if> ! </xsl:template> ! ! <xsl:template match="/"> ! ! <!-- show our logo --> ! <table class="uportal-background-light" cellpadding="1" cellspacing="0" border="0" width="100%"> ! <tr> ! <td> ! <table class="uportal-background-light" cellpadding="6" cellspacing="0" border="0" width="100%"> ! <tr> ! <td> ! <a href="{$baseActionURL}"><img src="{$mediaPath}/logo.gif" width="300" height="38" border="0"/></a> ! </td> ! </tr> ! </table> ! </td> ! </tr> ! </table> ! ! ! <!-- greet the user --> ! <table cellpadding="0" cellspacing="0" border="0" width="100%"> ! <tr><td><img src="{$mediaPath}/blank.gif" width="1" height="10" border="0"/></td></tr> ! </table> ! <table cellpadding="0" cellspacing="0" border="0" width="100%"> ! <tr> ! <td valign="top" width="99%"> ! <table cellpadding="3" cellspacing="0" border="0" width="200"> ! <tr> ! <td colspan="2"> ! <font size="-1" face="arial,sans-serif" color="#000000"> ! <span class="uportal-channel-subtitle"> Welcome, <i><xsl:value-of select="/rap/username"/></i></span> ! </font> ! </td> ! </tr> ! </table> ! </td> ! </tr> ! </table> ! ! <!-- list the number of forums and links to navigate forum pages --> ! <table cellpadding="3" cellspacing="0" border="0" width="100%"> ! <tr> ! <td> ! ! <!-- OUTPUT THE NUMBER OF PAGES --> ! <font size="-1" face="arial,sans-serif">Forum pages: <xsl:variable name="pages"> ! <xsl:value-of select="/rap/forumnumber div 5"/> ! </xsl:variable> ! <xsl:value-of select="ceiling($pages)"/><xsl:text>:</xsl:text>   <b>[  <xsl:call-template name="loop"> ! <xsl:with-param name="current" select="1"/> ! <xsl:with-param name="max" select="ceiling($pages)"/> ! </xsl:call-template> ! ]</b></font> ! </td> ! <td align="right"> ! <a> ! <xsl:attribute name="href"><xsl:value-of select="$baseActionURL"/>?mode=admin&type=createForum</xsl:attribute>Forum Administration </a> ! </td> ! </tr> ! </table> ! <!-- show the available forums --> ! <table class="uportal-background-light" cellpadding="0" cellspacing="0" border="0" width="100%"> ! <tr> ! <td> ! <table class="uportal-background-content" cellpadding="3" cellspacing="1" border="0" width="100%"> ! ! <xsl:for-each select="rap/rapforums/rapforum"> ! <!-- the column categories --> ! <xsl:if test="not(categoryname = preceding-sibling::*[1]/categoryname)"> ! <tr class="uportal-background-med"> ! <td class="uportal-channel-strong" width="100%" colspan="4"> ! <b><xsl:value-of select="categoryname"/></b> ! </td> ! </tr> ! <!-- the column titles --> ! <tr class="uportal-background-light"> ! <td width="1%"></td> ! <td class="uportal-channel-strong" width="96%"> ! <b> FORUM</b> ! </td> ! <td class="uportal-channel-strong" width="1%" > ! <b> COMMENTS</b> ! </td> ! ! <td class="uportal-channel-strong" width="1%" align="center"> ! <b> LAST POST </b> ! </td> ! </tr> ! <!-- end of column titles --> ! </xsl:if> ! ! <!-- end of column categories --> ! <!-- here we get the forums in xml --> ! ! <tr class="uportal-background-content"> ! <td > ! <img src="{$mediaPath}/topic_old.gif" width="8" height="8" vspace="4" border="0"/> ! </td> ! <td class="uportal-channel-text"> ! <a> ! <xsl:attribute name="href"><xsl:value-of select="$baseActionURL"/>?mode=forum&forum=<xsl:value-of select="forumid"/>&start=0</xsl:attribute> ! <xsl:value-of select="name"/> ! </a> <br/> ! <font size="-2"> ! <xsl:value-of select="description"/> ! </font> ! </td> ! ! <td align="center"> ! <font size="-2"> ! <xsl:value-of select="numthreads"/>  Threads<br/> ! <xsl:value-of select="numcomments"/>  Comments ! </font> ! </td> ! <td > ! <table cellpadding="0" cellspacing="0" border="0" width="100%"> ! <tr><td > ! <font size="-1"> ! <xsl:value-of select="lastdate"/> ! </font> ! </td> ! ! <td> </td> ! <td align="right" > ! <font size="-2"> ! by: <xsl:value-of select="lastauthor"/> ! </font> ! </td> ! ! </tr> ! </table> ! </td> ! </tr> ! </xsl:for-each> ! <!-- end forum block --> ! ! </table> ! </td> ! </tr> ! </table> ! ! <!-- link to the forum pages --> ! <table cellpadding="1" cellspacing="0" border="0" width="100%"> ! <tr><td> ! <table cellpadding="3" cellspacing="0" border="0" width="100%"> ! <tr><td class="uportal-channel-text"> ! <!-- OUTPUT THE PAGES --> ! <font size="-2">Forum pages: ! <xsl:variable name="pages"> ! <xsl:value-of select="/rap/forumnumber div 5"/> ! </xsl:variable> ! <xsl:value-of select="ceiling($pages)"/><xsl:text>:</xsl:text> !   ! <b>[  ! ! <xsl:call-template name="loop"> ! <xsl:with-param name="current" select="1"/> ! <xsl:with-param name="max" select="ceiling($pages)"/> ! </xsl:call-template> ! ! ]</b></font> ! </td> ! </tr></table> ! </td></tr> ! </table> ! <br/> ! ! <!-- show search link --> ! <p/> ! <table cellpadding="6" cellspacing="0" border="0" width="100%"> ! <tr> ! <td class="uportal-channel-text" align="center"> ! <hr size="1" width="75%" color="#666666"/> ! <font size="-2"> ! <!-- <a href="{$baseActionURL}">Forum Home</a> | --> ! <a href="{$baseActionURL}?mode=search">Search</a> ! <br/><br/> ! ! </font> ! </td> ! </tr> ! </table> ! </xsl:template> </xsl:stylesheet> --- 1,228 ---- <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> ! <xsl:output method="html" indent="no"/> ! <xsl:variable name="newline"> ! <xsl:text> </xsl:text> ! </xsl:variable> ! <!-- this get's overwritten by the servlet --> ! <xsl:param name="baseActionURL">baseActionURL_false</xsl:param> ! <xsl:variable name="amp">&</xsl:variable> ! <xsl:variable name="nbsp"> </xsl:variable> ! <xsl:variable name="mediaPath" select="'media/edu/fullcoll/uportal/channels/rap'"/> ! <xsl:param name="nodes" select="rap/rapforums/category"/> ! ! <xsl:template name="incr"> ! <xsl:param name="current"/> ! <xsl:param name="max"/> ! <xsl:call-template name="loop"> ! <xsl:with-param name="current" select="$current + 1"/> ! <xsl:with-param name="max" select="$max"/> ! </xsl:call-template> ! </xsl:template> ! <xsl:template name="loop"> ! <xsl:param name="current"/> ! <xsl:param name="max"/> ! <xsl:if test="number($current) <= number($max)"> ! <!-- loop code to perform work goes here --> ! <xsl:variable name="currentMinus1"> ! <xsl:value-of select="$current - 1"/> ! </xsl:variable> ! <xsl:variable name="lastNumOnPg"> ! <xsl:value-of select="$currentMinus1 * 5"/> ! </xsl:variable> ! <!-- Don't link to the current page we are on --> ! <xsl:choose> ! <xsl:when test=" $current = /rap/currentpage "> ! <xsl:value-of select="$current"/>  </xsl:when> ! <xsl:otherwise> ! <a> ! <xsl:attribute name="href"><xsl:value-of select="$baseActionURL"/>?mode=main&t=5&lpg=<xsl:value-of select="$lastNumOnPg"/></xsl:attribute> ! <xsl:value-of select="$current"/> ! </a>   </xsl:otherwise> ! </xsl:choose> ! <!-- end loop code to perform work --> ! <xsl:call-template name="incr"> ! <xsl:with-param name="current" select="$current"/> ! <xsl:with-param name="max" select="$max"/> ! </xsl:call-template> ! </xsl:if> ! </xsl:template> ! <xsl:template match="/"> ! <!-- show our logo --> ! <table class="uportal-background-light" cellpadding="1" cellspacing="0" border="0" width="100%"> ! <tr> ! <td> ! <table class="uportal-background-light" cellpadding="6" cellspacing="0" border="0" width="100%"> ! <tr> ! <td> ! <a href="{$baseActionURL}"> ! <img src="{$mediaPath}/logo.gif" width="300" height="38" border="0"/> ! </a> ! </td> ! </tr> ! </table> ! </td> ! </tr> ! </table> ! <!-- greet the user --> ! <table cellpadding="0" cellspacing="0" border="0" width="100%"> ! <tr> ! <td> ! <img src="{$mediaPath}/blank.gif" width="1" height="10" border="0"/> ! </td> ! </tr> ! </table> ! <table cellpadding="0" cellspacing="0" border="0" width="100%"> ! <tr> ! <td valign="top" width="99%"> ! <table cellpadding="3" cellspacing="0" border="0" width="200"> ! <tr> ! <td colspan="2"> ! <font size="-1" face="arial,sans-serif" color="#000000"> ! <span class="uportal-channel-subtitle"> Welcome, <i> ! <xsl:value-of select="/rap/username"/>  <br/> ! <font size="-2"> ! <xsl:value-of select="/rap/sessionnumber"/> users logged in.</font> ! </i> ! </span> ! </font> ! </td> ! </tr> ! </table> ! </td> ! </tr> ! </table> ! <!-- list the number of forums and links to navigate forum pages --> ! <table cellpadding="3" cellspacing="0" border="0" width="100%"> ! <tr> ! <!--<td>--> ! <!-- OUTPUT THE NUMBER OF PAGES --> ! <!--<font size="-1" face="arial,sans-serif">Forum pages: <xsl:variable name="pages"> ! <xsl:value-of select="/rap/forumnumber div 5"/> ! </xsl:variable> ! <xsl:value-of select="ceiling($pages)"/> ! <xsl:text>:</xsl:text>   <b>[  <xsl:call-template name="loop"> ! <xsl:with-param name="current" select="1"/> ! <xsl:with-param name="max" select="ceiling($pages)"/> ! </xsl:call-template> ! ]</b> ! </font> ! </td>--> ! <td align="right"> ! <a> ! <xsl:attribute name="href"><xsl:value-of select="$baseActionURL"/>?mode=admin&type=adminForum</xsl:attribute>Forum Administration </a> ! </td> ! </tr> ! </table> ! <!-- show the available forums --> ! <table cellpadding="0" cellspacing="0" border="0" width="100%"> ! <tr> ! <td valign="top"> ! ! <!-- Forum Layout --> ! <xsl:for-each select="rap/rapforums/category"> ! <table cellpadding="2" cellspacing="2" border="0" width="100%"> ! <xsl:if test="position() mod 2 = 1"> ! <tr valign="top"> ! <!-- left hand forums --> ! <td width="45%" valign="top"> ! <font size="-1"> ! <span class="uportal-text"> ! <b> ! <xsl:value-of select="name"/> ! </b> ! <hr size="1" width="75%" color="#666666"/> ! </span> ! <!-- Display forums from the category --> ! <xsl:for-each select="rapforum"> ! <a> ! <xsl:attribute name="class">uportal-channel-subtitle</xsl:attribute> ! <xsl:attribute name="href"><xsl:value-of select="$baseActionURL"/>?mode=forum&forum=<xsl:value-of select="forumid"/>&start=0</xsl:attribute> ! <xsl:value-of select="name"/> ! </a> ! <br/> ! </xsl:for-each> ! <!-- end of category table --> ! </font> ! </td> ! ! <!-- even forums --> ! <td width="45%" valign="top"> ! <font size="-1"> ! <span class="uportal-text"> ! <b> ! <xsl:value-of select="following-sibling::category/name"/> ! </b> ! <hr size="1" width="75%" color="#666666"/> ! </span> ! ! <xsl:for-each select="following-sibling::category[1]/rapforum"> ! <xsl:value-of select="following-sibling::category/name"/><br/> ! <a> ! <xsl:attribute name="class">uportal-channel-subtitle</xsl:attribute> ! <xsl:attribute name="href"><xsl:value-of select="$baseActionURL"/>?mode=forum&forum=<xsl:value-of select="forumid"/>&start=0</xsl:attribute> ! <xsl:value-of select="name"/> ! </a> ! <br/> ! </xsl:for-each> ! </font> ! </td> ! </tr> ! </xsl:if> ! <!-- Forum Layout --> ! </table> ! </xsl:for-each> ! <!-- end forum block --> ! ! <xsl:if test="not($nodes)"> ! <p>You currently don't have read access to any forums. Please contact your portal administrator to gain access. Thank you!</p> ! </xsl:if> ! </td> ! </tr> ! </table> ! <!-- link to the forum pages --> ! <table cellpadding="1" cellspacing="0" border="0" width="100%"> ! <tr> ! <td> ! <table cellpadding="3" cellspacing="0" border="0" width="100%"> ! <tr> ! <td class="uportal-channel-text"> ! </td> ! </tr> ! </table> ! </td> ! </tr> ! </table> <br/> ! <!-- show search link --> ! <p/> ! <table cellpadding="6" cellspacing="0" border="0" width="100%"> ! <tr> ! <td class="uportal-channel-text" align="center"> ! <hr size="1" width="75%" color="#666666"/> ! <font size="-2"> ! <!-- <a href="{$baseActionURL}">Forum Home</a> | --> ! <a href="{$baseActionURL}?mode=search">Search</a> ! <br/> ! <br/> ! </font> ! </td> ! </tr> ! </table> ! </xsl:template> </xsl:stylesheet> Index: main.xml =================================================================== RCS file: /cvsroot/rapforums/src/stylesheets/edu/fullcoll/uportal/channels/rap/forum/main.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** main.xml 26 Jan 2004 19:04:03 -0000 1.2 --- main.xml 4 Feb 2005 00:36:23 -0000 1.3 *************** *** 1,147 **** ! <?xml version="1.0" encoding="utf-8"?> ! <rap> ! <!--<username>Brad Rippe</username> ! <currentpage>1.0</currentpage> ! <forumnumber>1</forumnumber> ! <rapForums> ! <rapforum> ! <forumid>1</forumid> ! <name>New Forums Channel</name> ! <description>This is a tempory Forum for information about Rap Forums</description> ! <categoryname>General</categoryname> ! <numthreads>1</numthreads> ! <numcomments>1</numcomments> ! <lastcommentid/> ! <lastdate>Wednesday, October 16, 2002 5:22:00 PM PDT</lastdate> ! <lastauthor>000000</lastauthor> ! </rapforum> ! </rapForums>--> ! </rap> ! <!--<?xml version="1.0"?> ! <rap> ! <username>Brad</username> ! <forumnumber>11</forumnumber> ! <rapforums> ! <rapforum> ! <forumid>1</forumid> ! <name>Test Forum 1</name> ! <description>This a test forum. The forum id is 1.</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid/> ! <lastdate>Wednesday, October 16, 2002 5:22:00 PM PDT</lastdate> ! <lastauthor>000000</lastauthor> ! </rapforum> ! <rapforum> ! <forumid>2</forumid> ! <name>Test Forum 2</name> ! <description>This a test forum. The forum id is 2.</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid/> ! <lastdate>Wednesday, October 16, 2002 5:22:00 PM PDT</lastdate> ! <lastauthor>000000</lastauthor> ! </rapforum> ! <rapforum> ! <forumid>3</forumid> ! <name>Test Forum 3</name> ! <description>This a test forum. The forum id is 3.</description> ! <categoryname>WebCT</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid/> ! <lastdate>Wednesday, October 16, 2002 5:22:00 PM PDT</lastdate> ! <lastauthor>000000</lastauthor> ! </rapforum> ! <rapforum> ! <forumid>4</forumid> ! <name>Test Forum 4</name> ! <description>This a test forum. The forum id is 4.</description> ! <categoryname>WebCT</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid/> ! <lastdate>Wednesday, October 16, 2002 5:22:00 PM PDT</lastdate> ! <lastauthor>000000</lastauthor> ! </rapforum> ! <rapforum> ! <forumid>5</forumid> ! <name>Test Forum 5</name> ! <description>This a test forum. The forum id is 5.</description> ! <categoryname>WebCT</categoryname> ! <numthreads>1</numthreads> ! <numcomments>5</numcomments> ! <lastcommentid>12</lastcommentid> ! <lastdate>Wednesday, October 16, 2002 5:22:00 PM PDT</lastdate> ! <lastauthor>000000</lastauthor> ! </rapforum> ! <rapforum> ! <forumid>6</forumid> ! <name>Test Forum 6</name> ! <description>This a test forum. The forum id is 1.</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid/> ! <lastdate>Wednesday, October 16, 2002 5:22:00 PM PDT</lastdate> ! <lastauthor>000000</lastauthor> ! </rapforum> ! <rapforum> ! <forumid>7</forumid> ! <name>Test Forum 7</name> ! <description>This a test forum. The forum id is 2.</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid/> ! <lastdate>Wednesday, October 16, 2002 5:22:00 PM PDT</lastdate> ! <lastauthor>000000</lastauthor> ! </rapforum> ! <rapforum> ! <forumid>8</forumid> ! <name>Test Forum 8</name> ! <description>This a test forum. The forum id is 3.</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid/> ! <lastdate>Wednesday, October 16, 2002 5:22:00 PM PDT</lastdate> ! <lastauthor>000000</lastauthor> ! </rapforum> ! <rapforum> ! <forumid>9</forumid> ! <name>Test Forum 4</name> ! <description>This a test forum. The forum id is 9.</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid/> ! <lastdate>Wednesday, October 16, 2002 5:22:00 PM PDT</lastdate> ! <lastauthor>000000</lastauthor> ! </rapforum> ! <rapforum> ! <forumid>10</forumid> ! <name>Test Forum 10</name> ! <description>This a test forum. The forum id is 5.</description> ! <categoryname>General</categoryname> ! <numthreads>1</numthreads> ! <numcomments>5</numcomments> ! <lastcommentid>12</lastcommentid> ! <lastdate>Wednesday, October 16, 2002 5:22:00 PM PDT</lastdate> ! <lastauthor>000000</lastauthor> ! </rapforum> ! <rapforum> ! <forumid>11</forumid> ! <name>Test Forum 11</name> ! <description>This a test forum. The forum id is 5.</description> ! <categoryname>WebCT</categoryname> ! <numthreads>1</numthreads> ! <numcomments>5</numcomments> ! <lastcommentid>12</lastcommentid> ! <lastdate>Wednesday, October 16, 2002 5:22:00 PM PDT</lastdate> ! <lastauthor>000000</lastauthor> ! </rapforum> ! </rapforums> ! </rap>--> \ No newline at end of file --- 1,809 ---- ! <?xml version="1.0" encoding="utf-8"?><rap><username>Brad Rippe</username><currentpage>1.0</currentpage><forumnumber>67</forumnumber> ! <sessionnumber>1</sessionnumber><rapforums> ! <category><name>Archived</name><rapforum> ! <rownum>1</rownum> ! <forumid>84</forumid> ! <name>Test Archived Forums</name> ! <description>Test Forum</description> ! <categoryname>Archived</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! </category><category><name>General</name><rapforum> ! <rownum>2</rownum> ! <forumid>12</forumid> ! <name>New Web Site</name> ! <description>This forum is used to discuss the new Fullerton College web site. What features are good and what features are bad.</description> ! <categoryname>General</categoryname> ! <numthreads>16</numthreads> ! <numcomments>39</numcomments> ! <lastcommentid>71</lastcommentid> ! <lastdate>Wednesday, March 24, 2004 12:00:00 PM PST</lastdate> ! <lastauthor>00574557</lastauthor> ! </rapforum> ! <rapforum> ! <rownum>3</rownum> ! <forumid>16</forumid> ! <name>Accounting</name> ! <description>Accounting forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>4</rownum> ! <forumid>17</forumid> ! <name>Anatomy and Physiology</name> ! <description>Anatomy and Physiology forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>5</rownum> ! <forumid>18</forumid> ! <name>Antropology</name> ! <description>Antropology forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>6</rownum> ! <forumid>19</forumid> ! <name>Architecture</name> ! <description>Architecture forum</description> ! <categoryname>General</categoryname> ! <numthreads>1</numthreads> ! <numcomments>2</numcomments> ! <lastcommentid>63</lastcommentid> ! <lastdate>Saturday, November 29, 2003 12:13:00 PM PST</lastdate> ! <lastauthor>00826041</lastauthor> ! </rapforum> ! <rapforum> ! <rownum>7</rownum> ! <forumid>20</forumid> ! <name>Art</name> ! <description>Art Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>8</rownum> ! <forumid>21</forumid> ! <name>Automotive</name> ! <description>Automotive forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>9</rownum> ! <forumid>22</forumid> ! <name>Biology</name> ! <description>Biology forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>10</rownum> ! <forumid>23</forumid> ! <name>Business Management</name> ! <description>Business Management forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>11</rownum> ! <forumid>24</forumid> ! <name>Chemistry</name> ! <description>Chemistry forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>12</rownum> ! <forumid>25</forumid> ! <name>Child Development and Family Life</name> ! <description>Child Development and Family Life forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>13</rownum> ! <forumid>26</forumid> ! <name>Chinese</name> ! <description>Chinese forum</description> ! <categoryname>General</categoryname> ! <numthreads>1</numthreads> ! <numcomments>1</numcomments> ! <lastcommentid>69</lastcommentid> ! <lastdate>Friday, February 27, 2004 12:00:00 AM PST</lastdate> ! <lastauthor>00686013</lastauthor> ! </rapforum> ! <rapforum> ! <rownum>14</rownum> ! <forumid>27</forumid> ! <name>Computer Graphics</name> ! <description>Computer Graphics forum</description> ! <categoryname>General</categoryname> ! <numthreads>1</numthreads> ! <numcomments>1</numcomments> ! <lastcommentid>67</lastcommentid> ! <lastdate>Monday, January 26, 2004 11:13:00 AM PST</lastdate> ! <lastauthor>00031525</lastauthor> ! </rapforum> ! <rapforum> ! <rownum>15</rownum> ! <forumid>28</forumid> ! <name>Computer Information Systems</name> ! <description>Computer Information Systems forum</description> ! <categoryname>General</categoryname> ! <numthreads>4</numthreads> ! <numcomments>6</numcomments> ! <lastcommentid>76</lastcommentid> ! <lastdate>Monday, November 1, 2004 12:00:00 PM PST</lastdate> ! <lastauthor>00398786</lastauthor> ! </rapforum> ! <rapforum> ! <rownum>16</rownum> ! <forumid>29</forumid> ! <name>Computer Science</name> ! <description>Computer Science Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>17</rownum> ! <forumid>30</forumid> ! <name>Construction Technology</name> ! <description>Construction Technology Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>18</rownum> ! <forumid>31</forumid> ! <name>Cosmetology</name> ! <description>Cosmetology forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>19</rownum> ! <forumid>32</forumid> ! <name>Counseling and Guidance</name> ! <description>Counseling and Guidance Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>20</rownum> ! <forumid>33</forumid> ! <name>Drafting Technology</name> ! <description>Drafting Technology Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>21</rownum> ! <forumid>34</forumid> ! <name>Earth Science</name> ! <description>Earth Science Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! </category> ! <!-- ! <rapforum> ! <rownum>22</rownum> ! <forumid>35</forumid> ! <name>Economics</name> ! <description>Economics Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>23</rownum> ! <forumid>36</forumid> ! <name>Electronics</name> ! <description>Electronics Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>24</rownum> ! <forumid>37</forumid> ! <name>Engineering</name> ! <description>Engineering Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>25</rownum> ! <forumid>38</forumid> ! <name>English</name> ! <description>English Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>26</rownum> ! <forumid>39</forumid> ! <name>English As A Second Language</name> ! <description>English As A Second Language Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>27</rownum> ! <forumid>40</forumid> ! <name>Environmental Sciences</name> ! <description>Environmental Sciences Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>28</rownum> ! <forumid>42</forumid> ! <name>Ethnic Studies</name> ! <description>Ethnic Studies Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>29</rownum> ! <forumid>43</forumid> ! <name>Fashion</name> ! <description>Fashion Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>30</rownum> ! <forumid>44</forumid> ! <name>French</name> ! <description>French Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>31</rownum> ! <forumid>45</forumid> ! <name>Geography</name> ! <description>Geography Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>32</rownum> ! <forumid>46</forumid> ! <name>German</name> ! <description>German Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>33</rownum> ! <forumid>47</forumid> ! <name>Health Education</name> ! <description>Health Education Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>34</rownum> ! <forumid>48</forumid> ! <name>History</name> ! <description>History Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>35</rownum> ! <forumid>49</forumid> ! <name>Horticulture</name> ! <description>Horticulture Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>36</rownum> ! <forumid>50</forumid> ! <name>Interior Design</name> ! <description>Interior Design Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>37</rownum> ! <forumid>51</forumid> ! <name>Italian</name> ! <description>Italian Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>38</rownum> ! <forumid>52</forumid> ! <name>Japanese</name> ! <description>Japanese Forum</description> ! <categoryname>General</categoryname> ! <numthreads>1</numthreads> ! <numcomments>1</numcomments> ! <lastcommentid>70</lastcommentid> ! <lastdate>Wednesday, March 17, 2004 12:00:00 PM PST</lastdate> ! <lastauthor>jcraig</lastauthor> ! </rapforum> ! <rapforum> ! <rownum>39</rownum> ! <forumid>53</forumid> ! <name>Journalism</name> ! <description>Journalism Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>40</rownum> ! <forumid>54</forumid> ! <name>Library Technology</name> ! <description>Library Technology Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>41</rownum> ! <forumid>55</forumid> ! <name>Machine Technology</name> ! <description>Machine Technology Forum</description> ! <categoryname>General</categoryname> ! <numthreads>1</numthreads> ! <numcomments>1</numcomments> ! <lastcommentid>51</lastcommentid> ! <lastdate>Thursday, October 23, 2003 2:54:00 PM PDT</lastdate> ! <lastauthor>smckenzie</lastauthor> ! </rapforum> ! <rapforum> ! <rownum>42</rownum> ! <forumid>56</forumid> ! <name>Mathematics</name> ! <description>Mathematics Forum</description> ! <categoryname>General</categoryname> ! <numthreads>1</numthreads> ! <numcomments>2</numcomments> ! <lastcommentid>44</lastcommentid> ! <lastdate>Wednesday, October 1, 2003 11:00:00 AM PDT</lastdate> ! <lastauthor>00152280</lastauthor> ! </rapforum> ! <rapforum> ! <rownum>43</rownum> ! <forumid>57</forumid> ! <name>Microbiology</name> ! <description>Microbiology Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>44</rownum> ! <forumid>58</forumid> ! <name>Music</name> ! <description>Music Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>45</rownum> ! <forumid>59</forumid> ! <name>Nutrition and Foods</name> ! <description>Nutrition and Foods Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>46</rownum> ! <forumid>60</forumid> ! <name>Paralegal Studies</name> ! <description>Paralegal Studies Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>47</rownum> ! <forumid>61</forumid> ! <name>Philosophy and Religious Studies</name> ! <description>Philosophy and Religious Studies Forum</description> ! <categoryname>General</categoryname> ! <numthreads>1</numthreads> ! <numcomments>1</numcomments> ! <lastcommentid>74</lastcommentid> ! <lastdate>Saturday, May 15, 2004 12:00:00 PM PDT</lastdate> ! <lastauthor>00705744</lastauthor> ! </rapforum> ! <rapforum> ! <rownum>48</rownum> ! <forumid>62</forumid> ! <name>Photography</name> ! <description>Photography Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>49</rownum> ! <forumid>63</forumid> ! <name>Physical Education</name> ! <description>Physical Education Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>50</rownum> ! <forumid>64</forumid> ! <name>Physics</name> ! <description>Physics Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>51</rownum> ! <forumid>65</forumid> ! <name>Political Science</name> ! <description>Political Science Forum</description> ! <categoryname>General</categoryname> ! <numthreads>1</numthreads> ! <numcomments>2</numcomments> ! <lastcommentid>57</lastcommentid> ! <lastdate>Monday, November 17, 2003 1:59:00 PM PST</lastdate> ! <lastauthor>00704357</lastauthor> ! </rapforum> ! <rapforum> ! <rownum>52</rownum> ! <forumid>66</forumid> ! <name>Portuguese</name> ! <description>Portuguese Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>53</rownum> ! <forumid>68</forumid> ! <name>Printing Technology</name> ! <description>Printing Technology Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>54</rownum> ! <forumid>69</forumid> ! <name>Psychology</name> ! <description>Psychology Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>55</rownum> ! <forumid>70</forumid> ! <name>Radio-Television</name> ! <description>Radio-Television Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>56</rownum> ! <forumid>71</forumid> ! <name>Reading</name> ! <description>Reading Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>57</rownum> ! <forumid>72</forumid> ! <name>Real Estate</name> ! <description>Real Estate Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>58</rownum> ! <forumid>73</forumid> ! <name>Social Sciences</name> ! <description>Social Sciences Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>59</rownum> ! <forumid>74</forumid> ! <name>Sociology</name> ! <description>Sociology Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>60</rownum> ! <forumid>75</forumid> ! <name>Spanish</name> ! <description>Spanish Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>61</rownum> ! <forumid>76</forumid> ! <name>Speech</name> ! <description>Speech Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>62</rownum> ! <forumid>77</forumid> ! <name>Student Support Services</name> ! <description>Student Support Services Forum</description> ! <categoryname>General</categoryname> ! <numthreads>1</numthreads> ! <numcomments>1</numcomments> ! <lastcommentid>66</lastcommentid> ! <lastdate>Saturday, January 24, 2004 6:07:00 PM PST</lastdate> ! <lastauthor>00807954</lastauthor> ! </rapforum> ! <rapforum> ! <rownum>63</rownum> ! <forumid>78</forumid> ! <name>Technology-Related Courses</name> ! <description>Technology-Related Courses Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>64</rownum> ! <forumid>79</forumid> ! <name>Theatre Arts</name> ! <description>Theatre Arts Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>65</rownum> ! <forumid>80</forumid> ! <name>Welding</name> ! <description>Welding Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>66</rownum> ! <forumid>81</forumid> ! <name>Women's Studies</name> ! <description>Women's Studies Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum> ! <rapforum> ! <rownum>67</rownum> ! <forumid>82</forumid> ! <name>Wood Technology</name> ! <description>Wood Technology Forum</description> ! <categoryname>General</categoryname> ! <numthreads>0</numthreads> ! <numcomments>0</numcomments> ! <lastcommentid /> ! <lastdate /> ! <lastauthor /> ! </rapforum></category>--> ! </rapforums></rap> |
From: Brad R. <br...@us...> - 2005-02-04 00:36:19
|
Update of /cvsroot/rapforums/src/stylesheets/edu/fullcoll/uportal/channels/rap/forum In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13739 Added Files: threadfo.xsl unauthorizedaction.xml unauthorizedaction.xsl Log Message: no message --- NEW FILE: unauthorizedaction.xsl --- <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html" indent="no"/> <xsl:param name="baseActionURL">baseActionURL_false</xsl:param> <xsl:param name="amp">&</xsl:param> <xsl:param name="nbsp"> </xsl:param> <xsl:param name="raquo">»</xsl:param> <xsl:variable name="mediaPath" select="'media/edu/fullcoll/uportal/channels/rap'"/> <xsl:template match="/"> <!-- Show our logo --> <table class="uportal-background-light" cellpadding="1" cellspacing="0" border="0" width="100%"> <tr> <td> <table class="uportal-background-light" cellpadding="6" cellspacing="0" border="0" width="100%"> <tr> <td> <a href="{$baseActionURL}"> <img src="{$mediaPath}/logo.gif" width="300" height="38" border="0"/> </a> </td> </tr> </table> </td> </tr> </table> <!-- link to home and the current forum --> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td> <img src="{$mediaPath}/blank.gif" width="1" height="10" border="0"/> </td> </tr> </table> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td valign="top" width="98%"> <span class="uportal-channel-text"> <b> <a href="{$baseActionURL}">Home</a> <xsl:value-of select="$nbsp"/> <xsl:value-of select="$raquo"/> <xsl:value-of select="$nbsp"/> <a href="{$baseActionURL}" class="header" title="Go back to the forum list">Forums</a> <br/> </b> </span> <br/> <span class="uportal-channel-title"> <b>Access Denied - Unauthorized Access</b> </span> <br/> </td> <td valign="top" width="1%" align="center"> <!-- Greet the user --> <table cellpadding="3" cellspacing="0" border="0" width="200"> <tr> <td colspan="2"> <font size="-1" face="arial,sans-serif"> Welcome, <xsl:value-of select="/rap/name"/> </font> </td> </tr> </table> </td> </tr> </table> <p/> <b> <div class="uportal-channel-warning"><img src="{$mediaPath}/metal-Error.gif" alt="Unauthorized Icon"/><xsl:value-of select="/rap/message"/></div> <br/><br/> <a href="{$baseActionURL}" class="header" title="Go back to the forum list">Forums Home</a> <br/> </b> <p/> <br/> <table cellpadding="6" cellspacing="0" border="0" width="100%"> <tr> <td align="center"> <hr size="1" width="75%" color="#666666"/> <font size="-2" face="verdana,arial,sans-serif"> <a href="{$baseActionURL}">Forum Home</a> | <a href="{$baseActionURL}?mode=search">Search</a> <br/> <br/> </font> </td> </tr> </table> </xsl:template> <xsl:template name="option-list"> <xsl:element name="option"> <xsl:attribute name="value"><xsl:value-of select="categoryid"/></xsl:attribute> <xsl:value-of select="categoryname"/> </xsl:element> </xsl:template> <xsl:template name="option-list-forums"> <xsl:element name="option"> <xsl:attribute name="value"><xsl:value-of select="forumid"/></xsl:attribute> <xsl:value-of select="name"/> </xsl:element> </xsl:template> </xsl:stylesheet> --- NEW FILE: threadfo.xsl --- <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo"> <xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/> <!-- ========================= --> <!-- root element: projectteam --> <!-- ========================= --> <xsl:template match="rap/rapforum"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="2cm" margin-bottom="2cm" margin-left="1cm" margin-right="1cm"> <fo:region-body/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="simpleA4"> <fo:flow flow-name="xsl-region-body"> <fo:block font-size="16pt" font-weight="bold" space-after="5mm">Forum Name: <xsl:value-of select="forumname"/> </fo:block> <fo:block font-size="10pt"> <fo:table table-layout="fixed"> <fo:table-column column-width="4cm"/> <fo:table-column column-width="11cm"/> <fo:table-column column-width="4cm"/> <fo:table-body> <xsl:apply-templates/> </fo:table-body> </fo:table> <fo:block text-align="center" font-size="9pt"> This was created by Fullerton College Rap Forums and Apache Foundations FOP. </fo:block> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> <!-- ========================= --> <!-- child element: member --> <!-- ========================= --> <xsl:template match="rapcomments/rapcomment"> <fo:table-row> <fo:table-cell number-columns-spanned="3"> <fo:block color="lightblue"> <fo:leader text-align="center" rule-style="dashed" rule-thickness="2pt" leader-pattern="rule" leader-length="15cm" space-after="2cm"></fo:leader> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block font-size="12pt" font-weight="bold" space-after="2mm"> <xsl:value-of select="subject"/> </fo:block> </fo:table-cell> <fo:table-cell> </fo:table-cell> <fo:table-cell> <fo:block font-size="9pt" font-weight="normal" space-after="2mm" font-style="italic"> by <xsl:value-of select="userid"/> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> </fo:table-cell> <fo:table-cell> <fo:block font-size="10pt" font-weight="normal" space-after="2mm"> <xsl:value-of select="body"/> </fo:block> </fo:table-cell> <fo:table-cell> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block font-size="9pt" font-weight="normal" space-after="2mm"> <xsl:value-of select="modifieddate"/> </fo:block> </fo:table-cell> <fo:table-cell></fo:table-cell> <fo:table-cell></fo:table-cell> </fo:table-row> </xsl:template> </xsl:stylesheet> --- NEW FILE: unauthorizedaction.xml --- <?xml version="1.0" encoding="utf-8"?> <rap> <username>brippe</username> <message><p>Sorry, you do not have appropriate permission to post messages to this forum.</p><p>Please contact your forum administrator for appropriate access.<br/>Thank you!</p></message> </rap> |
From: Brad R. <br...@us...> - 2005-02-04 00:36:05
|
Update of /cvsroot/rapforums/src/stylesheets/edu/fullcoll/uportal/channels/rap/forum In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13667 Modified Files: thread.xsl Log Message: no message Index: thread.xsl =================================================================== RCS file: /cvsroot/rapforums/src/stylesheets/edu/fullcoll/uportal/channels/rap/forum/thread.xsl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** thread.xsl 26 Jan 2004 19:04:03 -0000 1.4 --- thread.xsl 4 Feb 2005 00:35:54 -0000 1.5 *************** *** 9,12 **** --- 9,14 ---- <xsl:param name="nbsp"> </xsl:param> <xsl:param name="raquo">»</xsl:param> + + <xsl:param name="serverInfo"></xsl:param> <!-- contains the name of the server where thread2pdf.jsp resides --> <xsl:variable name="mediaPath" select="'media/edu/fullcoll/uportal/channels/rap'"/> *************** *** 153,156 **** --- 155,168 ---- </font> </td> + <td align="right"> + comments available: + <a> + <xsl:attribute name="class">uportal-text-small</xsl:attribute> + <xsl:attribute name="target">_blank</xsl:attribute> + <xsl:attribute name="alt">PDF</xsl:attribute> + <xsl:attribute name="href"><xsl:value-of select="$serverInfo"/>/thread2pdf.jsp?mode=pdf&forum=<xsl:value-of select="/rap/rapforum/forumid"/>&thread=<xsl:value-of select="/rap/rapforum/threadid"/>&lpg=<xsl:value-of select="$lastNumOnPg"/></xsl:attribute> + <img src="{$mediaPath}/pdf_logo.gif" width="16" height="16" border="0"/> PDF Format + </a> + </td> </tr> </table> |
From: Brad R. <br...@us...> - 2004-07-21 17:17:14
|
Update of /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5637 Added Files: ForumSessionData.java Log Message: no message --- NEW FILE: ForumSessionData.java --- /** * Copyright (C) 2003, Fullerton College. All Rights Reserved. (http://www.fullcoll.edu) * This software is distributed under the IBM Public Licence. Please see * the license infomation for more details at http://www.opensource.org/licenses/ibmpl.php. * EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED * ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER * EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS * OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * Each Recipient is solely responsible for determining the appropriateness of using * and distributing the Program and assumes all risks associated with its exercise * of rights under this Agreement, including but not limited to the risks and costs * of program errors, compliance with applicable laws, damage to or loss of data, * programs or equipment, and unavailability or interruption of operations. * This software is OSI Certified Open Source Software. OSI Certified is a certification mark of the Open Source Initiative */ package edu.fullcoll.uportal.channels.rap.forum; import java.sql.Timestamp; import java.util.HashMap; import org.jasig.portal.ChannelRuntimeData; import org.jasig.portal.ChannelStaticData; import org.jasig.portal.groups.IGroupMember; import org.jasig.portal.IServant; /** * This class handles each user's session information. * * @author Brad Rippe (br...@fu...), Chris Pereda (cp...@fu...) * @version 0.8.3 $Revision %G% */ public class ForumSessionData { public ChannelRuntimeData runtimeData; public ChannelStaticData staticData; public IGroupMember member; public IServant servantChannel; public Timestamp myvalidity; public Timestamp lastRenderedDoc; public long startRD; public String uid; public String view; public int mode = 42; // MAIN_MODE public boolean isAdminUser = false; public HashMap fromViews = new HashMap(10); public String unauthorizedMsg; } |
From: Brad R. <br...@us...> - 2004-07-21 17:16:27
|
Update of /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5496 Modified Files: CForum.java Log Message: no message Index: CForum.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/CForum.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CForum.java 26 Jan 2004 18:50:07 -0000 1.3 --- CForum.java 21 Jul 2004 17:16:16 -0000 1.4 *************** *** 32,37 **** --- 32,43 ---- import org.jasig.portal.groups.IGroupMember; import org.jasig.portal.services.GroupService; + import org.jasig.portal.services.AuthorizationService; import org.xml.sax.ContentHandler; import org.jasig.portal.services.LogService; + import org.jasig.portal.channels.permissionsmanager.CPermissionsManagerServantFactory; + import org.jasig.portal.channels.groupsmanager.CGroupsManagerServantFactory; + import org.jasig.portal.security.IAuthorizationPrincipal; + import org.jasig.portal.IPermissible; + import org.jasig.portal.IMultithreadedChannel; import edu.fullcoll.uportal.channels.rap.forum.database.RAPDBException; *************** *** 44,47 **** --- 50,61 ---- import edu.fullcoll.uportal.channels.rap.forum.commands.PostModeCommand; import edu.fullcoll.uportal.channels.rap.forum.commands.SearchModeCommand; + import edu.fullcoll.uportal.channels.rap.forum.database.RAPDB; + + import java.util.HashMap; + import java.util.Collection; + import java.util.Calendar; + import java.sql.Timestamp; + import org.jasig.portal.security.IPermission; + import edu.fullcoll.uportal.channels.rap.forum.commands.UnAuthorizedModeCommand; /** *************** *** 53,64 **** * @version 0.8.3 $Revision %G% */ ! public class CForum implements IChannel { public static String EVERYONE_KEY = "local.0"; public CForum() { ! mode = MAIN_MODE; // by default view is the main.xsl } /** Required methods by IChannel * */ --- 67,117 ---- * @version 0.8.3 $Revision %G% */ ! public class CForum implements IPermissible, IMultithreadedChannel { public static String EVERYONE_KEY = "local.0"; public CForum() { ! init(); } + private synchronized void init() { + if(tasks == null) { + tasks = new HashMap(); + try { + // This should resemble exact forum + tasks.put("Subscribe", "Subscribe to Forum"); + tasks.put("Post", "Post to Forum"); + tasks.put("Reply", "Reply to Forum"); + tasks.put("Delete", "Delete Forum"); + tasks.put("Create", "Create Forum"); + tasks.put("AssignPermissions", "Assign Permissions for this Forum"); + } catch(Exception e) { + LogService.instance().log(LogService.ERROR, e); + } + } + } + + private synchronized ForumSessionData getSessionData(String uid) { + if(sessions.get(uid) == null) { + ForumSessionData fsd = new ForumSessionData(); + fsd.uid = uid; + sessions.put(uid, fsd); + } + return (ForumSessionData)sessions.get(uid); + } + + private boolean hasValue(Object o) { + if(o != null && !o.toString().trim().equals("")) + return true; + return false; + } + + private boolean hasValue(Object o, String test) { + if(hasValue(o)) { + if(String.valueOf(o).equals(test)) + return true; + } + return false; + } /** Required methods by IChannel * */ *************** *** 67,71 **** * @return handle to runtime properties */ ! public ChannelRuntimeProperties getRuntimeProperties() { return new ChannelRuntimeProperties(); } --- 120,124 ---- * @return handle to runtime properties */ ! public ChannelRuntimeProperties getRuntimeProperties(String uid) { return new ChannelRuntimeProperties(); } *************** *** 79,86 **** * @param PortalEvent ev a portal layout event */ ! public void receiveEvent(PortalEvent ev) { switch (ev.getEventNumber()) { case PortalEvent.ABOUT_BUTTON_EVENT: ! mode = ABOUT_MODE; default: LogService.instance().log(LogService.WARN, "Unknown event: " + ev.getEventName()); --- 132,140 ---- * @param PortalEvent ev a portal layout event */ ! public void receiveEvent(PortalEvent ev, String uid) { ! ForumSessionData session = getSessionData(uid); switch (ev.getEventNumber()) { case PortalEvent.ABOUT_BUTTON_EVENT: ! session.mode = ABOUT_MODE; default: LogService.instance().log(LogService.WARN, "Unknown event: " + ev.getEventName()); *************** *** 92,101 **** * @param ChannelStaticData sd static channel data */ ! public void setStaticData(ChannelStaticData sd) { ! this.staticData = sd; // Configuration for multiple DBs // defaults to a single database called "PortalDb" // MultiDB supports DS for "uPortal" and another DS for "uPortal_Channels" ! String multiDB = staticData.getParameter("multiDB"); if(multiDB != null && multiDB.equals("true")) RAPDBConfig.getInstance().setMultiDS(true); --- 146,156 ---- * @param ChannelStaticData sd static channel data */ ! public void setStaticData(ChannelStaticData sd, String uid) { ! ForumSessionData session = getSessionData(uid); ! session.staticData = sd; // Configuration for multiple DBs // defaults to a single database called "PortalDb" // MultiDB supports DS for "uPortal" and another DS for "uPortal_Channels" ! String multiDB = session.staticData.getParameter("multiDB"); if(multiDB != null && multiDB.equals("true")) RAPDBConfig.getInstance().setMultiDS(true); *************** *** 105,113 **** // ORACLE - // MYSQL - ! String databaseProduct = staticData.getParameter("dbProduct"); if(databaseProduct != null) { RAPDBConfig.getInstance().setDatabaseProduct(databaseProduct.toUpperCase()); } else { RAPDBConfig.getInstance().setDatabaseProduct("MSSQL"); } } --- 160,179 ---- // ORACLE - // MYSQL - ! String databaseProduct = session.staticData.getParameter("dbProduct"); if(databaseProduct != null) { RAPDBConfig.getInstance().setDatabaseProduct(databaseProduct.toUpperCase()); } else { RAPDBConfig.getInstance().setDatabaseProduct("MSSQL"); + } + + try { + IEntityGroup admin = GroupService.getDistinguishedGroup(GroupService.PORTAL_ADMINISTRATORS); + IGroupMember me = AuthorizationService.instance().getGroupMember(sd.getAuthorizationPrincipal()); + session.member = me; + if(admin.deepContains(me)) { + session.isAdminUser = true; + } + } catch (Exception e) { + LogService.instance().log(LogService.ERROR, e); } } *************** *** 117,145 **** * @param ChannelRuntimeData rd handle to channel runtime data */ ! public void setRuntimeData(ChannelRuntimeData rd) { ! this.runtimeData = rd; - if (runtimeData.getParameter("mode") != null) { - String modeStr = (String)runtimeData.getParameter("mode"); if (modeStr.equals("forum")) { ! this.mode = FORUM_MODE; } else if (modeStr.equals("about")) { ! this.mode = ABOUT_MODE; } else if (modeStr.equals("search")) { ! this.mode = SEARCH_MODE; ! } else if (modeStr.equals("thread")) { ! this.mode = THREAD_MODE; } else if (modeStr.equals("post")) { ! this.mode = POST_MODE; } else if (modeStr.equals("admin")) { ! this.mode = ADMIN_MODE; } else if (modeStr.equals("back")) { ! this.mode = mode; ! } else { ! this.mode = MAIN_MODE; ! } ! } else { ! this.mode = MAIN_MODE; ! } } --- 183,343 ---- * @param ChannelRuntimeData rd handle to channel runtime data */ ! public void setRuntimeData(ChannelRuntimeData rd, String uid) { ! ForumSessionData session = getSessionData(uid); ! session.runtimeData = rd; ! ! Timestamp now = new Timestamp(Calendar.getInstance().getTime().getTime()); ! ! /** Previous RuntimeData **/ ! //if (session.runtimeData.getParameter("mode") != null) { ! String modeStr = ""; ! if (session.runtimeData.getParameter("mode") != null) ! modeStr = (String)session.runtimeData.getParameter("mode"); ! else if(session.runtimeData.getParameter("view") != null) ! modeStr = session.runtimeData.getParameter("view"); ! ! // This is a hack -- fix ! session.view = modeStr; ! //rd.setParameter("view", modeStr); ! ! //System.out.println("modeStr "+modeStr); ! if(session.runtimeData.getParameter("grpCommand") != null ! && session.runtimeData.getParameter("grpCommand").equals("Cancel")) { ! modeStr = "admin"; ! session.runtimeData.setParameter("type", "prePerm"); ! } ! ! if(modeStr.equals("AssignPermissions") ! && session.servantChannel == null) { ! session.myvalidity = now; ! try { ! String[] targets = new String[1]; ! targets[0] = rd.getParameter("forumid"); ! session.servantChannel = CPermissionsManagerServantFactory.getPermissionsServant(this, session.staticData, null, null, targets); ! } catch (Exception e) { ! LogService.instance().log(LogService.ERROR, "RapForums.setRuntimeData(): Problem instantiating servant"+e); ! } ! } ! ! if(modeStr.equals("AssignGroup") ! && session.servantChannel == null) { ! session.myvalidity = now; ! if(hasValue(rd.getParameter("subscriberGroup"))) { ! try { ! session.servantChannel = CGroupsManagerServantFactory.getGroupsServantforAddRemove(session.staticData, rd.getParameter("subscriberGroup")); ! } catch (Exception e) { ! LogService.instance().log(LogService.ERROR, "RapForums.setRuntimeData(): Problem instantiating servant"+e); ! } ! } ! ! } ! ! if(session.servantChannel != null) { ! ! if(rd.isRenderingAsRoot()) { ! try { ! ((IChannel)session.servantChannel).setRuntimeData(rd); ! ! if((session.servantChannel).isFinished()) { ! session.servantChannel = null; ! // setup to go back to the original permissions screen ! modeStr = "admin"; ! session.runtimeData.setParameter("mode", "admin"); ! session.runtimeData.setParameter("type", "prePerm"); ! } ! } catch (Exception e) { ! LogService.instance().log(LogService.ERROR,"RapForums.setRuntimeData(): Problem setting runtime data"+e); ! } ! } else { ! //System.out.println("setting servant to null"); ! session.servantChannel = null; ! rd.setParameter("mode", "forum"); ! } ! session.myvalidity = now; ! } ! ! /*if(!hasValue(rd.getParameter("command"))) { ! rd.remove("command"); ! } else { ! session.myvalidity = now; ! }*/ ! ! if (!hasValue(rd.getParameter("view"))) { ! if (hasValue(session.staticData.get("view"))) { ! ! if (hasValue(session.staticData.get("view"), "AssignGroups") || ! hasValue(session.staticData.get("view"), "AssignPermissions")) { ! rd.setParameter("view", (String)session.fromViews.get(session.staticData.getParameter("view"))); ! } else { ! // get the view from the servant, either the groups manager or the permissions manager ! if(rd.isRenderingAsRoot()){ ! rd.setParameter("view", session.staticData.getParameter("view")); ! } else { ! rd.setParameter("view", "forum"); // this can probably be removed... ! if (!rd.getParameter("view").equals(session.staticData.get("view"))) { ! session.myvalidity = now; ! } ! } ! } ! ! } else { ! rd.setParameter("view", "forum"); ! } ! } else if (!rd.getParameter("view").equals(session.staticData.get("view"))) { ! session.myvalidity = now; ! } ! ! // this is really the forum id, but let's get it working first ! /*if(!hasValue(rd.getParameter("topicID"))) { ! if(hasValue(rd.getParameter("topicID")) && !hasValue(rd.get("view"))) { ! rd.setParameter("topicID", session.staticData.getParameter("topicID")); ! } else { ! rd.remove("topicID"); ! session.staticData.remove("topicID"); ! } ! }*/ ! ! if (hasValue(rd.getParameter("fromView"))) { ! session.fromViews.put(rd.getParameter("view"), rd.getParameter("fromView")); ! //staticData.setParameter("fromView", runtimeData.getParameter("fromView")); ! } ! if (hasValue(rd.getParameter("view"))) { ! session.staticData.setParameter("view", rd.getParameter("view")); ! } ! if (hasValue(rd.getParameter("topicID"))) { ! session.staticData.setParameter("topicID", rd.getParameter("topicID")); ! } ! ! if(session.servantChannel == null) { ! if(session.myvalidity == null || (session.lastRenderedDoc).after(session.myvalidity)) { ! session.myvalidity = session.lastRenderedDoc; ! } ! } if (modeStr.equals("forum")) { ! session.mode = FORUM_MODE; } else if (modeStr.equals("about")) { ! session.mode = ABOUT_MODE; } else if (modeStr.equals("search")) { ! session.mode = SEARCH_MODE; ! } else if (modeStr.equals("thread")) { ! session.mode = THREAD_MODE; } else if (modeStr.equals("post")) { ! session.mode = POST_MODE; } else if (modeStr.equals("admin")) { ! session.mode = ADMIN_MODE; ! } else if (modeStr.equals("AssignPermissions")) { ! session.mode = PERMISSIONS_MODE; ! } else if (modeStr.equals("AssignGroups")) { ! session.mode = GROUPS_MODE; } else if (modeStr.equals("back")) { ! //session.mode = modeStr; ! } else { ! session.mode = MAIN_MODE; ! } ! //System.out.println("mode "+session.mode); ! //} else { ! // session.mode = MAIN_MODE; ! //} } *************** *** 148,207 **** * @param out a sax document handler */ ! public void renderXML(ContentHandler out) throws PortalException { ! switch (mode) { ! case MAIN_MODE: { ! MainModeCommand command = new MainModeCommand(); ! command.execute(this, out); ! break; ! } ! case FORUM_MODE: { ! ForumModeCommand command = new ForumModeCommand(); ! command.execute(this, out); ! break; ! } ! case THREAD_MODE: { ! ThreadModeCommand command = new ThreadModeCommand(); ! command.execute(this, out); ! break; ! } ! case POST_MODE: { ! PostModeCommand command = new PostModeCommand(); ! command.execute(this, out); ! break; ! } ! case SEARCH_MODE: { ! SearchModeCommand command = new SearchModeCommand(); ! command.execute(this, out); ! break; ! } ! case ADMIN_MODE: { ! AdminModeCommand command = new AdminModeCommand(); ! command.execute(this, out); ! break; ! } ! case ABOUT_MODE: ! AboutModeCommand aboutCommand = new AboutModeCommand(); ! aboutCommand.execute(this, out); ! break; ! default://TODO ERROR ! throw new PortalException("Default case hit in renderXML()"); ! } ! } ! /** ! * Returns the ChannelRuntimeData ! * @return ChannelRuntimeData ! */ ! public ChannelRuntimeData getRuntimeData() { ! return runtimeData; ! } ! /** ! * Returns the ChannelStaticData ! * @return ChannelStaticData ! */ ! public ChannelStaticData getStaticData() { ! return staticData; } --- 346,454 ---- * @param out a sax document handler */ ! public void renderXML(ContentHandler out, String uid) throws PortalException { ! long time1 = Calendar.getInstance().getTime().getTime(); ! try { ! ForumSessionData session = getSessionData(uid); ! //if using permissions manager or groups manager ! //display their view, instead of the forums ! if(session.servantChannel != null) { ! ((IChannel)session.servantChannel).renderXML(out); ! LogService.instance().log(LogService.DEBUG, "RapForums.renderXML(): defering to servant render"); ! } else { ! switch (session.mode) { ! case MAIN_MODE: { ! MainModeCommand command = new MainModeCommand(); ! command.execute(this, session, out); ! session.lastRenderedDoc = new Timestamp(Calendar.getInstance().getTime().getTime()); ! break; ! } ! case FORUM_MODE: { ! IAuthorizationPrincipal ap = session.staticData.getAuthorizationPrincipal(); ! IPermission[] perms = ap.getAllPermissions(getOwnerToken(), "Subscribe", (session.runtimeData).getParameter("forum") ); ! for(int i = 0; i < perms.length; i++) { ! if(perms[i].getType().equals("GRANT")) { ! ForumModeCommand command = new ForumModeCommand(); ! command.execute(this, session, out); ! session.lastRenderedDoc = new Timestamp(Calendar.getInstance().getTime().getTime()); ! break; ! } else { ! // Unauthorized access to post ! UnAuthorizedModeCommand command = new UnAuthorizedModeCommand(); ! session.unauthorizedMsg = "Sorry, you do not have appropriate permission to view messages in this forum.<br/><br/>"+ ! "Please contact your forum administrator for appropriate access.<br/><br/>Thank you!"; ! command.execute(this, session, out); ! break; ! } ! } ! } ! case THREAD_MODE: { ! IAuthorizationPrincipal ap = session.staticData.getAuthorizationPrincipal(); ! IPermission[] perms = ap.getAllPermissions(getOwnerToken(), "Post", (session.runtimeData).getParameter("forum") ); ! ! for(int i = 0; i < perms.length; i++) { ! if(perms[i].getType().equals("GRANT")) { ! ThreadModeCommand command = new ThreadModeCommand(); ! command.execute(this, session, out); ! session.lastRenderedDoc = new Timestamp(Calendar.getInstance().getTime().getTime()); ! break; ! } else { ! // Unauthorized access to post ! UnAuthorizedModeCommand command = new UnAuthorizedModeCommand(); ! session.unauthorizedMsg = "Sorry, you do not have appropriate permission to post messages to this forum.<br/><br/>"+ ! "Please contact your forum administrator for appropriate access.<br/><br/>Thank you!"; ! command.execute(this, session, out); ! break; ! } ! } ! } ! case POST_MODE: { ! //check authorization for user before displaying a particular view ! IAuthorizationPrincipal ap = session.staticData.getAuthorizationPrincipal(); ! IPermission[] perms = ap.getAllPermissions(getOwnerToken(), "Post", (session.runtimeData).getParameter("forum") ); ! ! for(int i = 0; i < perms.length; i++) { ! if(perms[i].getType().equals("GRANT")) { ! PostModeCommand command = new PostModeCommand(); ! command.execute(this, session, out); ! session.lastRenderedDoc = new Timestamp(Calendar.getInstance().getTime().getTime()); ! break; ! } else { ! // Unauthorized access to post ! UnAuthorizedModeCommand command = new UnAuthorizedModeCommand(); ! session.unauthorizedMsg = "Sorry, you do not have appropriate permission to post messages to this forum.<br/><br/>"+ ! "Please contact your forum administrator for appropriate access.<br/><br/>Thank you!"; ! command.execute(this, session, out); ! break; ! } ! } ! break; ! } ! case SEARCH_MODE: { ! SearchModeCommand command = new SearchModeCommand(); ! command.execute(this, session, out); ! session.lastRenderedDoc = new Timestamp(Calendar.getInstance().getTime().getTime()); ! break; ! } ! case ADMIN_MODE: { ! AdminModeCommand command = new AdminModeCommand(); ! command.execute(this, session, out); ! break; ! } ! case ABOUT_MODE: { ! AboutModeCommand aboutCommand = new AboutModeCommand(); ! aboutCommand.execute(this, session, out); ! session.lastRenderedDoc = new Timestamp(Calendar.getInstance().getTime().getTime()); ! break; ! } ! default: ! throw new PortalException("RapForums view error: default case hit in renderXML()"); ! } ! } ! } catch (Exception e) { ! LogService.instance().log(LogService.ERROR, e); ! } } *************** *** 337,340 **** --- 584,634 ---- } + // IPermissible Interface + /** + * + */ + public String getOwnerName() { + return "Rap Forums Channel (Fullerton College)"; + } + + public String[] getActivityTokens() { + return (String[])tasks.keySet().toArray(new String[0]); + } + + public String getOwnerToken() { + return "edu.fullcoll.uportal.channels.rap.forum.CForum"; + } + + public String getActivityName(String token) { + return (String) tasks.get(token); + } + + public String[] getTargetTokens() { + try { + RAPDB db = new RAPDB(); + Collection forumids = db.getForumIDs(); + Object[] objIDs = forumids.toArray(); + String[] strIDs = new String[objIDs.length]; + for(int i = 0; i < strIDs.length; i++) + strIDs[i] = objIDs[i].toString(); + return strIDs; + } catch(RAPDBException e) { + LogService.instance().log(LogService.ERROR, e); + e.printStackTrace(); + } + return new String[0]; + } + + public String getTargetName(String token) { + try { + RAPDB db = new RAPDB(); + return db.getForumName(Integer.parseInt(token)); + } catch(RAPDBException e) { + LogService.instance().log(LogService.ERROR, e); + e.printStackTrace(); + } + return ""; + } + private static final int MAIN_MODE = 42; private static final int FORUM_MODE = 43; *************** *** 343,351 **** private static final int POST_MODE = 46; private static final int ADMIN_MODE = 47; ! private static final int ABOUT_MODE = 31337; ! private int mode; // determines whether we return in normal or about mode ! private ChannelStaticData staticData; ! private ChannelRuntimeData runtimeData; private IEntityGroup adminGroup; //the uportal admin group, able to add rap forum admins --- 637,648 ---- private static final int POST_MODE = 46; private static final int ADMIN_MODE = 47; ! private static final int PERMISSIONS_MODE = 48; ! private static final int GROUPS_MODE = 49; ! private static final int ABOUT_MODE = 31337; ! // TODO: REMOVE IN ForumSessionData ! //private int mode; // determines whether we return in normal or about mode ! //private ChannelStaticData staticData; ! //private ChannelRuntimeData runtimeData; private IEntityGroup adminGroup; //the uportal admin group, able to add rap forum admins *************** *** 353,356 **** --- 650,657 ---- private IEntityGroup forumManagerGroup; //the rap forum group a step down from admins + // permissions + private static HashMap tasks = null; + protected static HashMap sessions = new HashMap(); + } |
From: Brad R. <br...@us...> - 2004-07-21 17:15:54
|
Update of /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5378 Added Files: UnAuthorizedModeCommand.java Log Message: no message --- NEW FILE: UnAuthorizedModeCommand.java --- /** * Copyright (c) 2004, Fullerton College. All Rights Reserved. * (http://www.fullcoll.edu) * * This software is distributed under the IBM Public Licence. Please see * the license infomation for more details at http://www.opensource.org/licenses/ibmpl.php. * * EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED * ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER * EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS * OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * Each Recipient is solely responsible for determining the appropriateness of using * and distributing the Program and assumes all risks associated with its exercise * of rights under this Agreement, including but not limited to the risks and costs * of program errors, compliance with applicable laws, damage to or loss of data, * programs or equipment, and unavailability or interruption of operations. * * This software is OSI Certified Open Source Software. * OSI Certified is a certification mark of the Open Source Initiative * */ package edu.fullcoll.uportal.channels.rap.forum.commands; import org.jasig.portal.utils.XSLT; import org.jasig.portal.PortalException; import edu.fullcoll.uportal.channels.rap.forum.ForumSessionData; import edu.fullcoll.uportal.channels.rap.forum.CForum; import org.xml.sax.ContentHandler; /** * This class provides the display when any non-authorized action is attempted by the user. * * @author Brad Rippe (br...@fu...) * @version 0.9 $Revision */ public class UnAuthorizedModeCommand implements IForumCommand { /** * This method provides the rendering functionality for the unauthorized access display. * * @param forum - the main IChannel used to direct user requests * @param out - the output object for sending user responses */ public void execute(CForum forum, ForumSessionData session, ContentHandler out) throws PortalException { StringBuffer xml = new StringBuffer("<?xml version=\"1.0\" encoding=\"utf-8\"?><rap>"); xml.append("<name>"); xml.append((session.staticData).getPerson().getAttribute("displayName")); xml.append("</name><message>"); xml.append(session.unauthorizedMsg); xml.append("</message></rap>"); String stylesheet = "unauthorizedaction"; // Transform xml XSLT xslt = new XSLT(forum); xslt.setXML(xml.toString()); xslt.setXSL("CForum.ssl", stylesheet, (session.runtimeData).getBrowserInfo()); xslt.setStylesheetParameter("baseActionURL", (session.runtimeData).getBaseActionURL()); xslt.setTarget(out); xslt.transform(); } } |
From: Brad R. <br...@us...> - 2004-07-21 17:15:14
|
Update of /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5117 Modified Files: ForumModeCommand.java IForumCommand.java MainModeCommand.java PostModeCommand.java SearchModeCommand.java ThreadModeCommand.java Log Message: no message Index: MainModeCommand.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands/MainModeCommand.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MainModeCommand.java 26 Jan 2004 18:49:27 -0000 1.3 --- MainModeCommand.java 21 Jul 2004 17:15:04 -0000 1.4 *************** *** 28,36 **** import org.jasig.portal.PortalException; import org.jasig.portal.services.LogService; - import edu.fullcoll.uportal.channels.rap.forum.CForum; import edu.fullcoll.uportal.channels.rap.forum.database.RAPDB; import edu.fullcoll.uportal.channels.rap.forum.xml.ViewXMLFactory; import edu.fullcoll.uportal.channels.rap.forum.xml.RAPViewXML; import org.jdom.Document; --- 28,37 ---- import org.jasig.portal.PortalException; import org.jasig.portal.services.LogService; + import edu.fullcoll.uportal.channels.rap.forum.CForum; import edu.fullcoll.uportal.channels.rap.forum.database.RAPDB; import edu.fullcoll.uportal.channels.rap.forum.xml.ViewXMLFactory; import edu.fullcoll.uportal.channels.rap.forum.xml.RAPViewXML; + import edu.fullcoll.uportal.channels.rap.forum.ForumSessionData; import org.jdom.Document; *************** *** 55,59 **** * @param out - the output object for sending user responses */ ! public void execute(CForum forum, ContentHandler out) throws PortalException { final int INITITAL_BUFFER_SIZE = 5000; String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; --- 56,60 ---- * @param out - the output object for sending user responses */ ! public void execute(CForum forum, ForumSessionData session, ContentHandler out) throws PortalException { final int INITITAL_BUFFER_SIZE = 5000; String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; *************** *** 64,68 **** int lpg = 0; try { ! lpg = Integer.parseInt(forum.getRuntimeData().getParameter("lpg")); } catch (Exception e) { --- 65,69 ---- int lpg = 0; try { ! lpg = Integer.parseInt((session.runtimeData).getParameter("lpg")); } catch (Exception e) { *************** *** 70,79 **** } - StringWriter writer = new StringWriter(INITITAL_BUFFER_SIZE); try { ! String username = (String) forum.getStaticData().getPerson().getAttribute("displayName"); if(username == null) ! username = (String) forum.getStaticData().getPerson().getAttribute(forum.getStaticData().getPerson().USERNAME); writer.write("<username>" + username + "</username>"); --- 71,79 ---- } StringWriter writer = new StringWriter(INITITAL_BUFFER_SIZE); try { ! String username = (String) (session.staticData).getPerson().getAttribute("displayName"); if(username == null) ! username = (String) (session.staticData).getPerson().getAttribute((session.staticData).getPerson().USERNAME); writer.write("<username>" + username + "</username>"); *************** *** 105,110 **** XSLT xslt = new XSLT(forum); xslt.setXML(xml); ! xslt.setXSL("CForum.ssl", stylesheet, forum.getRuntimeData().getBrowserInfo()); ! xslt.setStylesheetParameter("baseActionURL", forum.getRuntimeData().getBaseActionURL()); xslt.setTarget(out); xslt.transform(); --- 105,110 ---- XSLT xslt = new XSLT(forum); xslt.setXML(xml); ! xslt.setXSL("CForum.ssl", stylesheet, (session.runtimeData).getBrowserInfo()); ! xslt.setStylesheetParameter("baseActionURL", (session.runtimeData).getBaseActionURL()); xslt.setTarget(out); xslt.transform(); Index: PostModeCommand.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands/PostModeCommand.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PostModeCommand.java 26 Jan 2004 18:49:27 -0000 1.3 --- PostModeCommand.java 21 Jul 2004 17:15:04 -0000 1.4 *************** *** 23,27 **** package edu.fullcoll.uportal.channels.rap.forum.commands; - import org.jasig.portal.ChannelRuntimeData; import org.jasig.portal.utils.XSLT; import org.xml.sax.ContentHandler; --- 23,26 ---- *************** *** 30,41 **** import edu.fullcoll.uportal.channels.rap.forum.CForum; - import edu.fullcoll.uportal.channels.rap.forum.IForum; import edu.fullcoll.uportal.channels.rap.forum.IForumComment; import edu.fullcoll.uportal.channels.rap.forum.RAPForum; import edu.fullcoll.uportal.channels.rap.forum.filter.IFilterManager; import edu.fullcoll.uportal.channels.rap.forum.filter.RAPFilterManager; - import edu.fullcoll.uportal.channels.rap.forum.database.RAPDB; import edu.fullcoll.uportal.channels.rap.forum.xml.ViewXMLFactory; import edu.fullcoll.uportal.channels.rap.forum.xml.RAPViewXML; import org.jdom.Document; --- 29,39 ---- import edu.fullcoll.uportal.channels.rap.forum.CForum; import edu.fullcoll.uportal.channels.rap.forum.IForumComment; import edu.fullcoll.uportal.channels.rap.forum.RAPForum; import edu.fullcoll.uportal.channels.rap.forum.filter.IFilterManager; import edu.fullcoll.uportal.channels.rap.forum.filter.RAPFilterManager; import edu.fullcoll.uportal.channels.rap.forum.xml.ViewXMLFactory; import edu.fullcoll.uportal.channels.rap.forum.xml.RAPViewXML; + import edu.fullcoll.uportal.channels.rap.forum.ForumSessionData; import org.jdom.Document; *************** *** 60,64 **** * @param out - the output object for sending user responses */ ! public void execute(CForum forum, ContentHandler out) throws PortalException { final int INITITAL_BUFFER_SIZE = 5000; String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; --- 58,62 ---- * @param out - the output object for sending user responses */ ! public void execute(CForum forum, ForumSessionData session, ContentHandler out) throws PortalException { final int INITITAL_BUFFER_SIZE = 5000; String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; *************** *** 68,75 **** StringWriter writer = new StringWriter(INITITAL_BUFFER_SIZE); try { ! postType = forum.getRuntimeData().getParameter("postType"); } catch (Exception e) { //todo write out something to the page ! e.printStackTrace(); LogService.instance().log(LogService.ERROR, e); } --- 66,73 ---- StringWriter writer = new StringWriter(INITITAL_BUFFER_SIZE); try { ! postType = (session.runtimeData).getParameter("postType"); } catch (Exception e) { //todo write out something to the page ! //e.printStackTrace(); LogService.instance().log(LogService.ERROR, e); } *************** *** 84,95 **** if (postType.equals("post")) { ! int forumID = Integer.parseInt(forum.getRuntimeData().getParameter("forum")); Document doc = rapViewXML.getPostXML(forumID); Element rootElement = doc.getRootElement(); Element nameElement = new Element("username"); ! nameElement.setText(forum.getStaticData().getPerson().getAttribute("displayName") + ""); rootElement.addContent(nameElement); Element userIDElement = new Element("userid"); ! userIDElement.setText(forum.getStaticData().getPerson().getAttribute("username") + ""); rootElement.addContent(userIDElement); Element postTypeElement = new Element("posttype"); --- 82,93 ---- if (postType.equals("post")) { ! int forumID = Integer.parseInt((session.runtimeData).getParameter("forum")); Document doc = rapViewXML.getPostXML(forumID); Element rootElement = doc.getRootElement(); Element nameElement = new Element("username"); ! nameElement.setText((session.staticData).getPerson().getAttribute("displayName") + ""); rootElement.addContent(nameElement); Element userIDElement = new Element("userid"); ! userIDElement.setText((session.staticData).getPerson().getAttribute("username") + ""); rootElement.addContent(userIDElement); Element postTypeElement = new Element("posttype"); *************** *** 101,108 **** } else if (postType.equals("doPost")) { ! int forumID = Integer.parseInt(forum.getRuntimeData().getParameter("forum")); ! String subject = forum.getRuntimeData().getParameter("subject"); ! String body = forum.getRuntimeData().getParameter("body"); ! String userID = forum.getRuntimeData().getParameter("userid"); //not currently used int modValue = 0; --- 99,106 ---- } else if (postType.equals("doPost")) { ! int forumID = Integer.parseInt((session.runtimeData).getParameter("forum")); ! String subject = (session.runtimeData).getParameter("subject"); ! String body = (session.runtimeData).getParameter("body"); ! String userID = (session.runtimeData).getParameter("userid"); //not currently used int modValue = 0; *************** *** 118,125 **** Element rootElement = doc.getRootElement(); Element nameElement = new Element("username"); ! nameElement.setText(forum.getStaticData().getPerson().getAttribute("displayName") + ""); rootElement.addContent(nameElement); Element userIDElement = new Element("userid"); ! userIDElement.setText(forum.getStaticData().getPerson().getAttribute("username") + ""); rootElement.addContent(userIDElement); Element postTypeElement = new Element("posttype"); --- 116,123 ---- Element rootElement = doc.getRootElement(); Element nameElement = new Element("username"); ! nameElement.setText((session.staticData).getPerson().getAttribute("displayName") + ""); rootElement.addContent(nameElement); Element userIDElement = new Element("userid"); ! userIDElement.setText((session.staticData).getPerson().getAttribute("username") + ""); rootElement.addContent(userIDElement); Element postTypeElement = new Element("posttype"); *************** *** 137,157 **** } else if (postType.equals("reply")) { ! int forumID = Integer.parseInt(forum.getRuntimeData().getParameter("forum")); Document doc = rapViewXML.getPostXML(forumID); Element rootElement = doc.getRootElement(); Element nameElement = new Element("username"); ! nameElement.setText(forum.getStaticData().getPerson().getAttribute("displayName") + ""); rootElement.addContent(nameElement); Element userIDElement = new Element("userid"); ! userIDElement.setText(forum.getStaticData().getPerson().getAttribute("username") + ""); rootElement.addContent(userIDElement); Element postTypeElement = new Element("posttype"); postTypeElement.setText("reply"); rootElement.addContent(postTypeElement); ! int threadID = Integer.parseInt(forum.getRuntimeData().getParameter("thread")); Element threadIDElement = new Element("threadid"); threadIDElement.setText(threadID + ""); rootElement.addContent(threadIDElement); ! int parentCommentID = Integer.parseInt(forum.getRuntimeData().getParameter("parentcomment")); Element parentIDElement = new Element("parentcommentid"); parentIDElement.setText(parentCommentID + ""); --- 135,155 ---- } else if (postType.equals("reply")) { ! int forumID = Integer.parseInt((session.runtimeData).getParameter("forum")); Document doc = rapViewXML.getPostXML(forumID); Element rootElement = doc.getRootElement(); Element nameElement = new Element("username"); ! nameElement.setText((session.staticData).getPerson().getAttribute("displayName") + ""); rootElement.addContent(nameElement); Element userIDElement = new Element("userid"); ! userIDElement.setText((session.staticData).getPerson().getAttribute("username") + ""); rootElement.addContent(userIDElement); Element postTypeElement = new Element("posttype"); postTypeElement.setText("reply"); rootElement.addContent(postTypeElement); ! int threadID = Integer.parseInt((session.runtimeData).getParameter("thread")); Element threadIDElement = new Element("threadid"); threadIDElement.setText(threadID + ""); rootElement.addContent(threadIDElement); ! int parentCommentID = Integer.parseInt((session.runtimeData).getParameter("parentcomment")); Element parentIDElement = new Element("parentcommentid"); parentIDElement.setText(parentCommentID + ""); *************** *** 184,193 **** } else if (postType.equals("doReply")) { ! int forumID = Integer.parseInt(forum.getRuntimeData().getParameter("forum")); ! String subject = forum.getRuntimeData().getParameter("subject"); ! String body = forum.getRuntimeData().getParameter("body"); ! String userID = forum.getRuntimeData().getParameter("userid"); ! int threadID = Integer.parseInt(forum.getRuntimeData().getParameter("thread")); ! int parentCommentID = Integer.parseInt(forum.getRuntimeData().getParameter("parentcomment")); //not currently used int modValue = 0; --- 182,191 ---- } else if (postType.equals("doReply")) { ! int forumID = Integer.parseInt((session.runtimeData).getParameter("forum")); ! String subject = (session.runtimeData).getParameter("subject"); ! String body = (session.runtimeData).getParameter("body"); ! String userID = (session.runtimeData).getParameter("userid"); ! int threadID = Integer.parseInt((session.runtimeData).getParameter("thread")); ! int parentCommentID = Integer.parseInt((session.runtimeData).getParameter("parentcomment")); //not currently used int modValue = 0; *************** *** 204,211 **** Element rootElement = doc.getRootElement(); Element nameElement = new Element("username"); ! nameElement.setText(forum.getStaticData().getPerson().getAttribute("displayName") + ""); rootElement.addContent(nameElement); Element userIDElement = new Element("userid"); ! userIDElement.setText(forum.getStaticData().getPerson().getAttribute("username") + ""); rootElement.addContent(userIDElement); Element postTypeElement = new Element("posttype"); --- 202,209 ---- Element rootElement = doc.getRootElement(); Element nameElement = new Element("username"); ! nameElement.setText((session.staticData).getPerson().getAttribute("displayName") + ""); rootElement.addContent(nameElement); Element userIDElement = new Element("userid"); ! userIDElement.setText((session.staticData).getPerson().getAttribute("username") + ""); rootElement.addContent(userIDElement); Element postTypeElement = new Element("posttype"); *************** *** 233,238 **** XSLT xslt = new XSLT(forum); xslt.setXML(xml); ! xslt.setXSL("CForum.ssl", stylesheet, forum.getRuntimeData().getBrowserInfo()); ! xslt.setStylesheetParameter("baseActionURL", forum.getRuntimeData().getBaseActionURL()); xslt.setTarget(out); xslt.transform(); --- 231,236 ---- XSLT xslt = new XSLT(forum); xslt.setXML(xml); ! xslt.setXSL("CForum.ssl", stylesheet, (session.runtimeData).getBrowserInfo()); ! xslt.setStylesheetParameter("baseActionURL", (session.runtimeData).getBaseActionURL()); xslt.setTarget(out); xslt.transform(); Index: ThreadModeCommand.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands/ThreadModeCommand.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ThreadModeCommand.java 26 Jan 2004 18:49:27 -0000 1.3 --- ThreadModeCommand.java 21 Jul 2004 17:15:04 -0000 1.4 *************** *** 28,31 **** --- 28,32 ---- import org.jasig.portal.PortalException; import org.jasig.portal.services.LogService; + import edu.fullcoll.uportal.channels.rap.forum.CForum; import edu.fullcoll.uportal.channels.rap.forum.filter.IFilterManager; *************** *** 34,43 **** --- 35,48 ---- import edu.fullcoll.uportal.channels.rap.forum.xml.ViewXMLFactory; import edu.fullcoll.uportal.channels.rap.forum.xml.RAPViewXML; + import edu.fullcoll.uportal.channels.rap.forum.ForumSessionData; + import org.jdom.Document; import org.jdom.Element; import org.jdom.output.XMLOutputter; + import java.io.StringWriter; import java.util.Iterator; + /** * This class provides the rendering method for threads in rap forum. *************** *** 56,60 **** * @param out - the output object for sending user responses */ ! public void execute(CForum forum, ContentHandler out) throws PortalException { final int INITITAL_BUFFER_SIZE = 5000; String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; --- 61,65 ---- * @param out - the output object for sending user responses */ ! public void execute(CForum forum, ForumSessionData session, ContentHandler out) throws PortalException { final int INITITAL_BUFFER_SIZE = 5000; String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; *************** *** 65,69 **** int lpg = 0; try { ! lpg = Integer.parseInt(forum.getRuntimeData().getParameter("lpg")); } catch (Exception e) { --- 70,74 ---- int lpg = 0; try { ! lpg = Integer.parseInt((session.runtimeData).getParameter("lpg")); } catch (Exception e) { *************** *** 81,86 **** // Paging is setup to display only 5 threads at a time' RAPViewXML rapViewXML = ViewXMLFactory.createRAPViewXML(); ! Document doc = rapViewXML.getCommentsXML(Integer.parseInt(forum.getRuntimeData().getParameter("forum")), ! Integer.parseInt(forum.getRuntimeData().getParameter("thread")), startRow, endRow); Element forumsRootElement = doc.getRootElement(); --- 86,91 ---- // Paging is setup to display only 5 threads at a time' RAPViewXML rapViewXML = ViewXMLFactory.createRAPViewXML(); ! Document doc = rapViewXML.getCommentsXML(Integer.parseInt((session.runtimeData).getParameter("forum")), ! Integer.parseInt((session.runtimeData).getParameter("thread")), startRow, endRow); Element forumsRootElement = doc.getRootElement(); *************** *** 108,112 **** Element nameElement = new Element("username"); ! nameElement.setText(forum.getStaticData().getPerson().getAttribute("displayName") + ""); forumsRootElement.addContent(nameElement); --- 113,117 ---- Element nameElement = new Element("username"); ! nameElement.setText((session.staticData).getPerson().getAttribute("displayName") + ""); forumsRootElement.addContent(nameElement); *************** *** 128,133 **** XSLT xslt = new XSLT(forum); xslt.setXML(xml); ! xslt.setXSL("CForum.ssl", stylesheet, forum.getRuntimeData().getBrowserInfo()); ! xslt.setStylesheetParameter("baseActionURL", forum.getRuntimeData().getBaseActionURL()); xslt.setTarget(out); xslt.transform(); --- 133,138 ---- XSLT xslt = new XSLT(forum); xslt.setXML(xml); ! xslt.setXSL("CForum.ssl", stylesheet, (session.runtimeData).getBrowserInfo()); ! xslt.setStylesheetParameter("baseActionURL", (session.runtimeData).getBaseActionURL()); xslt.setTarget(out); xslt.transform(); Index: IForumCommand.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands/IForumCommand.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IForumCommand.java 26 Jan 2004 18:49:27 -0000 1.3 --- IForumCommand.java 21 Jul 2004 17:15:04 -0000 1.4 *************** *** 29,32 **** --- 29,33 ---- import edu.fullcoll.uportal.channels.rap.forum.CForum; + import edu.fullcoll.uportal.channels.rap.forum.ForumSessionData; /** *************** *** 44,47 **** * @param out the output stream */ ! public void execute(CForum forum, ContentHandler out) throws PortalException; } --- 45,48 ---- * @param out the output stream */ ! public void execute(CForum forum, ForumSessionData session, ContentHandler out) throws PortalException; } Index: SearchModeCommand.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands/SearchModeCommand.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SearchModeCommand.java 26 Jan 2004 18:49:27 -0000 1.3 --- SearchModeCommand.java 21 Jul 2004 17:15:04 -0000 1.4 *************** *** 25,39 **** import org.jasig.portal.ChannelRuntimeData; import org.jasig.portal.utils.XSLT; - import org.xml.sax.ContentHandler; import org.jasig.portal.PortalException; import org.jasig.portal.services.LogService; - import edu.fullcoll.uportal.channels.rap.forum.CForum; import edu.fullcoll.uportal.channels.rap.forum.database.RAPDB; import edu.fullcoll.uportal.channels.rap.forum.xml.ViewXMLFactory; import edu.fullcoll.uportal.channels.rap.forum.xml.RAPViewXML; import org.jdom.Document; import org.jdom.Element; import org.jdom.output.XMLOutputter; import java.io.StringWriter; --- 25,43 ---- import org.jasig.portal.ChannelRuntimeData; import org.jasig.portal.utils.XSLT; import org.jasig.portal.PortalException; import org.jasig.portal.services.LogService; + import org.xml.sax.ContentHandler; + + import edu.fullcoll.uportal.channels.rap.forum.CForum; + import edu.fullcoll.uportal.channels.rap.forum.ForumSessionData; import edu.fullcoll.uportal.channels.rap.forum.database.RAPDB; import edu.fullcoll.uportal.channels.rap.forum.xml.ViewXMLFactory; import edu.fullcoll.uportal.channels.rap.forum.xml.RAPViewXML; + import org.jdom.Document; import org.jdom.Element; import org.jdom.output.XMLOutputter; + import java.io.StringWriter; *************** *** 59,63 **** * @param out - the output object for sending user responses */ ! public void execute(CForum forum, ContentHandler out) throws PortalException { final int INITITAL_BUFFER_SIZE = 5000; --- 63,67 ---- * @param out - the output object for sending user responses */ ! public void execute(CForum forum, ForumSessionData session, ContentHandler out) throws PortalException { final int INITITAL_BUFFER_SIZE = 5000; *************** *** 81,129 **** // get the runtime parameters // query string for search ! if (forum.getRuntimeData().getParameter("q") != null) { try { ! searchQry = forum.getRuntimeData().getParameter("q"); } catch (Exception e) { } } // user to search on ! if (forum.getRuntimeData().getParameter("user") != null) { try { ! searchUser = forum.getRuntimeData().getParameter("user"); } catch (Exception e) { } } ! if (forum.getRuntimeData().getParameter("range") != null) { try { ! range = Integer.parseInt(forum.getRuntimeData().getParameter("range")); } catch (Exception e) { } } ! if (forum.getRuntimeData().getParameter("category") != null) { try { ! searchCategory = forum.getRuntimeData().getParameter("category"); } catch (Exception e) { } } ! if (forum.getRuntimeData().getParameter("lf") != null) { try { ! lastForumID = Integer.parseInt(forum.getRuntimeData().getParameter("lf")); } catch (Exception e) { } } ! if (forum.getRuntimeData().getParameter("lt") != null) { try { ! lastThreadID = Integer.parseInt(forum.getRuntimeData().getParameter("lt")); } catch (Exception e) { } } ! if (forum.getRuntimeData().getParameter("lc") != null) { try { ! lastCommentID = Integer.parseInt(forum.getRuntimeData().getParameter("lc")); } catch (Exception e) { } } ! if (forum.getRuntimeData().getParameter("p") != null) { try { ! page = Integer.parseInt(forum.getRuntimeData().getParameter("p")); } catch (Exception e) { } } try { ! writer.write("<username>" + forum.getStaticData().getPerson().getAttribute("displayName") + "</username>"); // Get the xml from the query --- 85,133 ---- // get the runtime parameters // query string for search ! if ((session.runtimeData).getParameter("q") != null) { try { ! searchQry = (session.runtimeData).getParameter("q"); } catch (Exception e) { } } // user to search on ! if ((session.runtimeData).getParameter("user") != null) { try { ! searchUser = (session.runtimeData).getParameter("user"); } catch (Exception e) { } } ! if ((session.runtimeData).getParameter("range") != null) { try { ! range = Integer.parseInt((session.runtimeData).getParameter("range")); } catch (Exception e) { } } ! if ((session.runtimeData).getParameter("category") != null) { try { ! searchCategory = (session.runtimeData).getParameter("category"); } catch (Exception e) { } } ! if ((session.runtimeData).getParameter("lf") != null) { try { ! lastForumID = Integer.parseInt((session.runtimeData).getParameter("lf")); } catch (Exception e) { } } ! if ((session.runtimeData).getParameter("lt") != null) { try { ! lastThreadID = Integer.parseInt((session.runtimeData).getParameter("lt")); } catch (Exception e) { } } ! if ((session.runtimeData).getParameter("lc") != null) { try { ! lastCommentID = Integer.parseInt((session.runtimeData).getParameter("lc")); } catch (Exception e) { } } ! if ((session.runtimeData).getParameter("p") != null) { try { ! page = Integer.parseInt((session.runtimeData).getParameter("p")); } catch (Exception e) { } } try { ! writer.write("<username>" + (session.staticData).getPerson().getAttribute("displayName") + "</username>"); // Get the xml from the query *************** *** 159,164 **** // Transform xml xslt.setXML(xml); ! xslt.setXSL("CForum.ssl", stylesheet, forum.getRuntimeData().getBrowserInfo()); ! xslt.setStylesheetParameter("baseActionURL", forum.getRuntimeData().getBaseActionURL()); xslt.setTarget(out); xslt.transform(); --- 163,168 ---- // Transform xml xslt.setXML(xml); ! xslt.setXSL("CForum.ssl", stylesheet, (session.runtimeData).getBrowserInfo()); ! xslt.setStylesheetParameter("baseActionURL", (session.runtimeData).getBaseActionURL()); xslt.setTarget(out); xslt.transform(); Index: ForumModeCommand.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands/ForumModeCommand.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ForumModeCommand.java 26 Jan 2004 18:49:27 -0000 1.3 --- ForumModeCommand.java 21 Jul 2004 17:15:04 -0000 1.4 *************** *** 33,36 **** --- 33,37 ---- import edu.fullcoll.uportal.channels.rap.forum.xml.ViewXMLFactory; import edu.fullcoll.uportal.channels.rap.forum.xml.RAPViewXML; + import edu.fullcoll.uportal.channels.rap.forum.ForumSessionData; import org.jdom.Document; *************** *** 52,56 **** * @param out - the output object for sending user responses */ ! public void execute(CForum forum, ContentHandler out) throws PortalException { final int INITITAL_BUFFER_SIZE = 5000; String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; --- 53,57 ---- * @param out - the output object for sending user responses */ ! public void execute(CForum forum, ForumSessionData session, ContentHandler out) throws PortalException { final int INITITAL_BUFFER_SIZE = 5000; String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; *************** *** 61,65 **** int lpg = 0; try { ! lpg = Integer.parseInt(forum.getRuntimeData().getParameter("lpg")); } catch (Exception e) { --- 62,66 ---- int lpg = 0; try { ! lpg = Integer.parseInt((session.runtimeData).getParameter("lpg")); } catch (Exception e) { *************** *** 77,85 **** RAPViewXML rapViewXML = ViewXMLFactory.createRAPViewXML(); ! Document doc = rapViewXML.getThreadsXML(Integer.parseInt(forum.getRuntimeData().getParameter("forum")), startRow, endRow); Element forumsRootElement = doc.getRootElement(); Element nameElement = new Element("username"); ! nameElement.setText(forum.getStaticData().getPerson().getAttribute("displayName") + ""); forumsRootElement.addContent(nameElement); --- 78,86 ---- RAPViewXML rapViewXML = ViewXMLFactory.createRAPViewXML(); ! Document doc = rapViewXML.getThreadsXML(Integer.parseInt((session.runtimeData).getParameter("forum")), startRow, endRow); Element forumsRootElement = doc.getRootElement(); Element nameElement = new Element("username"); ! nameElement.setText((session.staticData).getPerson().getAttribute("displayName") + ""); forumsRootElement.addContent(nameElement); *************** *** 89,93 **** XMLOutputter outputter = new XMLOutputter(" ", true); ! outputter.output(forumsRootElement, writer); } catch (Exception e) { //todo write out something to the page --- 90,94 ---- XMLOutputter outputter = new XMLOutputter(" ", true); ! outputter.output(forumsRootElement, writer); } catch (Exception e) { //todo write out something to the page *************** *** 102,107 **** XSLT xslt = new XSLT(forum); xslt.setXML(xml); ! xslt.setXSL("CForum.ssl", stylesheet, forum.getRuntimeData().getBrowserInfo()); ! xslt.setStylesheetParameter("baseActionURL", forum.getRuntimeData().getBaseActionURL()); xslt.setTarget(out); xslt.transform(); --- 103,108 ---- XSLT xslt = new XSLT(forum); xslt.setXML(xml); ! xslt.setXSL("CForum.ssl", stylesheet, (session.runtimeData).getBrowserInfo()); ! xslt.setStylesheetParameter("baseActionURL", (session.runtimeData).getBaseActionURL()); xslt.setTarget(out); xslt.transform(); |
From: Brad R. <br...@us...> - 2004-07-21 17:14:54
|
Update of /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5009 Modified Files: AdminModeCommand.java Log Message: no message Index: AdminModeCommand.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands/AdminModeCommand.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AdminModeCommand.java 26 Jan 2004 18:49:27 -0000 1.3 --- AdminModeCommand.java 21 Jul 2004 17:14:45 -0000 1.4 *************** *** 23,32 **** package edu.fullcoll.uportal.channels.rap.forum.commands; - import org.jasig.portal.ChannelRuntimeData; import org.jasig.portal.utils.XSLT; import org.xml.sax.ContentHandler; import org.jasig.portal.PortalException; - import org.jasig.portal.groups.IEntityGroup; import org.jasig.portal.groups.IGroupMember; import org.jasig.portal.services.GroupService; import org.jasig.portal.services.LogService; --- 23,32 ---- package edu.fullcoll.uportal.channels.rap.forum.commands; import org.jasig.portal.utils.XSLT; import org.xml.sax.ContentHandler; import org.jasig.portal.PortalException; import org.jasig.portal.groups.IGroupMember; + import org.jasig.portal.security.IAuthorizationPrincipal; + import org.jasig.portal.security.IPermission; import org.jasig.portal.services.GroupService; import org.jasig.portal.services.LogService; *************** *** 40,50 **** import edu.fullcoll.uportal.channels.rap.forum.xml.RAPViewXML; import edu.fullcoll.uportal.channels.rap.forum.xml.ViewXMLFactory; - import org.jdom.Document; - import org.jdom.Element; import org.jdom.output.XMLOutputter; import java.io.StringWriter; ! import java.io.OutputStream; ! import edu.fullcoll.uportal.channels.rap.forum.database.RAPDBException; /** --- 40,49 ---- import edu.fullcoll.uportal.channels.rap.forum.xml.RAPViewXML; import edu.fullcoll.uportal.channels.rap.forum.xml.ViewXMLFactory; + import edu.fullcoll.uportal.channels.rap.forum.database.RAPDBException; + import edu.fullcoll.uportal.channels.rap.forum.ForumSessionData; import org.jdom.output.XMLOutputter; import java.io.StringWriter; ! /** *************** *** 62,66 **** * @param out - the output object for sending user responses */ ! public void execute(CForum forum, ContentHandler out) throws PortalException { final int INITITAL_BUFFER_SIZE = 5000; String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; --- 61,65 ---- * @param out - the output object for sending user responses */ ! public void execute(CForum forum, ForumSessionData session, ContentHandler out) throws PortalException { final int INITITAL_BUFFER_SIZE = 5000; String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; *************** *** 70,85 **** try { ! String username = (String) forum.getStaticData().getPerson().getAttribute("displayName"); if(username == null) ! username = (String) forum.getStaticData().getPerson().getAttribute(forum.getStaticData().getPerson().USERNAME); xml += "<rap>"; writer.write("<username>" + username + "</username>"); ! writer.write("<userid>" + forum.getStaticData().getPerson().getAttribute("username") + "</userid>"); ! String type = forum.getRuntimeData().getParameter("type"); //authenticate the user ! int id = forum.getStaticData().getPerson().getID(); ! IGroupMember myGroups = GroupService.getEntity((String) forum.getStaticData().getPerson().getAttribute(forum.getStaticData().getPerson().USERNAME), Class.forName("org.jasig.portal.security.IPerson")); --- 69,84 ---- try { ! String username = (String) (session.staticData).getPerson().getAttribute("displayName"); if(username == null) ! username = (String) (session.staticData).getPerson().getAttribute((session.staticData).getPerson().USERNAME); xml += "<rap>"; writer.write("<username>" + username + "</username>"); ! writer.write("<userid>" + (session.staticData).getPerson().getAttribute("username") + "</userid>"); ! String type = (session.runtimeData).getParameter("type"); //authenticate the user ! int id = (session.staticData).getPerson().getID(); ! IGroupMember myGroups = GroupService.getEntity((String) (session.staticData).getPerson().getAttribute((session.staticData).getPerson().USERNAME), Class.forName("org.jasig.portal.security.IPerson")); *************** *** 99,120 **** if (type.equals("createForum")) { if (isAdmin || isManager) { ! writer.write("<type>createForum</type>"); RAPViewXML viewXML = ViewXMLFactory.createRAPViewXML(); XMLOutputter outputter = new XMLOutputter(); ! outputter.output(viewXML.getCategoryXML().detachRootElement(), writer); } else { writer.write("<type>noAccess</type>"); } ! } else if (type.equals("doForum")) { if (isAdmin || isManager) { //create the forum ! String name = forum.getRuntimeData().getParameter("name"); ! String description = forum.getRuntimeData().getParameter("description"); ! validateInsert(forum, writer, name, description, IDManager.FORUM_TYPE); } else { --- 98,174 ---- if (type.equals("createForum")) { + + IAuthorizationPrincipal ap = session.staticData.getAuthorizationPrincipal(); + IPermission[] perms = ap.getAllPermissions(forum.getOwnerToken(), "Create", (session.runtimeData).getParameter("forum") ); + + for(int i = 0; i < perms.length; i++) { + if(perms[i].getType().equals("GRANT")) { + if (isAdmin || isManager) { + writer.write("<type>createForum</type>"); + RAPViewXML viewXML = ViewXMLFactory.createRAPViewXML(); + XMLOutputter outputter = new XMLOutputter(); + outputter.output(viewXML.getCategoryXML().detachRootElement(), writer); + } else { + writer.write("<type>noAccess</type>"); + } + } else { + // Unauthorized access to post + UnAuthorizedModeCommand command = new UnAuthorizedModeCommand(); + session.unauthorizedMsg = "Sorry, you do not have appropriate permission to create new forums.<br/><br/>"+ + "Please contact your forum administrator for appropriate access.<br/><br/>Thank you!"; + command.execute(forum, session, out); + break; + } + } + + } else if (type.equals("prePerm")) { + IAuthorizationPrincipal ap = session.staticData.getAuthorizationPrincipal(); + IPermission[] perms = ap.getAllPermissions(forum.getOwnerToken(), "Create", (session.runtimeData).getParameter("forum") ); + + for(int i = 0; i < perms.length; i++) { + if(perms[i].getType().equals("GRANT")) { + if (isAdmin || isManager) { + //go to select forum to assign permissions to + //fix xml here + //need to get a list of forum names here to add to the xml + writer.write("<type>prePerm</type>"); + RAPViewXML viewXML = ViewXMLFactory.createRAPViewXML(); + XMLOutputter outputter = new XMLOutputter(); + outputter.output(viewXML.getCategoryXML().detachRootElement(), writer); + RAPDB dbCon = new RAPDB(); + outputter.output(viewXML.getForumsXML(1, dbCon.getForumCount()).detachRootElement(), writer); + } else { + writer.write("<type>noAccess</type>"); + } + } else { + // Unauthorized access to post + UnAuthorizedModeCommand command = new UnAuthorizedModeCommand(); + session.unauthorizedMsg = "Sorry, you do not have appropriate permission to assign permissions to forums.<br/><br/>"+ + "Please contact your forum administrator for appropriate access.<br/><br/>Thank you!"; + command.execute(forum, session, out); + break; + } + } + + } else if (type.equals("adminForum")) { if (isAdmin || isManager) { ! //display main administration view ! writer.write("<type>adminForum</type>"); RAPViewXML viewXML = ViewXMLFactory.createRAPViewXML(); XMLOutputter outputter = new XMLOutputter(); ! outputter.output(viewXML.getCategoryXML().detachRootElement(), writer); } else { writer.write("<type>noAccess</type>"); } ! } else if (type.equals("doForum")) { if (isAdmin || isManager) { //create the forum ! String name = (session.runtimeData).getParameter("name"); ! String description = (session.runtimeData).getParameter("description"); ! validateInsert(forum, writer, name, description, IDManager.FORUM_TYPE, session); } else { *************** *** 124,140 **** } else if (type.equals("deleteForum")) { ! if (isAdmin || isManager) { ! writer.write("<type>deleteForum</type>"); ! //delete forum ! RAPViewXML rapViewXML = ViewXMLFactory.createRAPViewXML(); ! XMLOutputter outputter = new XMLOutputter(); ! outputter.output(rapViewXML.getCategoryXML().detachRootElement(), writer); ! RAPDB dbCon = new RAPDB(); ! outputter.output(rapViewXML.getForumsXML(1, dbCon.getForumCount()).detachRootElement(), writer); ! String name = forum.getRuntimeData().getParameter("name"); ! //validateInsert(forum, writer, name, description, IDManager.FORUM_TYPE); ! } else { ! writer.write("<type>noAccess</type>"); ! } } else if (type.equals("doDeleteForum")) { --- 178,210 ---- } else if (type.equals("deleteForum")) { ! IAuthorizationPrincipal ap = session.staticData.getAuthorizationPrincipal(); ! IPermission[] perms = ap.getAllPermissions(forum.getOwnerToken(), "Delete", (session.runtimeData).getParameter("forum") ); ! ! for(int i = 0; i < perms.length; i++) { ! if(perms[i].getType().equals("GRANT")) { ! ! if (isAdmin || isManager) { ! writer.write("<type>deleteForum</type>"); ! //delete forum ! RAPViewXML rapViewXML = ViewXMLFactory.createRAPViewXML(); ! XMLOutputter outputter = new XMLOutputter(); ! outputter.output(rapViewXML.getCategoryXML().detachRootElement(), writer); ! RAPDB dbCon = new RAPDB(); ! outputter.output(rapViewXML.getForumsXML(1, dbCon.getForumCount()).detachRootElement(), writer); ! String name = (session.runtimeData).getParameter("name"); ! //validateInsert(forum, writer, name, description, IDManager.FORUM_TYPE); ! } else { ! writer.write("<type>noAccess</type>"); ! } ! ! } else { ! // Unauthorized access to post ! UnAuthorizedModeCommand command = new UnAuthorizedModeCommand(); ! session.unauthorizedMsg = "Sorry, you do not have appropriate permission to delete forums.<br/><br/>"+ ! "Please contact your forum administrator for appropriate access.<br/><br/>Thank you!"; ! command.execute(forum, session, out); ! break; ! } ! } } else if (type.equals("doDeleteForum")) { *************** *** 143,148 **** //delete category writer.write("<type>doDeleteForum</type>"); ! String catID = forum.getRuntimeData().getParameter("categoryid"); ! String forumID = forum.getRuntimeData().getParameter("forumid"); if(catID != null && forumID != null) { --- 213,218 ---- //delete category writer.write("<type>doDeleteForum</type>"); ! String catID = (session.runtimeData).getParameter("categoryid"); ! String forumID = (session.runtimeData).getParameter("forumid"); if(catID != null && forumID != null) { *************** *** 172,179 **** if (isAdmin || isManager) { ! String name = forum.getRuntimeData().getParameter("name"); ! String description = forum.getRuntimeData().getParameter("description"); ! validateInsert(forum, writer, name, description, IDManager.CATEGORY_TYPE); } else { --- 242,249 ---- if (isAdmin || isManager) { ! String name = (session.runtimeData).getParameter("name"); ! String description = (session.runtimeData).getParameter("description"); ! validateInsert(forum, writer, name, description, IDManager.CATEGORY_TYPE, session); } else { *************** *** 199,203 **** //delete category writer.write("<type>doDeleteCat</type>"); ! String catID = forum.getRuntimeData().getParameter("categoryid"); if(catID != null) { --- 269,273 ---- //delete category writer.write("<type>doDeleteCat</type>"); ! String catID = (session.runtimeData).getParameter("categoryid"); if(catID != null) { *************** *** 223,233 **** xml += "</rap>"; ! //System.out.println("Admin "+xml); // Transform xml XSLT xslt = new XSLT(forum); xslt.setXML(xml); ! xslt.setXSL("CForum.ssl", stylesheet, forum.getRuntimeData().getBrowserInfo()); ! xslt.setStylesheetParameter("baseActionURL", forum.getRuntimeData().getBaseActionURL()); xslt.setTarget(out); xslt.transform(); --- 293,303 ---- xml += "</rap>"; ! //System.out.println("Admin "+xml); // Transform xml XSLT xslt = new XSLT(forum); xslt.setXML(xml); ! xslt.setXSL("CForum.ssl", stylesheet, (session.runtimeData).getBrowserInfo()); ! xslt.setStylesheetParameter("baseActionURL", (session.runtimeData).getBaseActionURL()); xslt.setTarget(out); xslt.transform(); *************** *** 237,241 **** * Validates description and name, then inserts new category into the database */ ! private void validateInsert(CForum forum, StringWriter writer, String name, String description, int type) throws RAPDBException { String paramType= "createForum"; if(type == IDManager.CATEGORY_TYPE) --- 307,311 ---- * Validates description and name, then inserts new category into the database */ ! private void validateInsert(CForum forum, StringWriter writer, String name, String description, int type, ForumSessionData session) throws RAPDBException { String paramType= "createForum"; if(type == IDManager.CATEGORY_TYPE) *************** *** 262,266 **** writer.write("<type>doForum</type>"); ! int categoryID = Integer.parseInt(forum.getRuntimeData().getParameter("category")); IForum newForum = new RAPForumsManager().createForum(name, description, categoryID); int forumID = newForum.getForumID(); --- 332,336 ---- writer.write("<type>doForum</type>"); ! int categoryID = Integer.parseInt((session.runtimeData).getParameter("category")); IForum newForum = new RAPForumsManager().createForum(name, description, categoryID); int forumID = newForum.getForumID(); |
From: Brad R. <br...@us...> - 2004-07-21 17:14:33
|
Update of /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4961 Modified Files: AboutModeCommand.java Log Message: no message Index: AboutModeCommand.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/commands/AboutModeCommand.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AboutModeCommand.java 26 Jan 2004 18:49:27 -0000 1.3 --- AboutModeCommand.java 21 Jul 2004 17:14:24 -0000 1.4 *************** *** 25,32 **** import org.jasig.portal.ChannelRuntimeData; import org.jasig.portal.utils.XSLT; - import org.xml.sax.ContentHandler; import org.jasig.portal.PortalException; import edu.fullcoll.uportal.channels.rap.forum.CForum; /** * This class provides the display for the about screen. --- 25,35 ---- import org.jasig.portal.ChannelRuntimeData; import org.jasig.portal.utils.XSLT; import org.jasig.portal.PortalException; + + import edu.fullcoll.uportal.channels.rap.forum.ForumSessionData; import edu.fullcoll.uportal.channels.rap.forum.CForum; + import org.xml.sax.ContentHandler; + /** * This class provides the display for the about screen. *************** *** 45,49 **** * @param out - the output object for sending user responses */ ! public void execute(CForum forum, ContentHandler out) throws PortalException { String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; String stylesheet = "about"; --- 48,52 ---- * @param out - the output object for sending user responses */ ! public void execute(CForum forum, ForumSessionData session, ContentHandler out) throws PortalException { String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; String stylesheet = "about"; *************** *** 53,58 **** XSLT xslt = new XSLT(forum); xslt.setXML(xml); ! xslt.setXSL("CForum.ssl", stylesheet, forum.getRuntimeData().getBrowserInfo()); ! xslt.setStylesheetParameter("baseActionURL", forum.getRuntimeData().getBaseActionURL()); xslt.setTarget(out); xslt.transform(); --- 56,61 ---- XSLT xslt = new XSLT(forum); xslt.setXML(xml); ! xslt.setXSL("CForum.ssl", stylesheet, (session.runtimeData).getBrowserInfo()); ! xslt.setStylesheetParameter("baseActionURL", (session.runtimeData).getBaseActionURL()); xslt.setTarget(out); xslt.transform(); |
From: <ben...@id...> - 2004-05-25 08:44:47
|
Dear Open Source developer I am doing a research project on "Fun and Software Development" in which I kindly invite you to participate. You will find the online survey under http://fasd.ethz.ch/qsf/. The questionnaire consists of 53 questions and you will need about 15 minutes to complete it. With the FASD project (Fun and Software Development) we want to define the motivational significance of fun when software developers decide to engage in Open Source projects. What is special about our research project is that a similar survey is planned with software developers in commercial firms. This procedure allows the immediate comparison between the involved individuals and the conditions of production of these two development models. Thus we hope to obtain substantial new insights to the phenomenon of Open Source Development. With many thanks for your participation, Benno Luthiger PS: The results of the survey will be published under http://www.isu.unizh.ch/fuehrung/blprojects/FASD/. We have set up the mailing list fa...@we... for this study. Please see http://fasd.ethz.ch/qsf/mailinglist_en.html for registration to this mailing list. _______________________________________________________________________ Benno Luthiger Swiss Federal Institute of Technology Zurich 8092 Zurich Mail: benno.luthiger(at)id.ethz.ch _______________________________________________________________________ |
From: <br...@us...> - 2004-02-06 18:13:28
|
Update of /cvsroot/rapforums/release In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3785 Modified Files: rapForums.jar Log Message: Add new admin.xsl - Bug Fix Index: rapForums.jar =================================================================== RCS file: /cvsroot/rapforums/release/rapForums.jar,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 Binary files /tmp/cvsaOJ30p and /tmp/cvs4DDT6u differ |
From: <br...@us...> - 2004-02-03 22:23:39
|
Update of /cvsroot/rapforums/src/stylesheets/edu/fullcoll/uportal/channels/rap/forum In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29588 Modified Files: admin.xsl Log Message: Update admin.xsl - error in listing categories Index: admin.xsl =================================================================== RCS file: /cvsroot/rapforums/src/stylesheets/edu/fullcoll/uportal/channels/rap/forum/admin.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin.xsl 26 Jan 2004 19:04:03 -0000 1.2 --- admin.xsl 3 Feb 2004 22:21:24 -0000 1.3 *************** *** 135,139 **** <select name="category"> <optgroup label="categories"> ! <xsl:for-each select="/rap/categories/category/" xml:space="preserve"> <xsl:call-template name="option-list"/> </xsl:for-each> --- 135,139 ---- <select name="category"> <optgroup label="categories"> ! <xsl:for-each select="/rap/categories/category" xml:space="preserve"> <xsl:call-template name="option-list"/> </xsl:for-each> *************** *** 408,412 **** <select name="categoryid"> <optgroup label="categories"> ! <xsl:for-each select="/rap/categories/category/" xml:space="preserve"> <xsl:call-template name="option-list"/> </xsl:for-each> --- 408,412 ---- <select name="categoryid"> <optgroup label="categories"> ! <xsl:for-each select="/rap/categories/category" xml:space="preserve"> <xsl:call-template name="option-list"/> </xsl:for-each> |
From: <br...@us...> - 2004-02-03 22:23:18
|
Update of /cvsroot/rapforums/release In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29033 Modified Files: rapForumsV0_8_3.zip Log Message: Update admin.xsl - error in listing categories Index: rapForumsV0_8_3.zip =================================================================== RCS file: /cvsroot/rapforums/release/rapForumsV0_8_3.zip,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsV1hvId and /tmp/cvs6LUA24 differ |
From: <br...@pr...> - 2004-01-27 19:01:51
|
Update of /cvsroot/rapforums/release In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25433 Modified Files: rapForumsV0_8_3.zip Log Message: Update build.xml -> deploy task to copy jdom jars Index: rapForumsV0_8_3.zip =================================================================== RCS file: /cvsroot/rapforums/release/rapForumsV0_8_3.zip,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvssiR178 and /tmp/cvscjmxIz differ |
From: <br...@pr...> - 2004-01-27 19:00:50
|
Update of /cvsroot/rapforums/build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25184 Modified Files: build.xml Log Message: Update deploy task to copy jdom jars Index: build.xml =================================================================== RCS file: /cvsroot/rapforums/build/build.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** build.xml 26 Jan 2004 17:50:02 -0000 1.3 --- build.xml 27 Jan 2004 18:59:44 -0000 1.4 *************** *** 18,22 **** <property name="xml-apis.jar" value="(set this in build.properties!)"/> <property name="jdbc2_0-stdext.jar.jar" value="(set this in build.properties!)"/> - <!-- Modify jdbcDriver to the appropriate database driver --> <!-- MS SQL Server 2000: use mssqlserver.jar --> --- 18,21 ---- *************** *** 26,30 **** <property name="jdbcDriverBase.jar" value="(set this in build.properties!)"/> <property name="jdbcDriverUtil.jar" value="(set this in build.properties!)"/> - <!-- SQLTask is used to load MS SQL stored procedures for forums paging --> <!-- Uncomment if you are using MS SQL and MAKE SURE THAT THE SQLTask class file is in your --- 25,28 ---- *************** *** 35,39 **** <taskdef name="SQLTask" classname="edu.fullcoll.uportal.channels.rap.forum.tools.SQLTask"/>--> - <!-- ==================== Compile Target ================================= --> <target name="compile"> --- 33,36 ---- *************** *** 49,53 **** </javac> </target> - <!-- ==================== JavaDoc Target ================================= --> <target name="javadoc" description="Javadoc for RAP Forums channel."> --- 46,49 ---- *************** *** 66,70 **** </javadoc> </target> - <!-- ==================== Jar Forums Target ================================= --> <target name="jarForums" depends="compile"> --- 62,65 ---- *************** *** 74,78 **** </jar> </target> - <!-- ==================== Clean Target ================================= --> <target name="clean" description="Clean all build products."> --- 69,72 ---- *************** *** 80,84 **** <delete dir="docs/api"/> </target> - <!-- ==================== Package Forums For Release Target ================================= --> <target name="packageRelease" depends="jarForums"> --- 74,77 ---- *************** *** 95,98 **** --- 88,99 ---- <fileset dir="${release.home}" includes="rapForums.jar"/> </copy> + <echo message="Rap Forums copying jdom jars to ${deploy.home}/WEB-INF/lib"/> + <copy todir="${deploy.home}/WEB-INF/lib/"> + <fileset dir="./lib" includes="jdom.jar"/> + </copy> + <echo message="Rap Forums copying jdom-contrib jar to ${deploy.home}/WEB-INF/lib"/> + <copy todir="${deploy.home}/WEB-INF/lib/"> + <fileset dir="./lib" includes="jdom-contrib.jar"/> + </copy> <echo message="Rap Forums copying media to ${deploy.home}/media"/> <copy todir="${deploy.home}/media/"> *************** *** 108,111 **** --- 109,120 ---- <fileset dir="${release.home}" includes="rapForums.jar"/> </copy> + <echo message="Rap Forums copying jdom jars to ${test.home}/WEB-INF/lib"/> + <copy todir="${test.home}/WEB-INF/lib/"> + <fileset dir="./lib" includes="jdom.jar"/> + </copy> + <echo message="Rap Forums copying jdom-contrib jar to ${test.home}/WEB-INF/lib"/> + <copy todir="${test.home}/WEB-INF/lib/"> + <fileset dir="./lib" includes="jdom-contrib.jar"/> + </copy> <echo message="Rap Forums copying media to ${test.home}/media"/> <copy todir="${test.home}/media/"> *************** *** 114,118 **** </copy> </target> - <!-- ==================== Load the Database Target ================================= --> <target name="db"> --- 123,126 ---- |
From: <br...@pr...> - 2004-01-26 19:04:23
|
Update of /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24668 Removed Files: RAPUserXMLDB.java Log Message: Update to version 0.8.3 --- RAPUserXMLDB.java DELETED --- |
From: <br...@pr...> - 2004-01-26 19:03:22
|
Update of /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24345 Added Files: ViewXMLFactory.java Log Message: Update to version 0.8.3 --- NEW FILE: ViewXMLFactory.java --- /** * Copyright (c) 2004, Fullerton College. All Rights Reserved. (http://www.fullcoll.edu) * This software is distributed under the IBM Public Licence. Please see * the license infomation for more details at http://www.opensource.org/licenses/ibmpl.php. * EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED * ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER * EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS * OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * Each Recipient is solely responsible for determining the appropriateness of using * and distributing the Program and assumes all risks associated with its exercise * of rights under this Agreement, including but not limited to the risks and costs * of program errors, compliance with applicable laws, damage to or loss of data, * programs or equipment, and unavailability or interruption of operations. * This software is OSI Certified Open Source Software. OSI Certified is a certification * mark of the Open Source Initiative */ package edu.fullcoll.uportal.channels.rap.forum.xml; import edu.fullcoll.uportal.channels.rap.forum.database.RAPDBConfig; /** * This class handles creation of RAPViewXML classes which build xml documents which are forwarded to * the xsl for transformations into HTML. RAPViewXML is dependent on the particular database product * being used to take advantage of the features in those systems. * * <ul>To use the appropriate RAPViewXML class you MUST configure the channel parameter "dbProduct" to one * of the following: * <li>MSSQL - Microsoft SQL Server Database configuration * <li>MYSQL - MySQL Database Configuration * <li>ORACLE - Oracle Database Configuration * </ul> * * By default the forums use "MSSQL" as the supported database. * * @author Brad Rippe (br...@fu...) * @version 0.8.3 * * @see edu.fullcoll.uportal.channels.rap.forum.xml.MSViewXML * @see edu.fullcoll.uportal.channels.rap.forum.xml.MySQLViewXML * @see edu.fullcoll.uportal.channels.rap.forum.xml.OracleViewXML */ public class ViewXMLFactory { /** * This method returns the appropriate RAPViewXML based on the database the forums are using. * @return the appropriate RAPViewXML class */ public static RAPViewXML createRAPViewXML() { if(RAPDBConfig.getInstance().getDatabaseProduct().equals("MYSQL")) return new MySQLViewXML(); else if(RAPDBConfig.getInstance().getDatabaseProduct().equals("ORACLE")) return new OracleViewXML(); else return new MSViewXML(); } } |
From: <br...@pr...> - 2004-01-26 19:02:09
|
Update of /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23971 Modified Files: SQLTask.java Log Message: Update to version 0.8.3 Index: SQLTask.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/tools/SQLTask.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SQLTask.java 25 Sep 2003 23:04:23 -0000 1.1 --- SQLTask.java 26 Jan 2004 19:01:11 -0000 1.2 *************** *** 1,4 **** /** ! * Copyright (C) 2003, Fullerton College. All Rights Reserved. * (http://www.fullcoll.edu) * --- 1,4 ---- /** ! * Copyright (c) 2004, Fullerton College. All Rights Reserved. * (http://www.fullcoll.edu) * *************** *** 39,43 **** * * @author Brad Rippe (br...@fu...) ! * @version 0.8.2 $Revision %G% */ public class SQLTask extends Task { --- 39,43 ---- * * @author Brad Rippe (br...@fu...) ! * @version 0.8.3 $Revision %G% */ public class SQLTask extends Task { |
From: <br...@pr...> - 2004-01-26 19:01:28
|
Update of /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/filter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23698 Removed Files: filter.dfPackage Log Message: Update to version 0.8.3 --- filter.dfPackage DELETED --- |
Update of /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/filter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23460 Modified Files: DefaultFilter.java ICommentFilter.java IFilterManager.java ProfanityFilter.java RAPFilterManager.java Log Message: Update to version 0.8.3 Index: DefaultFilter.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/filter/DefaultFilter.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DefaultFilter.java 25 Sep 2003 22:57:08 -0000 1.2 --- DefaultFilter.java 26 Jan 2004 18:59:41 -0000 1.3 *************** *** 1,4 **** /** ! * Copyright (C) 2003, Fullerton College. All Rights Reserved. * (http://www.fullcoll.edu) * --- 1,4 ---- /** ! * Copyright (c) 2004, Fullerton College. All Rights Reserved. * (http://www.fullcoll.edu) * *************** *** 27,31 **** * * @author Chris Pereda (cp...@fu...) ! * @version 0.8.2 $Revision %G% */ public class DefaultFilter implements ICommentFilter { --- 27,31 ---- * * @author Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public class DefaultFilter implements ICommentFilter { *************** *** 34,38 **** * Filters the subject of a comment * @param subject the subject to filter ! * @returns the filtered subject */ public String filterSubject(String subject) { --- 34,38 ---- * Filters the subject of a comment * @param subject the subject to filter ! * @return the filtered subject */ public String filterSubject(String subject) { *************** *** 43,47 **** * Filters the body of a comment * @param body the body to filter ! * @returns the filtered body */ public String filterBody(String body) { --- 43,47 ---- * Filters the body of a comment * @param body the body to filter ! * @return the filtered body */ public String filterBody(String body) { Index: ICommentFilter.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/filter/ICommentFilter.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ICommentFilter.java 25 Sep 2003 22:57:08 -0000 1.2 --- ICommentFilter.java 26 Jan 2004 18:59:41 -0000 1.3 *************** *** 1,4 **** /** ! * Copyright (C) 2003, Fullerton College. All Rights Reserved. * (http://www.fullcoll.edu) * --- 1,4 ---- /** ! * Copyright (c) 2004, Fullerton College. All Rights Reserved. * (http://www.fullcoll.edu) * *************** *** 27,31 **** * * @author Chris Pereda (cp...@fu...) ! * @version 0.8.2 $Revision %G% */ public interface ICommentFilter --- 27,31 ---- * * @author Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public interface ICommentFilter *************** *** 34,38 **** * Filters the subject of a comment * @param subject the subject to filter ! * @returns the filtered subject */ public String filterSubject(String subject); --- 34,38 ---- * Filters the subject of a comment * @param subject the subject to filter ! * @return the filtered subject */ public String filterSubject(String subject); *************** *** 41,45 **** * Filters the body of a comment * @param body the body to filter ! * @returns the filtered body */ public String filterBody(String body); --- 41,45 ---- * Filters the body of a comment * @param body the body to filter ! * @return the filtered body */ public String filterBody(String body); Index: IFilterManager.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/filter/IFilterManager.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IFilterManager.java 25 Sep 2003 22:57:08 -0000 1.2 --- IFilterManager.java 26 Jan 2004 18:59:41 -0000 1.3 *************** *** 1,4 **** /** ! * Copyright (C) 2003, Fullerton College. All Rights Reserved. * (http://www.fullcoll.edu) * --- 1,4 ---- /** ! * Copyright (c) 2004, Fullerton College. All Rights Reserved. * (http://www.fullcoll.edu) * *************** *** 29,33 **** * * @author Chris Pereda (cp...@fu...) ! * @version 0.8.2 $Revision %G% */ public interface IFilterManager { --- 29,33 ---- * * @author Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public interface IFilterManager { Index: ProfanityFilter.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/filter/ProfanityFilter.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ProfanityFilter.java 25 Sep 2003 22:57:08 -0000 1.2 --- ProfanityFilter.java 26 Jan 2004 18:59:41 -0000 1.3 *************** *** 1,4 **** /** ! * Copyright (C) 2003, Fullerton College. All Rights Reserved. * (http://www.fullcoll.edu) * --- 1,4 ---- /** ! * Copyright (c) 2004, Fullerton College. All Rights Reserved. * (http://www.fullcoll.edu) * *************** *** 33,37 **** * * @author Chris Pereda (cp...@fu...) ! * @version 0.8.2 $Revision %G% */ public class ProfanityFilter implements ICommentFilter { --- 33,37 ---- * * @author Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public class ProfanityFilter implements ICommentFilter { *************** *** 43,46 **** --- 43,47 ---- "fuckers", "fucking", + "motherfucker", "ass", "asshole", *************** *** 67,71 **** * Filters the subject of a comment * @param subject the subject to filter ! * @returns the filtered subject */ public String filterSubject(String subject) { --- 68,72 ---- * Filters the subject of a comment * @param subject the subject to filter ! * @return the filtered subject */ public String filterSubject(String subject) { *************** *** 76,80 **** * Filters the body of a comment * @param body the body to filter ! * @returns the filtered body */ public String filterBody(String body) { --- 77,81 ---- * Filters the body of a comment * @param body the body to filter ! * @return the filtered body */ public String filterBody(String body) { Index: RAPFilterManager.java =================================================================== RCS file: /cvsroot/rapforums/src/source/edu/fullcoll/uportal/channels/rap/forum/filter/RAPFilterManager.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RAPFilterManager.java 25 Sep 2003 22:57:08 -0000 1.2 --- RAPFilterManager.java 26 Jan 2004 18:59:41 -0000 1.3 *************** *** 1,4 **** /** ! * Copyright (C) 2003, Fullerton College. All Rights Reserved. * (http://www.fullcoll.edu) * --- 1,4 ---- /** ! * Copyright (c) 2004, Fullerton College. All Rights Reserved. * (http://www.fullcoll.edu) * *************** *** 31,35 **** * * @author Chris Pereda (cp...@fu...) ! * @version 0.8.2 $Revision %G% */ public class RAPFilterManager implements IFilterManager { --- 31,35 ---- * * @author Chris Pereda (cp...@fu...) ! * @version 0.8.3 $Revision %G% */ public class RAPFilterManager implements IFilterManager { |