partial implementation of conference management; rewrote the whole servlets
layer to eliminate duplicate code and make error checking more efficient (we now use a system that relies on Throwables to do interesting things)
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
WARRANTY OF ANY KIND, either express or implied. See the License for the specific
|
||||
language governing rights and limitations under the License.
|
||||
|
||||
The Original Code is the Venice Web Community System.
|
||||
The Original Code is the Venice Web Communities System.
|
||||
|
||||
The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
|
||||
for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
|
||||
@@ -22,9 +22,10 @@
|
||||
<%@ page import = "com.silverwrist.venice.servlets.format.*" %>
|
||||
<%!
|
||||
|
||||
private static void renderMenu(HttpSession session, java.io.Writer out, RenderData rdat) throws java.io.IOException
|
||||
private static void renderMenu(HttpSession session, java.io.Writer out, RenderData rdat)
|
||||
throws java.io.IOException
|
||||
{
|
||||
ContentRender menu = Variables.getMenu(session);
|
||||
ComponentRender menu = Variables.getMenu(session);
|
||||
if (menu==null)
|
||||
menu = new MenuTop();
|
||||
menu.renderHere(out,rdat);
|
||||
@@ -33,14 +34,15 @@ private static void renderMenu(HttpSession session, java.io.Writer out, RenderDa
|
||||
|
||||
%>
|
||||
<%
|
||||
BaseJSPData basedat = BaseJSPData.retrieve(request);
|
||||
Variables.failIfNull(basedat);
|
||||
UserContext user = Variables.getUserContext(application,request,session);
|
||||
RenderData rdat = RenderConfig.createRenderData(application,request,response);
|
||||
BaseJSPData basedat = BaseJSPData.retrieve(request);
|
||||
%>
|
||||
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<%= rdat.getTitleTag(basedat.getTitle()) %>
|
||||
<%= rdat.getTitleTag(basedat.getTitle(rdat)) %>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#9999FF">
|
||||
|
||||
@@ -35,8 +35,7 @@
|
||||
<IMG SRC="<%= rdat.getFullImagePath("purple-ball.gif") %>" ALT="*" WIDTH=14 HEIGHT=14 BORDER=0>
|
||||
</TD>
|
||||
<TD ALIGN=LEFT><%= rdat.getStdFontTag(null,2) %>
|
||||
<% String path = "confdisp?sig=" + String.valueOf(data.getSIGID()) + "&conf="
|
||||
+ String.valueOf(data.getConferenceID(i)); %>
|
||||
<% String path = "confdisp?sig=" + data.getSIGID() + "&conf=" + data.getConferenceID(i); %>
|
||||
<A HREF="<%= rdat.getEncodedServletPath(path) %>"><%= StringUtil.encodeHTML(data.getConferenceName(i)) %></A> -
|
||||
Latest activity: <%= rdat.getActivityString(data.getLastUpdateDate(i)) %><BR>
|
||||
<% int count = data.getNumHosts(i); %>
|
||||
@@ -59,7 +58,7 @@
|
||||
<% if (data.canCreateConference()) { %>
|
||||
<P>
|
||||
<DIV ALIGN="LEFT">
|
||||
<A HREF="<%= rdat.getEncodedServletPath("confops?cmd=C&sig=" + String.valueOf(data.getSIGID())) %>"><IMG
|
||||
<A HREF="<%= rdat.getEncodedServletPath("confops?cmd=C&sig=" + data.getSIGID()) %>"><IMG
|
||||
SRC="<%= rdat.getFullImagePath("bn_create_new.gif") %>" ALT="Create New" WIDTH=80 HEIGHT=24 BORDER=0></A>
|
||||
</DIV>
|
||||
<% } // end if %>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
WARRANTY OF ANY KIND, either express or implied. See the License for the specific
|
||||
language governing rights and limitations under the License.
|
||||
|
||||
The Original Code is the Venice Web Community System.
|
||||
The Original Code is the Venice Web Communities System.
|
||||
|
||||
The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
|
||||
for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
|
||||
@@ -105,8 +105,7 @@ private static String getActivityString(SIGContext sig, RenderData rdat)
|
||||
<%= rdat.getStdFontTag(null,2) %>
|
||||
Display all categories whose name
|
||||
|
||||
<% } else throw new InternalStateError("display parameter " + String.valueOf(data.getDisplayOption())
|
||||
+ " invalid"); %>
|
||||
<% } else throw new InternalStateError("display parameter " + data.getDisplayOption() + " invalid"); %>
|
||||
|
||||
<SELECT NAME="mode" SIZE=1>
|
||||
<OPTION VALUE="<%= SearchMode.SEARCH_PREFIX %>"
|
||||
|
||||
59
web/format/manage_conf.jsp
Normal file
59
web/format/manage_conf.jsp
Normal file
@@ -0,0 +1,59 @@
|
||||
<%--
|
||||
The contents of this file are subject to the Mozilla Public License Version 1.1
|
||||
(the "License"); you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
|
||||
WARRANTY OF ANY KIND, either express or implied. See the License for the specific
|
||||
language governing rights and limitations under the License.
|
||||
|
||||
The Original Code is the Venice Web Communities System.
|
||||
|
||||
The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
|
||||
for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
|
||||
Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
--%>
|
||||
<%@ page import = "java.util.*" %>
|
||||
<%@ page import = "com.silverwrist.util.StringUtil" %>
|
||||
<%@ page import = "com.silverwrist.venice.core.*" %>
|
||||
<%@ page import = "com.silverwrist.venice.servlets.Variables" %>
|
||||
<%@ page import = "com.silverwrist.venice.servlets.format.*" %>
|
||||
<%
|
||||
ManageConference data = ManageConference.retrieve(request);
|
||||
Variables.failIfNull(data);
|
||||
RenderData rdat = RenderConfig.createRenderData(application,request,response);
|
||||
%>
|
||||
<% if (rdat.useHTMLComments()) { %><!-- Managing conference #<%= data.getConfID() %> --><% } %>
|
||||
<% rdat.writeContentHeader(out,"Manage Conference:",data.getConfName()); %>
|
||||
|
||||
<%= rdat.getStdFontTag(null,2) %>
|
||||
<A HREF="<%= rdat.getEncodedServletPath("confdisp?" + data.getLocator()) %>">Return to Topic List</A>
|
||||
</FONT><P>
|
||||
|
||||
<% if (rdat.useHTMLComments()) { %><!-- Set Default Pseud Form --><% } %>
|
||||
<FORM METHOD="POST" ACTION="<%= rdat.getEncodedServletPath("confops") %>">
|
||||
<INPUT TYPE="HIDDEN" NAME="sig" VALUE="<%= data.getSIGID() %>">
|
||||
<INPUT TYPE="HIDDEN" NAME="conf" VALUE="<%= data.getConfID() %>">
|
||||
<INPUT TYPE="HIDDEN" NAME="cmd" VALUE="P">
|
||||
<%= rdat.getStdFontTag(null,2) %>
|
||||
Set default pseud for conference:
|
||||
<INPUT TYPE="TEXT" NAME="pseud" VALUE="" SIZE=37 MAXLENGTH=255>
|
||||
<INPUT TYPE="IMAGE" SRC="<%= rdat.getFullImagePath("bn_set.gif") %>" NAME="set" ALT="Set"
|
||||
WIDTH=80 HEIGHT=24 BORDER=0>
|
||||
</FONT>
|
||||
</FORM><P>
|
||||
|
||||
<% if (rdat.useHTMLComments()) { %><!-- Fixseen Link --><% } %>
|
||||
<%= rdat.getStdFontTag(null,2) %><B>
|
||||
<A HREF="<%= rdat.getEncodedServletPath("confops?" + data.getLocator() + "&cmd=FX") %>">Mark
|
||||
entire conference as read (fixseen)</A>
|
||||
</B></FONT><P>
|
||||
|
||||
<% if (data.displayAdminSection()) { %>
|
||||
<% if (rdat.useHTMLComments()) { %><!-- Host Tools Section --><% } %>
|
||||
<%-- TODO: fill this in --%>
|
||||
<% } // end if (displaying admin section) %>
|
||||
|
||||
<% rdat.writeFooter(out); %>
|
||||
@@ -34,8 +34,8 @@
|
||||
tmp = "(Frozen) ";
|
||||
else
|
||||
tmp = "";
|
||||
rdat.writeContentHeader(out,data.getTopicName(),tmp + String.valueOf(data.getTotalMessages())
|
||||
+ " Total; " + String.valueOf(data.getNewMessages()) + " New; Last: "
|
||||
rdat.writeContentHeader(out,data.getTopicName(),tmp + data.getTotalMessages() + " Total; "
|
||||
+ data.getNewMessages() + " New; Last: "
|
||||
+ rdat.formatDateForDisplay(data.getLastUpdate()));
|
||||
%>
|
||||
<TABLE BORDER=0 WIDTH="100%" CELLPADDING=0 CELLSPACING=0>
|
||||
@@ -162,7 +162,7 @@
|
||||
<% } // end if %>
|
||||
<%= rdat.getStdFontTag(null,2) %>
|
||||
<A HREF="<%= rdat.getEncodedServletPath("confdisp?" + data.getLocator() + "&shac=1&p1="
|
||||
+ String.valueOf(msg.getPostNumber())) %>"><%= msg.getPostNumber() %></A> of
|
||||
+ msg.getPostNumber()) %>"><%= msg.getPostNumber() %></A> of
|
||||
<A HREF="<%= last_post %>"><%= data.getTotalMessages() - 1 %></A>
|
||||
<%= rdat.getStdFontTag(null,1) %><<%= data.getMessageReference(msg) %>></FONT>
|
||||
<% if (data.showAdvanced() && msg.isHidden()) { %>
|
||||
@@ -176,7 +176,7 @@
|
||||
</EM>)
|
||||
<% if (msg.hasAttachment()) { %>
|
||||
<A HREF="<%= rdat.getEncodedServletPath("attachment?" + data.getConfLocator() + "&msg="
|
||||
+ String.valueOf(msg.getPostID())) %>"><IMG
|
||||
+ msg.getPostID()) %>"><IMG
|
||||
SRC="<%= rdat.getFullImagePath("attachment.gif") %>"
|
||||
ALT="(Attachment <%= msg.getAttachmentFilename() %> - <%= msg.getAttachmentLength() %> bytes)"
|
||||
WIDTH=16 HEIGHT=16 BORDER=0></A>
|
||||
@@ -190,14 +190,14 @@
|
||||
<% } else if (msg.isHidden() && !(data.showAdvanced())) { %>
|
||||
<TT><EM><B>
|
||||
<A HREF="<%= rdat.getEncodedServletPath("confdisp?" + data.getLocator() + "&shac=1&p1="
|
||||
+ String.valueOf(msg.getPostNumber())) %>">(Hidden
|
||||
+ msg.getPostNumber()) %>">(Hidden
|
||||
Message: <%= msg.getNumLines() %> <% if (msg.getNumLines()==1) { %>Line<% } else { %>Lines<% } %>)</A>
|
||||
</B></EM></TT><P>
|
||||
<% } else { %>
|
||||
<PRE><%= rdat.rewritePostData(data.getMessageBodyText(msg)) %></PRE>
|
||||
<% } // end if %>
|
||||
<% if (data.showAdvanced()) { %>
|
||||
<% String po_loc = data.getLocator() + "&msg=" + String.valueOf(msg.getPostNumber()); %>
|
||||
<% String po_loc = data.getLocator() + "&msg=" + msg.getPostNumber(); %>
|
||||
</TD><TD NOWRAP ALIGN=RIGHT>
|
||||
<% if (!(msg.isScribbled())) { %>
|
||||
<% if (msg.canHide()) { %>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
WARRANTY OF ANY KIND, either express or implied. See the License for the specific
|
||||
language governing rights and limitations under the License.
|
||||
|
||||
The Original Code is the Venice Web Community System.
|
||||
The Original Code is the Venice Web Communities System.
|
||||
|
||||
The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
|
||||
for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
|
||||
@@ -51,9 +51,12 @@
|
||||
<% if (data.isUserLoggedIn()) { %>
|
||||
<DIV ALIGN="CENTER">
|
||||
<% if (sig.isMember()) { %>
|
||||
<A HREF="/TODO"><IMG SRC="<%= rdat.getFullImagePath("bn_invite.gif") %>" ALT="Invite" WIDTH=80 HEIGHT=24 BORDER=0></A>
|
||||
<A HREF="/TODO"><IMG SRC="<%= rdat.getFullImagePath("bn_invite.gif") %>" ALT="Invite"
|
||||
WIDTH=80 HEIGHT=24 BORDER=0></A>
|
||||
<% } else if (sig.canJoin()) { %>
|
||||
<A HREF="<%= rdat.getEncodedServletPath("sigops?cmd=J&sig=" + String.valueOf(sig.getSIGID())) %>"><IMG SRC="<%= rdat.getFullImagePath("bn_join_now.gif") %>" ALT="Join Now" WIDTH=80 HEIGHT=24 BORDER=0></A>
|
||||
<A HREF="<%= rdat.getEncodedServletPath("sigops?cmd=J&sig=" + sig.getSIGID()) %>"><IMG
|
||||
SRC="<%= rdat.getFullImagePath("bn_join_now.gif") %>" ALT="Join Now"
|
||||
WIDTH=80 HEIGHT=24 BORDER=0></A>
|
||||
<% } // end if %>
|
||||
</DIV>
|
||||
<% } // end if (user is logged in) %>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<% rdat.writeContentHeader(out,"Topics in " + data.getConfName(),null); %>
|
||||
<%= rdat.getStdFontTag(null,2) %>
|
||||
<DIV ALIGN="LEFT">
|
||||
<A HREF="<%= rdat.getEncodedServletPath("confops?sig=" + String.valueOf(data.getSIGID())) %>"><IMG
|
||||
<A HREF="<%= rdat.getEncodedServletPath("confops?sig=" + data.getSIGID()) %>"><IMG
|
||||
SRC="<%= rdat.getFullImagePath("bn_conference_list.gif") %>" ALT="Conference List" WIDTH=80 HEIGHT=24
|
||||
BORDER=0></A>
|
||||
<% if (data.canCreateTopic()) { %>
|
||||
@@ -56,32 +56,32 @@
|
||||
<TR VALIGN=TOP>
|
||||
<TD ALIGN=LEFT WIDTH="1%"><%= rdat.getStdFontTag(null,2) %>
|
||||
<% tmp = self + "&sort="
|
||||
+ String.valueOf(data.isSort(ConferenceContext.SORT_NUMBER) ? -ConferenceContext.SORT_NUMBER
|
||||
: ConferenceContext.SORT_NUMBER); %>
|
||||
+ (data.isSort(ConferenceContext.SORT_NUMBER) ? -ConferenceContext.SORT_NUMBER
|
||||
: ConferenceContext.SORT_NUMBER); %>
|
||||
<B><A HREF="<%= rdat.getEncodedServletPath(tmp) %>">#</A></B>
|
||||
</FONT></TD>
|
||||
<TD ALIGN=LEFT><%= rdat.getStdFontTag(null,2) %>
|
||||
<% tmp = self + "&sort="
|
||||
+ String.valueOf(data.isSort(ConferenceContext.SORT_NAME) ? -ConferenceContext.SORT_NAME
|
||||
: ConferenceContext.SORT_NAME); %>
|
||||
+ (data.isSort(ConferenceContext.SORT_NAME) ? -ConferenceContext.SORT_NAME
|
||||
: ConferenceContext.SORT_NAME); %>
|
||||
<B><A HREF="<%= rdat.getEncodedServletPath(tmp) %>">Topic Name</A></B>
|
||||
</FONT></TD>
|
||||
<TD ALIGN=RIGHT><%= rdat.getStdFontTag(null,2) %>
|
||||
<% tmp = self + "&sort="
|
||||
+ String.valueOf(data.isSort(ConferenceContext.SORT_UNREAD) ? -ConferenceContext.SORT_UNREAD
|
||||
: ConferenceContext.SORT_UNREAD); %>
|
||||
+ (data.isSort(ConferenceContext.SORT_UNREAD) ? -ConferenceContext.SORT_UNREAD
|
||||
: ConferenceContext.SORT_UNREAD); %>
|
||||
<B><A HREF="<%= rdat.getEncodedServletPath(tmp) %>">New</A></B>
|
||||
</FONT></TD>
|
||||
<TD ALIGN=RIGHT><%= rdat.getStdFontTag(null,2) %>
|
||||
<% tmp = self + "&sort="
|
||||
+ String.valueOf(data.isSort(ConferenceContext.SORT_TOTAL) ? -ConferenceContext.SORT_TOTAL
|
||||
: ConferenceContext.SORT_TOTAL); %>
|
||||
+ (data.isSort(ConferenceContext.SORT_TOTAL) ? -ConferenceContext.SORT_TOTAL
|
||||
: ConferenceContext.SORT_TOTAL); %>
|
||||
<B><A HREF="<%= rdat.getEncodedServletPath(tmp) %>">Total</A></B>
|
||||
</FONT></TD>
|
||||
<TD ALIGN=LEFT><%= rdat.getStdFontTag(null,2) %>
|
||||
<% tmp = self + "&sort="
|
||||
+ String.valueOf(data.isSort(ConferenceContext.SORT_DATE) ? -ConferenceContext.SORT_DATE
|
||||
: ConferenceContext.SORT_DATE); %>
|
||||
+ (data.isSort(ConferenceContext.SORT_DATE) ? -ConferenceContext.SORT_DATE
|
||||
: ConferenceContext.SORT_DATE); %>
|
||||
<B><A HREF="<%= rdat.getEncodedServletPath(tmp) %>">Last Response</A></B>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
@@ -90,7 +90,7 @@
|
||||
<% while (it.hasNext()) { %>
|
||||
<%
|
||||
TopicContext topic = (TopicContext)(it.next());
|
||||
tmp = self + "&top=" + String.valueOf(topic.getTopicNumber()) + "&rnm=1";
|
||||
tmp = self + "&top=" + topic.getTopicNumber() + "&rnm=1";
|
||||
%>
|
||||
<TR VALIGN=TOP>
|
||||
<TD ALIGN=LEFT WIDTH="1%"><%= rdat.getStdFontTag(null,2) %>
|
||||
@@ -108,7 +108,7 @@
|
||||
<A HREF="<%= rdat.getEncodedServletPath(tmp) %>"><%= topic.getUnreadMessages() %></A>
|
||||
</FONT></TD>
|
||||
<TD ALIGN=RIGHT><%= rdat.getStdFontTag(null,2) %>
|
||||
<A HREF="<%= rdat.getEncodedServletPath(self + "&top=" + String.valueOf(topic.getTopicNumber())
|
||||
<A HREF="<%= rdat.getEncodedServletPath(self + "&top=" + topic.getTopicNumber()
|
||||
+ "&p1=0&p2=-1") %>"><%= topic.getTotalMessages() %></A>
|
||||
</FONT></TD>
|
||||
<TD ALIGN=LEFT><%= rdat.getStdFontTag(null,2) %>
|
||||
@@ -156,31 +156,34 @@
|
||||
<% if (data.isView(ConferenceContext.DISPLAY_NEW)) { %>
|
||||
<B>New</B>
|
||||
<% } else { %>
|
||||
<A HREF="<%= rdat.getEncodedServletPath(self + "&view=" + String.valueOf(ConferenceContext.DISPLAY_NEW)) %>">New</A>
|
||||
<A HREF="<%= rdat.getEncodedServletPath(self + "&view=" + ConferenceContext.DISPLAY_NEW) %>">New</A>
|
||||
<% } // end if %>
|
||||
<B>|</B>
|
||||
<% if (data.isView(ConferenceContext.DISPLAY_ACTIVE)) { %>
|
||||
<B>Active</B>
|
||||
<% } else { %>
|
||||
<A HREF="<%= rdat.getEncodedServletPath(self + "&view=" + String.valueOf(ConferenceContext.DISPLAY_ACTIVE)) %>">Active</A>
|
||||
<A HREF="<%= rdat.getEncodedServletPath(self + "&view="
|
||||
+ ConferenceContext.DISPLAY_ACTIVE) %>">Active</A>
|
||||
<% } // end if %>
|
||||
<B>|</B>
|
||||
<% if (data.isView(ConferenceContext.DISPLAY_ALL)) { %>
|
||||
<B>All</B>
|
||||
<% } else { %>
|
||||
<A HREF="<%= rdat.getEncodedServletPath(self + "&view=" + String.valueOf(ConferenceContext.DISPLAY_ALL)) %>">All</A>
|
||||
<A HREF="<%= rdat.getEncodedServletPath(self + "&view=" + ConferenceContext.DISPLAY_ALL) %>">All</A>
|
||||
<% } // end if %>
|
||||
<B>|</B>
|
||||
<% if (data.isView(ConferenceContext.DISPLAY_HIDDEN)) { %>
|
||||
<B>Hidden</B>
|
||||
<% } else { %>
|
||||
<A HREF="<%= rdat.getEncodedServletPath(self + "&view=" + String.valueOf(ConferenceContext.DISPLAY_HIDDEN)) %>">Hidden</A>
|
||||
<A HREF="<%= rdat.getEncodedServletPath(self + "&view="
|
||||
+ ConferenceContext.DISPLAY_HIDDEN) %>">Hidden</A>
|
||||
<% } // end if %>
|
||||
<B>|</B>
|
||||
<% if (data.isView(ConferenceContext.DISPLAY_ARCHIVED)) { %>
|
||||
<B>Archived</B>
|
||||
<% } else { %>
|
||||
<A HREF="<%= rdat.getEncodedServletPath(self + "&view=" + String.valueOf(ConferenceContext.DISPLAY_ARCHIVED)) %>">Archived</A>
|
||||
<A HREF="<%= rdat.getEncodedServletPath(self + "&view="
|
||||
+ ConferenceContext.DISPLAY_ARCHIVED) %>">Archived</A>
|
||||
<% } // end if %>
|
||||
<B>]</B>
|
||||
</DIV>
|
||||
|
||||
Reference in New Issue
Block a user