001: /*
002: * Copyright (C) 2001, 2002 Robert MacGrogan
003: *
004: * This library is free software; you can redistribute it and/or
005: * modify it under the terms of the GNU Lesser General Public
006: * License as published by the Free Software Foundation; either
007: * version 2.1 of the License, or (at your option) any later version.
008: *
009: * This library is distributed in the hope that it will be useful,
010: * but WITHOUT ANY WARRANTY; without even the implied warranty of
011: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012: * Lesser General Public License for more details.
013: *
014: * You should have received a copy of the GNU Lesser General Public
015: * License along with this library; if not, write to the Free Software
016: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
017: *
018: *
019: * $Archive: SourceJammer$
020: * $FileName: CLHelp.java$
021: * $FileID: 4193$
022: *
023: * Last change:
024: * $AuthorName: Rob MacGrogan$
025: * $Date: 4/23/03 5:04 PM$
026: * $Comment: Replaced GPL header with LGPL header.$
027: *
028: * $KeyWordsOff: $
029: */
030:
031: package org.sourcejammer.client.commandline;
032:
033: /**
034: * Title: SourceJammer 1.1
035: * Copyright: Copyright (c) 2002
036: * @author Robert MacGrogan
037: * @version 1.0
038: */
039: /**
040: * Builds the help document for the command line.
041: */
042: public class CLHelp {
043:
044: private static CLHelp instance = new CLHelp();
045: private String text = null;
046: private StringBuffer strText = null;
047:
048: private CLHelp() {
049: strText = new StringBuffer();
050: addLine("SourceJammer Command Line Command List.");
051:
052: // jbm change start
053: // jbm
054: // jbm add getproj command
055: // jbm
056: addLine("Version 1.3.0");
057: // jbm
058: // jbm change end
059:
060: addLine("SourceJammer is copyright (c) Robert MacGrogan 2001, 2002.");
061: addLine("");
062: addLine("Note: Items in brackets ([]) are required. Items is braces");
063: addLine("({}) are optional.");
064: addLine("");
065: addLine("End of Line (EOL) types: The SourceJammer command line ");
066: addLine("does not allow you to specify the eol type to use for a ");
067: addLine("particular file. The command line always returns text files ");
068: addLine("with the default eol type specified in your conf.xml.");
069: addLine("");
070: addLine("Current Local Directory: At any moment, the command line is ");
071: addLine("pointing to a local directory on your file system. Any ");
072: addLine("commands that involve sending files will send files from the ");
073: addLine("current local directory. Any commands that involve retreiving ");
074: addLine("files will retrieve files to the current local directory. The ");
075: addLine("current local directory is changed with the lcd command (see ");
076: addLine("below).");
077: addLine("");
078: addLine("Current Project: At any moment, the command line is pointing ");
079: addLine("to project in the archive on the server. Any commands that ");
080: addLine("involve sending files will send files to the current project. ");
081: addLine("Any commands that involve retreiving files will retrieve files ");
082: addLine("from the current project. The current project is changed with ");
083: addLine("the cd command (see below).");
084: addLine("");
085: addLine("Connection: All of the following commands require you to be ");
086: addLine("connected to an archive except mkarchd and help.");
087: addLine("");
088: addLine("Commands and options are separated with single spaces. If the ");
089: addLine("text you want to use for an option contains spaces, you should ");
090: addLine("enclose it in double quotes (\"\").");
091: addLine("");
092: addLine(" addfile [NAME] {b/t} Add file in Current Local Directory with ");
093: addLine(" name NAME to Current Project in archive. ");
094: addLine(" b specifies a binary file. t specifies a ");
095: addLine(" text file.");
096: addLine(" addfile * {b/t} Adds all files in Current Local Directory ");
097: addLine(" to Current Project in archive. b ");
098: addLine(" specifies a binary file. t specifies a ");
099: addLine(" text file.");
100: addLine(" cd [PATH] Changes Current Project to the project at ");
101: addLine(" the specified path. ");
102: addLine(" chpwd [PWD] Change your password on the SourceJammer ");
103: addLine(" server to [PWD].");
104: addLine(" ckin [NAME] {COMMENT} Check in the file with the specified NAME, ");
105: addLine(" and associating the specified COMMENT.");
106: addLine(" ckout [NAME] Check out the file with the specified NAME.");
107: addLine(" ckun [NAME] Undo checkout of the file with the ");
108: addLine(" specified NAME.");
109: addLine(" con [USER] [PWD] [ARCH] Connect to the specified archive (ARCH) ");
110: addLine(" using the specified user name (USER) and ");
111: addLine(" password (PWD).");
112: addLine(" delrm [NUM] Permanently delete from the Current ");
113: addLine(" Project a file or project that was ");
114: addLine(" previously removed. Use the viewrm ");
115: addLine(" command to see a list of removed items.");
116: addLine(" discon Disconnect from the SourceJammer server.");
117: addLine(" get [NAME] Gets the latest version of the file with ");
118: addLine(" name NAME to your local file system.");
119: addLine(" get * Gets all the files in the Current Project ");
120: addLine(" to your local file system.");
121: addLine(" getlbl [LABEL] {VERSION} Get the labeled version from the archive ");
122: addLine(" with the name LABEL. Specify a VERSION");
123: addLine(" to get a specific previous version.");
124:
125: // jbm change start
126: // jbm
127: // jbm add getproj command
128: // jbm
129: addLine(" getproj {[PATH] {[r|nr] { [d|nd] {v|nv} } ] } ");
130: addLine(" Gets all the files in the specified ");
131: addLine(" project path to your local file system. ");
132: addLine(" Optionally recurse all associated projects, ");
133: addLine(" optionally creating matching directories ");
134: addLine(" in your local file system and optionally verify");
135: addLine(" that the files are checked in. All parameters ");
136: addLine(" are optional. Defaults to Current Project (.) ");
137: addLine(" recurse (r) make directories (d) and do not ");
138: addLine(" verify checked in (nv)");
139: // jbm
140: // jbm change end
141:
142: addLine(" getver [NAME] [VERSION] Get the version number VERSION of file ");
143: addLine(" with name NAME.");
144: addLine(" help View this document.");
145: addLine(" lcd [PATH] Change the Current Local Directory to the ");
146: addLine(" PATH specified.");
147: addLine(" lls List the contents of the Current Local ");
148: addLine(" Directory.");
149: addLine(" ls List the contents of the Current Project.");
150: addLine(" mkarch [ARCH] Make a new archive on the SourceJammer ");
151: addLine(" server. ARCH is the name you want to give ");
152: addLine(" your archive.");
153: addLine(" mkarchd [USER] [PWD] [ARCH] Make a new archive on the SourceJammer ");
154: addLine(" server while in disconnected mode. USER ");
155: addLine(" is your username, PWD is your password. ");
156: addLine(" ARCH is the name of the new archive.");
157: addLine(" mklbl [LABEL] [DESC] Make a new labeled version on the archive, ");
158: addLine(" with the Current Project as the root ");
159: addLine(" project of the labeled version. LABEL is ");
160: addLine(" the name of the new labeled version. ");
161: addLine(" DESC is a description.");
162: addLine(" mkproj [PROJ] Make a new project named PROJ in the ");
163: addLine(" Current Project.");
164: addLine(" mkuser [USER] [PWD] [FULL] Make a new user on the SourceJammer server ");
165: addLine(" where USER is the new user's name, PWD ");
166: addLine(" is the password and FULL is the user's ");
167: addLine(" full name.");
168: addLine(" quit Exits from the SourceJammer command line.");
169: addLine(" rback [NAME] [VERSION] Rollback the file named NAME to version ");
170: addLine(" number VERSION. ");
171: addLine(" restore [NUM] {NEW NAME} Restore removed item number NUM from the ");
172: addLine(" Current Project using the NEW NAME (if ");
173: addLine(" specified). Use viewrm to view the ");
174: addLine(" removed items in the Current Project.");
175: addLine(" rm [NAME] Remove the file or project named NAME from ");
176: addLine(" the Current Project.");
177: addLine(" rnm [NAME] [NEW NAME] Rename the file or project named NAME to ");
178: addLine(" NEW NAME.");
179: addLine(" vercom [NAME] [VERSION] View the comment for version number ");
180: addLine(" VERSION of file NAME.");
181: addLine(" viewrm View a list of items removed from the ");
182: addLine(" Current Project.");
183: addLine("");
184:
185: text = strText.toString();
186: strText = null;
187: }
188:
189: private void addLine(String s) {
190: strText.append(s).append("\r\n");
191: }
192:
193: public static String getText() {
194: return instance.text;
195: }
196:
197: }
|