head	1.15;
access;
symbols
	TIGRIS_1_1_0RC2:1.11
	TIGRIS_1_1_0RC1:1.11
	TIGRIS_1_1:1.11.0.4
	TIGRIS_1_0_8:1.11
	TIGRIS_1_0_8RC3:1.11
	TIGRIS_1_0_8RC2:1.11
	TIGRIS_1_0_8RC1:1.11
	TIGRIS_1_0_7:1.11
	TIGRIS_1_0_7RC3:1.11
	TIGRIS_1_0_7RC2:1.11
	TIGRIS_1_0_7RC1:1.11
	TIGRIS_1_0_6:1.11
	TIGRIS_1_0_6RC5:1.11
	TIGRIS_1_0_6RC4:1.11
	TIGRIS_1_0_6RC3:1.11
	TIGRIS_1_0_6RC2:1.11
	TIGRIS_1_0_6RC1:1.11
	TIGRIS_1_0_5:1.11
	TIGRIS_1_0_5RC6:1.11
	TIGRIS_1_0_5RC5:1.11
	TIGRIS_1_0_5RC4:1.11
	TIGRIS_1_0_5RC3:1.11
	TIGRIS_1_0_5RC2:1.11
	TIGRIS_1_0_5RC1:1.11
	TIGRIS_1_0_4:1.11
	TIGRIS_1_0_3:1.11
	TIGRIS_1_0_2:1.11
	TIGRIS_1_0_1:1.11
	TIGRIS_1_0:1.11.0.6
	TIGRIS_1_0_0:1.11
	TIGRIS_1_0_0_RC1:1.11.0.2
	dlr:1.1.1
	TIGRIS_0_9_2_4:1.4
	TIGRIS_0_9_2_3:1.4
	HELM_PEER_PORT_BRANCH:1.1.1.2
	TURBINE_PEER:1.7
	TIGRIS_0_9_2_1:1.7
	TIGRIS_0_9_2:1.4.0.2
	TIGRIS_0_9_0:1.2.0.2
	TIGRIS_0_8_4:1.1.1.1.0.2
	NEWHELM:1.1.1.1
	TIGRIS_NOV_12_2000:1.1.1;
locks; strict;
comment	@# @;


1.15
date	2001.08.11.09.08.02;	author dlr;	state Exp;
branches;
next	1.14;

1.14
date	2001.07.19.19.46.15;	author dlr;	state Exp;
branches;
next	1.13;

1.13
date	2001.07.18.10.05.13;	author dlr;	state Exp;
branches;
next	1.12;

1.12
date	2001.05.23.01.50.12;	author dlr;	state Exp;
branches;
next	1.11;

1.11
date	2001.03.06.04.06.21;	author elicia;	state Exp;
branches;
next	1.10;

1.10
date	2001.02.23.22.36.36;	author jody;	state Exp;
branches;
next	1.9;

1.9
date	2001.02.21.01.08.22;	author dlr;	state Exp;
branches;
next	1.8;

1.8
date	2001.02.05.23.39.44;	author dlr;	state Exp;
branches;
next	1.7;

1.7
date	2001.01.26.18.29.04;	author edk;	state Exp;
branches
	1.7.2.1;
next	1.6;

1.6
date	2001.01.26.05.24.06;	author edk;	state dead;
branches;
next	1.5;

1.5
date	2001.01.24.20.42.48;	author dlr;	state Exp;
branches;
next	1.4;

1.4
date	2001.01.12.23.23.03;	author dlr;	state Exp;
branches;
next	1.3;

1.3
date	2001.01.08.23.25.02;	author dlr;	state Exp;
branches;
next	1.2;

1.2
date	2000.12.13.23.12.52;	author elicia;	state Exp;
branches;
next	1.1;

1.1
date	2000.11.12.21.15.47;	author dlr;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2000.11.12.21.15.47;	author dlr;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2001.02.21.00.32.37;	author dlr;	state Exp;
branches;
next	;

1.7.2.1
date	2001.01.28.01.02.18;	author dlr;	state dead;
branches;
next	1.7.2.2;

1.7.2.2
date	2001.02.01.16.37.42;	author leonardr;	state Exp;
branches;
next	1.7.2.3;

1.7.2.3
date	2001.02.12.16.24.31;	author leonardr;	state Exp;
branches;
next	1.7.2.4;

1.7.2.4
date	2001.02.15.20.50.37;	author leonardr;	state Exp;
branches;
next	1.7.2.5;

1.7.2.5
date	2001.02.20.00.07.35;	author dlr;	state Exp;
branches;
next	;


desc
@@


1.15
log
@Upgrading to Turbine 3.0-dev, Fulcrum 1.0, and Torque 1.0.
@
text
@/* ================================================================
 * Copyright (c) 2000-2001 CollabNet.  All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 * 
 * 1. Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 * 
 * 2. Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * 
 * 3. The end-user documentation included with the redistribution, if
 * any, must include the following acknowlegement: "This product includes
 * software developed by CollabNet (http://www.collab.net/)."
 * Alternately, this acknowlegement may appear in the software itself, if
 * and wherever such third-party acknowlegements normally appear.
 * 
 * 4. The hosted project names must not be used to endorse or promote
 * products derived from this software without prior written
 * permission. For written permission, please contact info@@collab.net.
 * 
 * 5. Products derived from this software may not use the "Tigris" name
 * nor may "Tigris" appear in their names without prior written
 * permission of CollabNet.
 * 
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL COLLABNET OR ITS CONTRIBUTORS BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * ====================================================================
 * 
 * This software consists of voluntary contributions made by many
 * individuals on behalf of CollabNet.
 */

package org.tigris.helm.mypages;

import java.io.*;
import java.util.*;

import org.apache.turbine.util.Log;
import org.apache.commons.util.exception.NestableException;

import org.apache.velocity.context.Context;

import org.tigris.helm.util.Counter;
import org.tigris.helm.security.AccessControlList;
import org.tigris.helm.security.HelmServlet;
import org.tigris.helm.security.RedirectException;

public class StartPage extends HelmServlet
{
    protected String processRequest(Context context)
        throws NestableException, RedirectException
    {
        String templateName = super.processRequest(context);
	    context.put("counter", new Counter());
        return templateName;
    }
}
@


1.14
log
@Removed Joist references.
@
text
@d53 1
a53 1
import org.apache.turbine.util.TurbineException;
d65 1
a65 1
        throws TurbineException, RedirectException
@


1.13
log
@Ported Joist Redirect*Exception to Helm.
@
text
@a50 2
import java.util.List;
import java.sql.*;
d54 1
a54 1
import org.apache.turbine.util.TurbineException;
d57 2
a58 3
import org.joist.*;
import org.joist.util.*;

a60 1
import org.tigris.helm.security.AccessControlList;
d68 1
a68 1
	    context.put ("counter", new Counter());
@


1.12
log
@Ported Helm from WebMacro to Velocity.
@
text
@d63 1
a63 1
import org.joist.security.RedirectException;
@


1.11
log
@removed old, pre-port commented out code
@
text
@d55 3
a57 1
import org.webmacro.servlet.*;
d68 2
a69 2
    protected String processRequest (Connection connection, WebContext context)
        throws HandlerException, RedirectException
d71 1
a71 1
        String templateName = super.processRequest (connection, context);
@


1.10
log
@stealthfully instantiated a counter from joist.utill to compact hosted categories. :jody
PR:
Obtained from:
Submitted by:
Reviewed by:
@
text
@a65 3
    /**
     *  Display and process the login screen.
     */
