head	1.8;
access;
symbols
	TIGRIS_1_1_0RC2:1.3
	TIGRIS_1_1_0RC1:1.3
	TIGRIS_1_1:1.3.0.6
	TIGRIS_1_0_8:1.3
	TIGRIS_1_0_8RC3:1.3
	TIGRIS_1_0_8RC2:1.3
	TIGRIS_1_0_8RC1:1.3
	TIGRIS_1_0_7:1.3
	TIGRIS_1_0_7RC3:1.3
	TIGRIS_1_0_7RC2:1.3
	TIGRIS_1_0_7RC1:1.3
	TIGRIS_1_0_6:1.3
	TIGRIS_1_0_6RC5:1.3
	TIGRIS_1_0_6RC4:1.3
	TIGRIS_1_0_6RC3:1.3
	TIGRIS_1_0_6RC2:1.3
	TIGRIS_1_0_6RC1:1.3
	TIGRIS_1_0_5:1.3
	TIGRIS_1_0_5RC6:1.3
	TIGRIS_1_0_5RC5:1.3
	TIGRIS_1_0_5RC4:1.3
	TIGRIS_1_0_5RC3:1.3
	TIGRIS_1_0_5RC2:1.3
	TIGRIS_1_0_5RC1:1.3
	TIGRIS_1_0_4:1.3
	TIGRIS_1_0_3:1.3
	TIGRIS_1_0_2:1.3
	TIGRIS_1_0_1:1.3
	TIGRIS_1_0:1.3.0.8
	TIGRIS_1_0_0:1.3
	TIGRIS_1_0_0_RC1:1.3.0.4
	TIGRIS_0_9_2_4:1.1.1.1
	TIGRIS_0_9_2_3:1.1.1.1
	HELM_PEER_PORT_BRANCH:1.3.0.2
	TURBINE_PEER:1.3
	TIGRIS_0_9_2_1:1.3
	TIGRIS_0_9_2:1.1.1.1.0.6
	TIGRIS_0_9_0:1.1.1.1.0.4
	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.8
date	2001.08.11.09.08.07;	author dlr;	state Exp;
branches;
next	1.7;

1.7
date	2001.08.08.22.40.46;	author jrobbins;	state Exp;
branches;
next	1.6;

1.6
date	2001.07.19.19.36.29;	author dlr;	state Exp;
branches;
next	1.5;

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

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

1.3
date	2001.01.26.18.29.07;	author edk;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	2001.01.26.05.24.07;	author edk;	state dead;
branches;
next	1.1;

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

1.1.1.1
date	2000.11.12.21.16.23;	author dlr;	state Exp;
branches;
next	;

1.3.2.1
date	2001.01.28.01.02.19;	author dlr;	state dead;
branches;
next	;


desc
@@


1.8
log
@Upgrading to Turbine 3.0-dev, Fulcrum 1.0, and Torque 1.0.
@
text
@/* ================================================================
 * Copyright (c) 2000 Collab.Net.  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 Collab.Net <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" or
 * "Scarab" names nor may "Tigris" or "Scarab" appear in their names without
 * prior written permission of Collab.Net.
 *
 * 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 COLLAB.NET 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 Collab.Net.
 */

package org.tigris.helm.publish;

import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

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

import org.apache.velocity.context.Context;

import HTTPClient.*;

import org.tigris.helm.om.Project;
import org.tigris.helm.tool.breadcrumbs.BreadCrumbElement;

import org.tigris.helm.publish.ProxyModule;
import org.tigris.helm.publish.NoodleResources;
import org.apache.turbine.util.Log;

/**
 * An CvsWeb specialization on HelmNoodle.
 *
 * Does little but call it's parent.
 * 
 * @@author <a href="mailto:stack@@collab.net">St.Ack</a>
 * @@author <a href="mailto:jrobbins@@collab.net">Jason Robbisn</a>
 * @@author <a href="mailto:dlr@@collab.net">Daniel Rall</a>
 * @@version $Id: CvswebHelmNoodle.java,v 1.7 2001/08/08 22:40:46 jrobbins Exp $
 * @@see org.tigris.helm.publish.HelmNoodle
 * @@see <a href="http://projects.collab.net/project/eng/stack/projects/securenoodle/">SecureNoodle: Problem Statement, Requirements, Survey, Decisions and Testing</a>
 */
public class CvswebHelmNoodle extends HelmNoodle
{
    /**
     * Noodle Servlet
     * @@return String name of this servlet.
     */
    public final String getServletInfo()
    {
        return "CvswebHelmNoodle Servlet";
    }

    protected void computeToolCrumbs(Context ctx, String page)
    {
        StringTokenizer st = new StringTokenizer(page, "/");

        // Skip "/source/browse/[project name]" portion.
        if (st.hasMoreElements()) st.nextToken();
        if (st.hasMoreElements()) st.nextToken();
        if (st.hasMoreElements()) st.nextToken();

        List toolCrumbs = new ArrayList();
        Project currentProject = getCurrentProject(ctx);
        String uri = "/source/browse/" + currentProject.getName();
        while (st.hasMoreElements())
        {
            String name = st.nextToken();
            uri += name;
            if (st.hasMoreElements()) 
            {
                uri += "/";
            }
            else
            {
                // No URI.
                uri = "";
            }
            if (name.endsWith(".html"))
            {
                name = name.substring(0, name.length() - 5);
            }
            toolCrumbs.add(new BreadCrumbElement(name, uri));
        }
        ctx.put("toolCrumbs", toolCrumbs);
    }
}
@


1.7
log
@adding better support for breadcrumbs
@
text
@d49 3
a51 1
import java.util.*;
d53 1
a53 2
import org.apache.turbine.util.Log;
import org.apache.turbine.util.TurbineException;
d64 1
d72 4
a75 2
 * @@version $Id: CvswebHelmNoodle.java,v 1.6 2001/07/19 19:36:29 dlr Exp $
 * @@see HelmNoodle
d89 3
d93 4
d98 1
a98 3

    protected void computeToolCrumbs(Context ctx, String page) 
    {
a99 2
        Vector toolCrumbs = new Vector();
        StringTokenizer st = new StringTokenizer(page, "/");
d101 2
a102 6
        BreadCrumbElement bce;
        String junk;
        if (st.hasMoreElements()) junk = st.nextToken();
        if (st.hasMoreElements()) junk = st.nextToken();
        if (st.hasMoreElements()) junk = st.nextToken();
        while (st.hasMoreElements()) {
d106 1
d108 1
d110 2
d113 6
a118 3
            if (name.endsWith(".html")) name = name.substring(0, name.length()-5);
            bce = new BreadCrumbElement(name, uri);
            toolCrumbs.addElement(bce);
a121 3



@


1.6
log
@Removed Joist references.
@
text
@d49 2
d58 3
d70 1
a70 1
 * @@version $Id: CvswebHelmNoodle.java,v 1.5 2001/07/19 19:28:53 dlr Exp $
d84 31
@


1.5
log
@Removed Joist references.
@
text
@a57 1
import org.joist.security.*;
d65 1
a65 1
 * @@version $Id: CvswebHelmNoodle.java,v 1.4 2001/05/23 01:50:19 dlr Exp $
@


1.4
log
@Ported Helm from WebMacro to Velocity.
@
text
@d56 2
a57 2
import org.joist.publish.ProxyModule;
import org.joist.publish.NoodleResources;
d66 1
a66 1
 * @@version $Id: CvswebHelmNoodle.java,v 1.3 2001/01/26 18:29:07 edk Exp $
@


1.3
log
@readding all the files as part of the process of returning to the way
things were as of tuesday
@
text
@d49 2
d52 1
a52 3
// Java Servlet Classes
import javax.servlet.*;
import javax.servlet.http.*;
a53 6
// Java Core Classes
import java.sql.*;

import org.webmacro.util.*;
import org.webmacro.servlet.*;
import org.joist.security.*;
a55 1
import org.tigris.helm.security.HelmServlet;
d58 1
d60 10
a69 12



/** An CvsWeb specialization on HelmNoodle.
*
* Does little but call it's parent.
* 
* @@author <a href="mailto:stack@@collab.net">St.Ack</a>
* @@version $Id: CvswebHelmNoodle.java,v 1.1.1.1 2000/11/12 21:16:23 dlr Exp $
* @@see HelmNoodle
* @@see <a href="http://projects.collab.net/project/eng/stack/projects/securenoodle/">SecureNoodle: Problem Statement, Requirements, Survey, Decisions and Testing</a>
*/
d72 5
a76 36
    /** Class version string
    */
    private static final String versionID
        = "$Id: CvswebHelmNoodle.java,v 1.1.1.1 2000/11/12 21:16:23 dlr Exp $";

    
    /** Logging object
    */
    static private Log log = new Log( "CWHNdl", "CvswebHelmNoodle" );


    /** Process the request.
    *
    * Does little but call parent method.
    *
    * @@param connection Connection to database
    * @@param context WebMacro context
    *
    * @@return The name of this template (?)
    *
    * @@exception HandlerException
    * @@exception RedirectException
    */
    protected String processRequest( Connection connection,
                                        WebContext context )
        throws HandlerException,
                RedirectException
    {
        return super.processRequest( connection, context );
    }


    /** Noodle Servlet
    * @@return String name of this servlet.
    */
    public String getServletInfo()
a80 2


@


1.3.2.1
log
@Porting to the Turbine Peer system.  -dlr and leonardr
@
text
@d74 1
a74 1
* @@version $Id: CvswebHelmNoodle.java,v 1.3 2001/01/26 18:29:07 edk Exp $
d83 1
a83 1
        = "$Id: CvswebHelmNoodle.java,v 1.3 2001/01/26 18:29:07 edk Exp $";
@


1.2
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
@d74 1
a74 1
* @@version $Id: CvswebHelmNoodle.java,v 1.1 2000/11/12 21:16:23 dlr Exp $
d83 1
a83 1
        = "$Id: CvswebHelmNoodle.java,v 1.1 2000/11/12 21:16:23 dlr Exp $";
@


1.1
log
@Initial revision
@
text
@d74 1
a74 1
* @@version $Id: CvswebHelmNoodle.java,v 1.1 2000/11/03 22:36:01 stack Exp $
d83 1
a83 1
        = "$Id: CvswebHelmNoodle.java,v 1.1 2000/11/03 22:36:01 stack Exp $";
@


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
@@
