More changes for the removal of the Axis dependencies.

Removed the log files created by the Windows INSTALL.

Corrected the "Author" for files created by Greg.

Tuned the ATS logs to be less chatty and have a greater backlog.

Updated the NOTICES file and added READMEs to provide information
about external packages included in the project.
This commit is contained in:
Juan Carlos Luciani
2007-03-17 06:39:46 +00:00
parent 33a49c686a
commit 7a44908936
26 changed files with 2650 additions and 2904 deletions

View File

@@ -48,8 +48,8 @@ public class MungeCryptoPropertiesFilePath
File fileInput;
File fileOutput;
File file;
FileWriter fw;
//File file;
//FileWriter fw;
String sInput;
String sOutput;
int rc;
@@ -63,28 +63,27 @@ public class MungeCryptoPropertiesFilePath
MungeCryptoPropertiesFilePath(String[] args)
{
rc = ERROR_NO_ERROR;
fileInput = null;
fileOutput = null;
try
{
file = new File("c:\\test5.log");
fw = new FileWriter(file);
//file = new File("c:\\test5.log");
//fw = new FileWriter(file);
log("Here we go: " + args.length);
for (int i = 0; i < args.length; i++)
{
log("Arg " + i + " = " + args[i]);
}
// Process the arguments
if (ERROR_NO_ERROR == (rc = processArgs(args)))
{
// Process the file
rc = createOutputFile();
}
}
catch (IOException e)
{
@@ -95,8 +94,8 @@ public class MungeCryptoPropertiesFilePath
try
{
log(rc);
fw.flush();
fw.close();
//fw.flush();
//fw.close();
}
catch (Exception e1)
{
@@ -110,19 +109,19 @@ public class MungeCryptoPropertiesFilePath
int i;
String args[] = new String[argsOld.length];
int iNew;
log("Original arg count " + argsOld.length);
for (i = 0; i < argsOld.length; i++)
{
log("Arg " + i + " = " + argsOld[i] + "\r\n");
}
// Validate the number of parameters
if (argsOld.length < 2)
{
return ERROR_INVALID_NUMBER_OF_PARAMS;
}
iNew = -1;
for (iOld = 0; iOld < argsOld.length; iOld++)
{
@@ -136,17 +135,17 @@ public class MungeCryptoPropertiesFilePath
}
}
}
log("New arg count " + args.length);
for (i = 0; i < args.length; i++)
{
log("Arg " + i + " = " + args[i] + "\r\n");
}
for (i = 0; i <= iNew; i++)
{
log("arg[" + i + "] = " +args[i]);
if (args[i].startsWith(INPUT_FILE_PARAM))
{
// Make sure it is more than the param tag
@@ -154,10 +153,10 @@ public class MungeCryptoPropertiesFilePath
{
return ERROR_BAD_INPUT_FILE_PARAM;
}
sInput = args[i].substring(INPUT_FILE_PARAM.length()).trim();
fileInput = new File(sInput);
// Make sure the input file can be found
if (!fileInput.exists())
{
@@ -165,7 +164,7 @@ public class MungeCryptoPropertiesFilePath
return ERROR_MISSING_INPUT_FILE;
}
}
else if (args[i].startsWith(OUTPUT_FILE_PARAM))
{
// Make sure it is more than the param tag
@@ -173,24 +172,24 @@ public class MungeCryptoPropertiesFilePath
{
return ERROR_BAD_OUTPUT_FILE_PARAM;
}
sOutput = args[i].substring(OUTPUT_FILE_PARAM.length()).trim();
fileOutput = new File(sOutput);
}
}
// Make sure we got an input file
if (null == fileInput)
{
return ERROR_MISSING_INPUT_FILE_PARAM;
}
// Make sure we got an output file
if (null == fileOutput)
{
return ERROR_MISSING_OUTPUT_FILE_PARAM;
}
return ERROR_NO_ERROR;
}
@@ -201,7 +200,7 @@ public class MungeCryptoPropertiesFilePath
String sLineTemplate;
String sLineOutput;
int iSearchFor;
try
{
// Open the file
@@ -211,7 +210,7 @@ public class MungeCryptoPropertiesFilePath
{
return ERROR_CANNOT_READ_FILE;
}
try
{
fwOutput = new FileWriter(fileOutput);
@@ -227,7 +226,7 @@ public class MungeCryptoPropertiesFilePath
{
sLineOutput = sLineTemplate;
log("<-- " + sLineOutput);
if (sLineOutput.trim().startsWith(FILE_KEY))
{
// Replace all instances of the line separator on the line
@@ -235,7 +234,7 @@ public class MungeCryptoPropertiesFilePath
{
log("replacing \\ at position " + iSearchFor + " with //");
sLineOutput = sLineOutput.substring(0, iSearchFor) + "//" +
sLineOutput.substring(iSearchFor + 1);
sLineOutput.substring(iSearchFor + 1);
}
}
try
@@ -248,7 +247,7 @@ public class MungeCryptoPropertiesFilePath
return -42;
}
}
// Clean up
fwOutput.flush();
fwOutput.close();
@@ -278,48 +277,38 @@ public class MungeCryptoPropertiesFilePath
case ERROR_INVALID_NUMBER_OF_PARAMS:
sMessage = "Invalid number of parameters: 2 expected";
break;
case ERROR_MISSING_INPUT_FILE:
sMessage = "Missing input file";
break;
case ERROR_OUTPUT_COPY_FAILED:
sMessage = "Unable to create output file";
break;
case ERROR_IO_EXCEPTION:
sMessage = "IOException";
break;
case ERROR_BAD_INPUT_FILE_PARAM:
sMessage = "Invalid input file parameter";
break;
case ERROR_BAD_OUTPUT_FILE_PARAM:
sMessage = "Invalid output file parameter";
break;
case ERROR_MISSING_INPUT_FILE_PARAM:
sMessage = "Missing input file parameter";
break;
case ERROR_MISSING_OUTPUT_FILE_PARAM:
sMessage = "Missing output file parameter";
break;
case ERROR_CANNOT_READ_FILE:
sMessage = "Cannot read file";
break;
case ERROR_CANNOT_CREATE_FILE:
sMessage = "Cannot create file";
break;
default:
sMessage = "Unknown error: " + err;
break;
}
if (null != s)
{
sMessage = sMessage + s;
@@ -329,6 +318,7 @@ public class MungeCryptoPropertiesFilePath
void log(String s)
{
/*
try
{
fw.write(this.getClass().getName() + ": " + s + "\r\n");
@@ -336,5 +326,6 @@ public class MungeCryptoPropertiesFilePath
catch (IOException ioe)
{
}
*/
}
}