d70 1
a70 45
	context.put ("counter", new Counter());
        List projects;
        int unapprovedProjectsSize;
        ArrayList newsItemList = new ArrayList();

        /*        try
        {
            String domainID = super.getCurrentDomain (context).getID ();
            User loginUser = super.getLoginUser (context);
            String loginUserID = super.getLoginUser (context).getID ();

            // Get news items for the projects that the user is a member of.
            newsItemSet = newsMgr.getNewsItemsForUser (connection, loginUserID);
            if (newsItemSet.size () != 0)
            {
                for (int i = 0; i < newsItemSet.size(); i++)
                {
                    Record r = newsItemSet.getRecord(i);
                    String newsID =  r.getStringValue("NEWS_ID");
                    newsItemList.add(new NewsItem(connection, dMgr, newsID));
                }
                context.put ("newsItems", newsItemList);
                context.put ("counter", new Counter());
            }

            // Get unapproved projects awaiting approval.
            if (getACL(context, connection)
                .hasPermission("Project - Approve", domainID))
            {
                unapprovedProjectsSize = 
                    pMgr.getUnapprovedProjectsForDomain(connection, 
                                                        domainID).size();
                context.put("unapprovedProjectsSize", 
                            Integer.toString(unapprovedProjectsSize));
            }
        }
        catch (Exception e)
        {
            log.exception (e);
            String message = "StartPage" + e.getMessage ();
            if (debug)
                log.debug (message);
            context.put ("message", message);
            }*/

@


1.9
log
@This is the highest revision from the HELM_PEER_PORT_BRANCH.  The previous import caused too many conflicts to resolve manually
@
text
@d73 1
a73 1

@


1.8
log
@go away
@
text
@d2 1
a2 1
 * Copyright (c) 2000 CollabNet.  All rights reserved.
d17 1
a17 1
 * software developed by Collab.Net (http://www.Collab.Net/)."
d27 1
a27 1
 * permission of Collab.Net.
d54 1
a54 1
import org.webmacro.util.Log;
a56 2
import com.workingdogs.village.*;

a60 2
import org.tigris.helm.domain.*;
import org.tigris.helm.project.Project;
a61 1
import org.tigris.helm.database.*;
a65 3
    private static Log log = new Log ("StartPage", "Tigris StartPage");
    private static boolean debug = true;

a71 2
        if (debug) log.debug("started");

a72 10
        String action = (String) context.get ("action");
        if (debug)
            log.debug ("StartPage: action=" + action);

        UserRoleProjectManager urpMgr = (UserRoleProjectManager)
            dMgr.getManager ("org.tigris.helm.database.UserRoleProjectManager");
        ProjectNewsManager newsMgr = (ProjectNewsManager)
            dMgr.getManager ("org.tigris.helm.database.ProjectNewsManager");
        ProjectManager pMgr = (ProjectManager)
            dMgr.getManager ("org.tigris.helm.database.ProjectManager");
a74 1
        DataSet newsItemSet;
d78 1
a78 1
        try
d100 1
a100 1
                .hasPermissionForDomain("Project - Approve", domainID))
d116 1
a116 1
        }
@


1.7
log
@readding all the files as part of the process of returning to the way
things were as of tuesday
@
text
@a70 2
    public static final String versionID =
        "$Id: StartPage.java,v 1.4 2001/01/12 23:23:03 dlr Exp $";
@


1.7.2.1
log
@Porting to the Turbine Peer system.  -dlr and leonardr
@
text
@d72 1
a72 1
        "$Id: StartPage.java,v 1.7 2001/01/26 18:29:04 edk Exp $";
@


1.7.2.2
log
@Added minimal startpage.
@
text
@d17 1
a17 1
 * software developed by CollabNet (http://www.collab.net/)."
d27 1
a27 1
 * permission of CollabNet.
d54 1
a54 1
import org.apache.turbine.util.Log;
d57 2
d63 2
d66 1
d73 2
d82 2
d85 10
d97 1
d101 1
a101 1
        /*        try
d139 1
a139 1
            }*/
@


1.7.2.3
log
@Changed code to no longer use deprecated methods.
@
text
@d67 1
a67 1
        "$Id: StartPage.java,v 1.7.2.2 2001/02/01 16:37:42 leonardr Exp $";
d103 1
a103 1
                .hasPermission("Project - Approve", domainID))
