head	1.11;
access;
symbols
	TIGRIS_1_1_0RC2:1.4
	TIGRIS_1_1_0RC1:1.4
	TIGRIS_1_1:1.4.0.4
	TIGRIS_1_0_8:1.4
	TIGRIS_1_0_8RC3:1.4
	TIGRIS_1_0_8RC2:1.4
	TIGRIS_1_0_8RC1:1.4
	TIGRIS_1_0_7:1.4
	TIGRIS_1_0_7RC3:1.4
	TIGRIS_1_0_7RC2:1.4
	TIGRIS_1_0_7RC1:1.4
	TIGRIS_1_0_6:1.4
	TIGRIS_1_0_6RC5:1.4
	TIGRIS_1_0_6RC4:1.4
	TIGRIS_1_0_6RC3:1.4
	TIGRIS_1_0_6RC2:1.4
	TIGRIS_1_0_6RC1:1.4
	TIGRIS_1_0_5:1.4
	TIGRIS_1_0_5RC6:1.4
	TIGRIS_1_0_5RC5:1.4
	TIGRIS_1_0_5RC4:1.4
	TIGRIS_1_0_5RC3:1.4
	TIGRIS_1_0_5RC2:1.4
	TIGRIS_1_0_5RC1:1.4
	TIGRIS_1_0_4:1.4
	TIGRIS_1_0_3:1.4
	TIGRIS_1_0_2:1.4
	TIGRIS_1_0_1:1.4
	TIGRIS_1_0:1.4.0.6
	TIGRIS_1_0_0:1.4
	TIGRIS_1_0_0_RC1:1.4.0.2
	dlr:1.1.1
	TIGRIS_0_9_2_4:1.1
	TIGRIS_0_9_2_3:1.1
	HELM_PEER_PORT_BRANCH:1.1.1.1
	TURBINE_PEER:1.3
	TIGRIS_0_9_2_1:1.3
	TIGRIS_0_9_2:1.1.0.6
	TIGRIS_0_9_0:1.1.0.4
	TIGRIS_0_8_4:1.1.0.2;
locks; strict;
comment	@# @;


1.11
date	2001.07.30.17.56.58;	author dlr;	state Exp;
branches;
next	1.10;

1.10
date	2001.07.27.21.33.54;	author susank;	state Exp;
branches;
next	1.9;

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

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

1.7
date	2001.05.25.21.40.35;	author dlr;	state Exp;
branches;
next	1.6;

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

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

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

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

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

1.1
date	2000.11.15.01.40.09;	author susank;	state Exp;
branches
	1.1.1.1;
next	;

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

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

1.3.2.2
date	2001.01.31.02.55.12;	author dlr;	state Exp;
branches;
next	1.3.2.3;

1.3.2.3
date	2001.02.15.20.50.44;	author leonardr;	state Exp;
branches;
next	;


desc
@@


1.11
log
@Made web root a hook method.
@
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 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 CollabNet.
 */

package org.tigris.helm.tool;

import java.io.File;

import org.apache.turbine.util.Log;

/**
 * Determines whether or not help include file exists.  Final for performance
 * boost only.
 *
 * @@author <a href="mailto:susank@@collab.net">Susan K.</a>
 * @@author <a href="mailto:dlr@@collab.net">Daniel Rall</a>
 */
public class ServletHelp extends ServletHtdoc
{
    private static final String WEB_ROOT = "www/www/includes";

    private static final String HELP_SNIPPET = "Help.vm";

    /**
     * Creates a new instance for the provided document root.
     */
    public ServletHelp(String documentRoot)
    {
        super(documentRoot);
    }

    /**
     * @@deprecated Use available(servletName) instead of helpExists(fileName).
     */
    public Boolean helpExists(String fileName)
    {
        File f = new File(fileName);
        Log.debug("ServletHelp: File " + fileName +
                  (f.exists() ? " exists" : " does not exist"));
        return (f.exists() ? Boolean.TRUE : Boolean.FALSE);
    }

    /**
     * @@see org.tigris.helm.tool.ServletHtdoc#getWebRoot()
     */
    protected final String getWebRoot()
    {
        return WEB_ROOT;
    }

