CLHelp.java :  » Source-Control » sourcejammer » org » sourcejammer » client » commandline » Java Open Source

Java Open Source » Source Control » sourcejammer 
sourcejammer » org » sourcejammer » client » commandline » CLHelp.java
/*
 *  Copyright (C) 2001, 2002 Robert MacGrogan
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 *
 * $Archive: SourceJammer$
 * $FileName: CLHelp.java$
 * $FileID: 4193$
 *
 * Last change:
 * $AuthorName: Rob MacGrogan$
 * $Date: 4/23/03 5:04 PM$
 * $Comment: Replaced GPL header with LGPL header.$
 *
 * $KeyWordsOff: $
 */

package org.sourcejammer.client.commandline;

/**
 * Title:        SourceJammer 1.1
 * Copyright:    Copyright (c) 2002
 * @author Robert MacGrogan
 * @version 1.0
 */
/**
 * Builds the help document for the command line.
 */
public class CLHelp {

  private static CLHelp instance = new CLHelp();
  private String text = null;
  private StringBuffer strText = null;

  private CLHelp() {
    strText = new StringBuffer();
    addLine("SourceJammer Command Line Command List.");

    // jbm change start
    // jbm
    // jbm add getproj command
    // jbm
    addLine("Version 1.3.0");
    // jbm
    // jbm change end

    addLine("SourceJammer is copyright (c) Robert MacGrogan 2001, 2002.");
    addLine("");
    addLine("Note: Items in brackets ([]) are required. Items is braces");
    addLine("({}) are optional.");
    addLine("");
    addLine("End of Line (EOL) types: The SourceJammer command line ");
    addLine("does not allow you to specify the eol type to use for a ");
    addLine("particular file. The command line always returns text files ");
    addLine("with the default eol type specified in your conf.xml.");
    addLine("");
    addLine("Current Local Directory: At any moment, the command line is ");
    addLine("pointing to a local directory on your file system. Any ");
    addLine("commands that involve sending files will send files from the ");
    addLine("current local directory. Any commands that involve retreiving ");
    addLine("files will retrieve files to the current local directory. The ");
    addLine("current local directory is changed with the lcd command (see ");
    addLine("below).");
    addLine("");
    addLine("Current Project: At any moment, the command line is pointing ");
    addLine("to project in the archive on the server. Any commands that ");
    addLine("involve sending files will send files to the current project. ");
    addLine("Any commands that involve retreiving files will retrieve files ");
    addLine("from the current project. The current project is changed with ");
    addLine("the cd command (see below).");
    addLine("");
    addLine("Connection: All of the following commands require you to be ");
    addLine("connected to an archive except mkarchd and help.");
    addLine("");
    addLine("Commands and options are separated with single spaces. If the ");
    addLine("text you want to use for an option contains spaces, you should ");
    addLine("enclose it in double quotes (\"\").");
    addLine("");
    addLine("  addfile [NAME] {b/t}        Add file in Current Local Directory with ");
    addLine("                                name NAME to Current Project in archive. ");
    addLine("                                b specifies a binary file. t specifies a ");
    addLine("                                text file.");
    addLine("  addfile * {b/t}             Adds all files in Current Local Directory ");
    addLine("                                to Current Project in archive. b ");
    addLine("                                specifies a binary file. t specifies a ");
    addLine("                                text file.");
    addLine("  cd [PATH]                   Changes Current Project to the project at ");
    addLine("                                the specified path. ");
    addLine("  chpwd [PWD]                 Change your password on the SourceJammer ");
    addLine("                                server to [PWD].");
    addLine("  ckin [NAME] {COMMENT}       Check in the file with the specified NAME, ");
    addLine("                                and associating the specified COMMENT.");
    addLine("  ckout [NAME]                Check out the file with the specified NAME.");
    addLine("  ckun [NAME]                 Undo checkout of the file with the ");
    addLine("                                specified NAME.");
    addLine("  con [USER] [PWD] [ARCH]     Connect to the specified archive (ARCH) ");
    addLine("                                using the specified user name (USER) and ");
    addLine("                                password (PWD).");
    addLine("  delrm [NUM]                 Permanently delete from the Current ");
    addLine("                                Project a file or project that was ");
    addLine("                                previously removed. Use the viewrm ");
    addLine("                                command to see a list of removed items.");
    addLine("  discon                      Disconnect from the SourceJammer server.");
    addLine("  get [NAME]                  Gets the latest version of the file with ");
    addLine("                                name NAME to your local file system.");
    addLine("  get *                       Gets all the files in the Current Project ");
    addLine("                                to your local file system.");
    addLine("  getlbl [LABEL] {VERSION}    Get the labeled version from the archive ");
    addLine("                                with the name LABEL. Specify a VERSION");
    addLine("                                to get a specific previous version.");

    // jbm change start
    // jbm
    // jbm add getproj command
    // jbm
    addLine("  getproj {[PATH] {[r|nr] { [d|nd] {v|nv} } ] } ");
    addLine("                                    Gets all the files in the specified ");
    addLine("                                    project path to your local file system. ");
    addLine("                                    Optionally recurse all associated projects, ");
    addLine("                                    optionally creating matching directories ");
    addLine("                                    in your local file system and optionally verify");
    addLine("                                    that the files are checked in.  All parameters ");
    addLine("                                    are optional.  Defaults to Current Project (.) ");
    addLine("                                    recurse (r) make directories (d) and do not ");
    addLine("                                    verify checked in (nv)");
    // jbm
    // jbm change end

    addLine("  getver [NAME] [VERSION]     Get the version number VERSION of file ");
    addLine("                                with name NAME.");
    addLine("  help                        View this document.");
    addLine("  lcd [PATH]                  Change the Current Local Directory to the ");
    addLine("                                PATH specified.");
    addLine("  lls                         List the contents of the Current Local ");
    addLine("                                Directory.");
    addLine("  ls                          List the contents of the Current Project.");
    addLine("  mkarch [ARCH]               Make a new archive on the SourceJammer ");
    addLine("                                server. ARCH is the name you want to give ");
    addLine("                                your archive.");
    addLine("  mkarchd [USER] [PWD] [ARCH] Make a new archive on the SourceJammer ");
    addLine("                                server while in disconnected mode. USER ");
    addLine("                                is your username, PWD is your password. ");
    addLine("                                ARCH is the name of the new archive.");
    addLine("  mklbl [LABEL] [DESC]        Make a new labeled version on the archive, ");
    addLine("                                with the Current Project as the root ");
    addLine("                                project of the labeled version. LABEL is ");
    addLine("                                the name of the new labeled version. ");
    addLine("                                DESC is a description.");
    addLine("  mkproj [PROJ]               Make a new project named PROJ in the ");
    addLine("                                Current Project.");
    addLine("  mkuser [USER] [PWD] [FULL]  Make a new user on the SourceJammer server ");
    addLine("                                where USER is the new user's name, PWD ");
    addLine("                                is the password and FULL is the user's ");
    addLine("                                full name.");
    addLine("  quit                        Exits from the SourceJammer command line.");
    addLine("  rback [NAME] [VERSION]      Rollback the file named NAME to version ");
    addLine("                                number VERSION. ");
    addLine("  restore [NUM] {NEW NAME}    Restore removed item number NUM from the ");
    addLine("                                Current Project using the NEW NAME (if ");
    addLine("                                specified). Use viewrm to view the ");
    addLine("                                removed items in the Current Project.");
    addLine("  rm [NAME]                   Remove the file or project named NAME from ");
    addLine("                                the Current Project.");
    addLine("  rnm [NAME] [NEW NAME]       Rename the file or project named NAME to ");
    addLine("                                NEW NAME.");
    addLine("  vercom [NAME] [VERSION]     View the comment for version number ");
    addLine("                                VERSION of file NAME.");
    addLine("  viewrm                      View a list of items removed from the ");
    addLine("                                Current Project.");
    addLine("");

    text = strText.toString();
    strText = null;
  }

  private void addLine(String s){
    strText.append(s).append("\r\n");
  }


  public static String getText(){
    return instance.text;
  }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.