@


1.7.2.4
log
@Normalized copyright dates.
@
text
@d2 1
a2 1
 * Copyright (c) 2000-2001 CollabNet.  All rights reserved.
d67 1
a67 1
        "$Id: StartPage.java,v 1.7.2.3 2001/02/12 16:24:31 leonardr Exp $";
@


1.7.2.5
log
@Begone, hideous versionID!
@
text
@d66 3
@


1.6
log
@revert this stuff to its state as of 2001/01/24 12:42:00 GMT -- with
the following exceptions, which have some different modifications so
they'll work with changes which have happened in joist:

ProjectNewsEdit.java
SkinManager.java
SkinStyleElementValueManager.java
StyleElementManager.java
StyleManager.java

it compiles.  i dunno if it works, though.
@
text
@d72 1
a72 1
        "$Id: StartPage.java,v 1.5 2001/01/24 20:42:48 dlr Exp $";
d77 1
a77 1
     * Display the start page.
d89 2
a104 6
            /* NOTE: Untested...
            if (loginUser == User.getGuest())
            {
                redirectTo("DomainHome");
            }
            */
@


1.5
log
@Making use of DBException.
@
text
@d72 1
a72 1
        "$Id: StartPage.java,v 1.4 2001/01/12 23:23:03 dlr Exp $";
@


1.4
log
@Switched to standard 4 column indent.  No other change.
@
text
@d72 1
a72 1
        "$Id: StartPage.java,v 1.3 2001/01/08 23:25:02 dlr Exp $";
d77 1
a77 1
     *  Display and process the login screen.
a88 2
        UserRoleProjectManager urpMgr = (UserRoleProjectManager)
            dMgr.getManager ("org.tigris.helm.database.UserRoleProjectManager");
d103 6
@


1.3
log
@Corrected a bunch of regressions to previous User instantion method.  Deprecated User's getUserID() method in favor of getID() for better conformance with BusinessObject interface and orthoginality with other business objects.  Added a guest user and interface.  Added some JavaDoc to User.
@
text
@d32 1
a32 1
 * IN NO EVENT SHALL COLLAB.NET OR ITS CONTRIBUTORS BE LIABLE FOR ANY
d71 4
a74 4
  public static final String versionID =
    "$Id: StartPage.java,v 1.2 2000/12/13 23:12:52 elicia Exp $";
  private static Log log = new Log ("StartPage", "Tigris StartPage");
  private static boolean debug = true;