    /**
     * @@see org.tigris.helm.tool.ServletHtdoc#getServletNamePostfix()
     */
    protected final String getServletNamePostfix()
    {
        return HELP_SNIPPET;
    }
}
@


1.10
log
@changing help stickies into included velocity files.  Changed the directory where they live to www/www/includes (from www/www/docs) and their extension to .vm (from .html)
Issue number:
Obtained from:
Submitted by:
Reviewed by:
@
text
@d62 2
d83 8
@


1.9
log
@No @@link markup necessary in a @@see.
@
text
@d62 1
a62 1
    private static final String HELP_SNIPPET = "Help.html";
@


1.8
log
@Introduced ServletHtdoc abstract base class to remove code duplicated between ServletHelp and ServletTaskBar, leveraging the OO features of the Java language.
@
text
@d84 1
a84 1
     * @@see {@@link org.tigris.helm.tool.ServletHtdoc#getServletNamePostfix()}
@


1.7
log
@Everything's working, so debugging can be turned off for the time
being.
@
text
@d60 1
a60 1
public class ServletHelp
a61 1
    private static final String WEBSITE_DOCS = "www/www/docs";
a62 3
    private static final boolean DEBUG = false;

    private String documentRoot;
d69 1
a69 1
        this.documentRoot = documentRoot;
d84 1
a84 23
     * Returns whether help for the supplied servlet is available.
     */
    public Boolean available(String servletName)
    {
        return (getHelpFile(servletName).exists() ?
                Boolean.TRUE : Boolean.FALSE);
    }

    /**
     * Returns the template path to the help file for the specified servlet.
     *
     * @@param servletName The servlet to get a help file path for.
     * @@param             A help file path.
     */
    public String getPath(String servletName)
    {
        return WEBSITE_DOCS + File.separatorChar + servletName + HELP_SNIPPET;
    }

    /**
     * Returns a {@@link java.io.File} object corresponding to the
     * absolute path to the help file associated with the supplied
     * servlet name.
d86 1
a86 1
    private final File getHelpFile(String servletName)
d88 1
a88 8
        String fileName = documentRoot + File.separatorChar +
            getPath(servletName);
        if (DEBUG)
        {
            Log.debug("ServletHelp: File name for '" + servletName + "' is '" +
                      fileName + '\'');
        }
        return new File(fileName);
@


1.6
log
@New template help interface which reads a lot better a requires less
work in the templates.
@
text
@d64 1
a64 1
    private static final boolean DEBUG = true;
@


1.5
log
@Added ctor and getHelpFileName() method.
@
text
@d51 2
d60 1
a60 1
public final class ServletHelp
d62 1
a62 1
    private static final String WEBSITE_DOCS = "/www/www/docs/";
d64 1
d68 3
d76 3
d82 2
d87 26
a112 1
    public final String getHelpFileName(String servletName)
d114 8
a121 2
        return (documentRoot + File.separatorChar + WEBSITE_DOCS +
                File.separatorChar + servletName + HELP_SNIPPET);
@


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

d48 1
d52 2
a53 1
 * Determines whether or not Help include file exists.
d55 2
a56 1
 * @@author Susank
d58 1
a58 1
public class ServletHelp
d60 6
a65 1
    public Boolean helpExists(String filename) 
d67 13
a79 2
	File f = new File(filename);
        return new Boolean( f.exists() );
a81 1

@


1.3
log
@readding all the files as part of the process of returning to the way
things were as of tuesday
@
text
@d3 1
a3 1
 * Copyright (c) 2000 CollabNet.  All rights reserved.
@


1.3.2.1
log
@Porting to the Turbine Peer system.  -dlr and leonardr
@
text
@@


1.3.2.2
log
@Determines whether or not Help include file exists.
@
text
@@


1.3.2.3
log
@Normalized copyright dates.
@
text
@d3 1
a3 1
 * Copyright (c) 2000-2001 CollabNet.  All rights reserved.
@


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


1.1
log
@created this awesome thing to check to see if a file exists, for use by contextual help in the left nav. don't worry, dlr helped me
PR:
Obtained from:
Submitted by:
Reviewed by:
@
text
@@


1.1.1.1
log
@Replacing the HEAD with the HELM_PEER_PORT_BRANCH.
@
text
@d3 1
a3 1
 * Copyright (c) 2000-2001 CollabNet.  All rights reserved.
@


