,
* 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):
*/
package com.silverwrist.venice.servlets.format;
import java.io.*;
import java.util.*;
import com.silverwrist.util.StringUtil;
import com.silverwrist.venice.core.*;
public class SideBoxConferences implements ContentRender
{
/*--------------------------------------------------------------------------------
* Attributes
*--------------------------------------------------------------------------------
*/
private UserContext uc;
private List hotlist;
/*--------------------------------------------------------------------------------
* Constructor
*--------------------------------------------------------------------------------
*/
public SideBoxConferences(UserContext uc, String parameter) throws DataException
{
this.uc = uc;
this.hotlist = uc.getConferenceHotlist();
} // end constructor
/*--------------------------------------------------------------------------------
* Implementations from interface VeniceContent
*--------------------------------------------------------------------------------
*/
public String getPageTitle(RenderData rdat)
{
if (uc.isLoggedIn())
return "Your Conference Hotlist:";
else
return "Featured Conferences:";
} // end getPageTitle
/*--------------------------------------------------------------------------------
* Implementations from interface ContentRender
*--------------------------------------------------------------------------------
*/
public void renderHere(Writer out, RenderData rdat) throws IOException
{
out.write(rdat.getStdFontTag(null,2) + "\n");
if (hotlist.size()>0)
{ // display the list of conferences
out.write("\n");
Iterator it = hotlist.iterator();
while (it.hasNext())
{ // display the names of the conferences and SIGs one by one
ConferenceHotlistEntry hle = (ConferenceHotlistEntry)(it.next());
ConferenceContext conf = hle.getConference();
String href = "confdisp?sig=" + conf.getEnclosingSIG().getSIGID() + "&conf=" + conf.getConfID();
out.write("\n | \n");
out.write("\n" + rdat.getStdFontTag(null,2) + "" + StringUtil.encodeHTML(conf.getName())
+ " (" + StringUtil.encodeHTML(conf.getEnclosingSIG().getName()) + ")\n");
if (conf.anyUnread())
out.write(" \n");
out.write(" | \n
\n");
} // end while
out.write("
\n");
} // end if
else
out.write(rdat.getStdFontTag(null,2) + "You have no conferences in your hotlist.\n");
if (uc.isLoggedIn())
{ // write the link at the end
out.write("" + rdat.getStdFontTag(null,1) + "[ Manage ]");
} // end if
} // end renderHere
} // end class SideBoxConferences