d79 61
a139 21
  protected String processRequest (Connection connection, WebContext context)
    throws HandlerException, RedirectException
  {
    if (debug) log.debug("started");

    String templateName = super.processRequest (connection, context);
    String action = (String) context.get ("action");
    if (debug)
        log.debug ("StartPage: action=" + action);

    UserRoleProjectManager urpMgr = (UserRoleProjectManager)
      dMgr.getManager ("org.tigris.helm.database.UserRoleProjectManager");
    ProjectNewsManager newsMgr = (ProjectNewsManager)
      dMgr.getManager ("org.tigris.helm.database.ProjectNewsManager");
    ProjectManager pMgr = (ProjectManager)
      dMgr.getManager ("org.tigris.helm.database.ProjectManager");

    List projects;
    DataSet newsItemSet;
    int unapprovedProjectsSize;
    ArrayList newsItemList = new ArrayList();
d141 1
a141 30
    try
    {
      String domainID = super.getCurrentDomain (context).getID ();
      User loginUser = super.getLoginUser (context);
      String loginUserID = super.getLoginUser (context).getID ();

      // Get news items for the projects that the user is a member of.
      newsItemSet = newsMgr.getNewsItemsForUser (connection, loginUserID);
      if (newsItemSet.size () != 0)
      {
          for (int i = 0; i < newsItemSet.size(); i++)
          {
              Record r = newsItemSet.getRecord(i);
              String newsID =  r.getStringValue("NEWS_ID");
	          newsItemList.add(new NewsItem(connection, dMgr, newsID));
          }
	  context.put ("newsItems", newsItemList);
	  context.put ("counter", new Counter());
      }

       // Get unapproved projects awaiting approval.
       if (getACL(context, connection)
           .hasPermissionForDomain("Project - Approve", domainID))
       {
           unapprovedProjectsSize = 
	       pMgr.getUnapprovedProjectsForDomain(connection, 
	                                           domainID).size();
	   context.put("unapprovedProjectsSize", 
	                Integer.toString(unapprovedProjectsSize));
       }
a142 11
    catch (Exception e)
    {
      log.exception (e);
      String message = "StartPage" + e.getMessage ();
      if (debug)
	  log.debug (message);
        context.put ("message", message);
    }

    return templateName;
  }
@


1.2
log
@calling NewsItem constructor by newsId instead of by record
@
text
@d72 1
a72 1
    "$Id: StartPage.java,v 1.1.1.1 2000/11/12 21:15:47 dlr Exp $";
d105 1
a105 1
      String loginUserID = super.getLoginUser (context).getUserID ();
@


1.1
log
@Initial revision
@
text
@d72 1
a72 1
    "$Id: StartPage.java,v 1.15 2000/11/11 03:33:32 dlr Exp $";
d114 2
a115 1
	      newsItemList.add(new NewsItem(connection, dMgr, r));
@


1.1.1.1
log
@Merging newhelm tree into helm, as per IZ issue #557.  Previous major version of helm is tagged TIGRIS_NOV_11_2000.
@
text
@@


1.1.1.2
log
@Replacing the HEAD with the HELM_PEER_PORT_BRANCH.
@
text
@d2 1
a2 1
 * Copyright (c) 2000-2001 CollabNet.  All rights reserved.
d17 1
a17 1
 * software developed by CollabNet (http://www.collab.net/)."
d27 1
a27 1
 * permission of CollabNet.
d32 1
a32 1
 * IN NO EVENT SHALL COLLABNET OR ITS CONTRIBUTORS BE LIABLE FOR ANY
d54 1
a54 1
import org.apache.turbine.util.Log;
d57 2
d63 2
d66 1
d71 5
d79 53
a131 2
    protected String processRequest (Connection connection, WebContext context)
        throws HandlerException, RedirectException
d133 6
a138 1
        String templateName = super.processRequest (connection, context);
d140 2
a141 46
        List projects;
        int unapprovedProjectsSize;
        ArrayList newsItemList = new ArrayList();

        /*        try
        {
            String domainID = super.getCurrentDomain (context).getID ();
            User loginUser = super.getLoginUser (context);
            String loginUserID = super.getLoginUser (context).getID ();

            // Get news items for the projects that the user is a member of.
            newsItemSet = newsMgr.getNewsItemsForUser (connection, loginUserID);
            if (newsItemSet.size () != 0)
            {
                for (int i = 0; i < newsItemSet.size(); i++)
                {
                    Record r = newsItemSet.getRecord(i);
                    String newsID =  r.getStringValue("NEWS_ID");
                    newsItemList.add(new NewsItem(connection, dMgr, newsID));
                }
                context.put ("newsItems", newsItemList);
                context.put ("counter", new Counter());
            }

            // Get unapproved projects awaiting approval.
            if (getACL(context, connection)
                .hasPermission("Project - Approve", domainID))
            {
                unapprovedProjectsSize = 
                    pMgr.getUnapprovedProjectsForDomain(connection, 
                                                        domainID).size();
                context.put("unapprovedProjectsSize", 
                            Integer.toString(unapprovedProjectsSize));
            }
        }
        catch (Exception e)
        {
            log.exception (e);
            String message = "StartPage" + e.getMessage ();
            if (debug)
                log.debug (message);
            context.put ("message", message);
            }*/

        return templateName;
    }
@

