Added TUV r2031: MasterTool now trims all of the command line args.
Additionally some documentation and housekeeping. git-svn-id: https://svn.libreccm.org/ccm/trunk@308 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
f2264d6aeb
commit
d63b3d60c9
|
|
@ -32,15 +32,11 @@ import java.io.InputStreamReader;
|
||||||
* The check is activated during initial setup by the file /ccm-core.checklist!
|
* The check is activated during initial setup by the file /ccm-core.checklist!
|
||||||
*
|
*
|
||||||
* @author Rafael H. Schloming <rhs@mit.edu>
|
* @author Rafael H. Schloming <rhs@mit.edu>
|
||||||
* @version $Revision: #5 $ $Date: 2004/08/16 $
|
* @version $Id: LibCheck.java 736 2005-09-01 10:46:05Z sskracic $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class LibCheck extends BaseCheck {
|
public class LibCheck extends BaseCheck {
|
||||||
|
|
||||||
public final static String versionId =
|
|
||||||
"$Id: LibCheck.java 736 2005-09-01 10:46:05Z sskracic $" +
|
|
||||||
" by $Author: sskracic $, " +
|
|
||||||
"$DateTime: 2004/08/16 18:10:38 $";
|
|
||||||
|
|
||||||
// Integrating the packaging.MessageMap service class providing a
|
// Integrating the packaging.MessageMap service class providing a
|
||||||
// package specific message file by overriding the variable in BaseCheck.
|
// package specific message file by overriding the variable in BaseCheck.
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ init com.arsdigita.search.intermedia.Initializer {
|
||||||
// As of version 6.5.x still in use!
|
// As of version 6.5.x still in use!
|
||||||
init com.arsdigita.search.lucene.Initializer {}
|
init com.arsdigita.search.lucene.Initializer {}
|
||||||
|
|
||||||
|
// As of version 6.5.x still in use!
|
||||||
init com.arsdigita.notification.Initializer {
|
init com.arsdigita.notification.Initializer {
|
||||||
RequestManagerDelay = 900; // in seconds
|
RequestManagerDelay = 900; // in seconds
|
||||||
RequestManagerPeriod = 900; // in seconds
|
RequestManagerPeriod = 900; // in seconds
|
||||||
|
|
|
||||||
|
|
@ -30,15 +30,13 @@ import org.apache.log4j.Logger;
|
||||||
* Central location for obtaining database connection.
|
* Central location for obtaining database connection.
|
||||||
*
|
*
|
||||||
* @author David Dao
|
* @author David Dao
|
||||||
* @version $Revision: #26 $ $Date: 2004/08/16 $
|
* @version $Id: ConnectionManager.java 738 2005-09-01 12:36:52Z sskracic $
|
||||||
* @since 4.5
|
* @since 4.5
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class ConnectionManager {
|
public class ConnectionManager {
|
||||||
|
|
||||||
public static final String versionId = "$Author: sskracic $ - $Date: 2004/08/16 $ $Id: ConnectionManager.java 738 2005-09-01 12:36:52Z sskracic $";
|
|
||||||
|
|
||||||
private static final Logger LOG =
|
private static final Logger LOG =
|
||||||
Logger.getLogger(ConnectionManager.class);
|
Logger.getLogger(ConnectionManager.class);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,11 @@ import java.sql.PreparedStatement;
|
||||||
* Implementation of the Sequence class for the Oracle RDBMS.
|
* Implementation of the Sequence class for the Oracle RDBMS.
|
||||||
*
|
*
|
||||||
* @author Kevin Scaldeferri
|
* @author Kevin Scaldeferri
|
||||||
|
* @version $Id: OracleSequenceImpl.java 738 2005-09-01 12:36:52Z sskracic $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class OracleSequenceImpl extends SequenceImpl {
|
public class OracleSequenceImpl extends SequenceImpl {
|
||||||
|
|
||||||
public static final String versionId = "$Id: OracleSequenceImpl.java 738 2005-09-01 12:36:52Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $";
|
|
||||||
|
|
||||||
private String m_sequenceName;
|
private String m_sequenceName;
|
||||||
|
|
||||||
// private constructor
|
// private constructor
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,11 @@ import java.sql.PreparedStatement;
|
||||||
* Implementation of the Sequence class for the Postgres RDBMS.
|
* Implementation of the Sequence class for the Postgres RDBMS.
|
||||||
*
|
*
|
||||||
* @author Patrick McNeill
|
* @author Patrick McNeill
|
||||||
|
* @version $Id: PostgresSequenceImpl.java 738 2005-09-01 12:36:52Z sskracic $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class PostgresSequenceImpl extends SequenceImpl {
|
public class PostgresSequenceImpl extends SequenceImpl {
|
||||||
|
|
||||||
public static final String versionId = "$Id: PostgresSequenceImpl.java 738 2005-09-01 12:36:52Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $";
|
|
||||||
|
|
||||||
private String m_sequenceName;
|
private String m_sequenceName;
|
||||||
|
|
||||||
// private constructor
|
// private constructor
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main entry point: Implements the ccm command line tool.
|
* Main entry point: Implements the ccm command line tool.
|
||||||
|
|
@ -41,15 +40,9 @@ import org.apache.log4j.Logger;
|
||||||
* by some PERL scripts, located in the tools directory of CCM trunk.
|
* by some PERL scripts, located in the tools directory of CCM trunk.
|
||||||
*
|
*
|
||||||
* @author Justin Ross <jross@redhat.com>
|
* @author Justin Ross <jross@redhat.com>
|
||||||
* @version $Id: MasterTool.java 1169 2006-06-14 13:08:25Z fabrice $
|
* @version $Id: MasterTool.java 2031 2009-12-10 03:34:04Z terry $
|
||||||
*/
|
*/
|
||||||
public class MasterTool {
|
public class MasterTool {
|
||||||
public static final String versionId =
|
|
||||||
"$Id: MasterTool.java 1169 2006-06-14 13:08:25Z fabrice $" +
|
|
||||||
"$Author: fabrice $" +
|
|
||||||
"$DateTime: 2004/08/16 18:10:38 $";
|
|
||||||
|
|
||||||
private static final Logger s_log = Logger.getLogger(MasterTool.class);
|
|
||||||
|
|
||||||
private static void usage(Commands cmds, PrintStream out) {
|
private static void usage(Commands cmds, PrintStream out) {
|
||||||
out.println("usage: ccm [OPTIONS | COMMAND]");
|
out.println("usage: ccm [OPTIONS | COMMAND]");
|
||||||
|
|
@ -106,16 +99,19 @@ public class MasterTool {
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
String name = args[0];
|
String name = args[0].trim();
|
||||||
Command cmd = cmds.get(name);
|
Command cmd = cmds.get(name);
|
||||||
|
|
||||||
if (cmd == null) {
|
if (cmd == null) {
|
||||||
err.println("no such command: " + name);
|
err.println("no such command: '" + name + "'");
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] command = new String[args.length - 1];
|
String[] command = new String[args.length - 1];
|
||||||
System.arraycopy(args, 1, command, 0, command.length);
|
System.arraycopy(args, 1, command, 0, command.length);
|
||||||
|
for (int i=0; i<command.length; i++) {
|
||||||
|
command[i] = command[i].trim();
|
||||||
|
}
|
||||||
|
|
||||||
boolean result = cmd.run(command);
|
boolean result = cmd.run(command);
|
||||||
if (cmd == help || cmd == usage) {
|
if (cmd == help || cmd == usage) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue