Cleaned up the code in a couple of files
This commit is contained in:
parent
383eaa5cd3
commit
659493c090
@ -36,7 +36,7 @@ public class userVerify
|
|||||||
valueMap.put("n", false);
|
valueMap.put("n", false);
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
System.out.print("Block on empty column values (Y/n) : ");
|
System.out.print("Invalidate the line if empty column value (Y/n) : ");
|
||||||
String varAnswer = myObj.nextLine(); // Read user input
|
String varAnswer = myObj.nextLine(); // Read user input
|
||||||
|
|
||||||
if (varAnswer.toUpperCase().equals("Y") || varAnswer.toUpperCase().equals("N") || varAnswer == "")
|
if (varAnswer.toUpperCase().equals("Y") || varAnswer.toUpperCase().equals("N") || varAnswer == "")
|
||||||
|
@ -42,8 +42,6 @@ public class webService {
|
|||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println();
|
|
||||||
|
|
||||||
varDebug = Boolean.valueOf(args.debug);
|
varDebug = Boolean.valueOf(args.debug);
|
||||||
varKey = args.key;
|
varKey = args.key;
|
||||||
String varToEncrypt = args.encrypt;
|
String varToEncrypt = args.encrypt;
|
||||||
@ -72,7 +70,8 @@ public class webService {
|
|||||||
|
|
||||||
if (!fileProcessor.getFile(varProps) || !fileProcessor.validFile(varProps))
|
if (!fileProcessor.getFile(varProps) || !fileProcessor.validFile(varProps))
|
||||||
{
|
{
|
||||||
debugProcessor.writer(true, "Something went wrong. Please check that the properties file is correctly formatted!");
|
debugProcessor.writer(true, "Please check that the properties file " + varProps + " is correctly formatted!");
|
||||||
|
System.out.println();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,7 +80,9 @@ public class webService {
|
|||||||
doSoap(new File(varProps));
|
doSoap(new File(varProps));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
System.out.println();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void doSoap(File thisProps) throws Exception {
|
private static void doSoap(File thisProps) throws Exception {
|
||||||
@ -106,18 +107,21 @@ public class webService {
|
|||||||
File checkInput = new File(varInputFile);
|
File checkInput = new File(varInputFile);
|
||||||
if (!checkInput.exists()) {
|
if (!checkInput.exists()) {
|
||||||
debugProcessor.writer(true, thisProps + " => The file specified in XML_FILE does not exist [ " + varInputFile + " ]");
|
debugProcessor.writer(true, thisProps + " => The file specified in XML_FILE does not exist [ " + varInputFile + " ]");
|
||||||
|
System.out.println();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
File checkRole = new File(varRoleFile);
|
File checkRole = new File(varRoleFile);
|
||||||
if (!checkRole.exists()) {
|
if (!checkRole.exists()) {
|
||||||
debugProcessor.writer(true, thisProps + " => The file specified in CSV_FILE does not exist [ " + varRoleFile + " ]");
|
debugProcessor.writer(true, thisProps + " => The file specified in CSV_FILE does not exist [ " + varRoleFile + " ]");
|
||||||
|
System.out.println();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
debugProcessor.writer(true, thisProps + " => Something went wrong. Please check that the properties file is correctly formatted!");
|
debugProcessor.writer(true, "Please check that the properties file " + thisProps + " is correctly formatted!");
|
||||||
|
System.out.println();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,10 +130,11 @@ public class webService {
|
|||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
debugProcessor.writer(true, "The password could not be decrypted. Please check that the Encryption Key is correct!");
|
debugProcessor.writer(true, "The password could not be decrypted. Please check that the Encryption Key is correct!");
|
||||||
|
System.out.println();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println();
|
debugProcessor.writer(varDebug, "");
|
||||||
debugProcessor.writer(varDebug, thisProps + " => SOAP URL : " + varURL);
|
debugProcessor.writer(varDebug, thisProps + " => SOAP URL : " + varURL);
|
||||||
debugProcessor.writer(varDebug, thisProps + " => Username : " + varUsername);
|
debugProcessor.writer(varDebug, thisProps + " => Username : " + varUsername);
|
||||||
debugProcessor.writer(varDebug, thisProps + " => Use SSL : " + varUseSSL);
|
debugProcessor.writer(varDebug, thisProps + " => Use SSL : " + varUseSSL);
|
||||||
@ -153,7 +158,7 @@ public class webService {
|
|||||||
Iterator<Map> mapper1 = thisCSV.iterator();
|
Iterator<Map> mapper1 = thisCSV.iterator();
|
||||||
while (mapper1.hasNext()) {
|
while (mapper1.hasNext()) {
|
||||||
varCount++;
|
varCount++;
|
||||||
debugProcessor.writer(false, "");
|
debugProcessor.writer(true, "");
|
||||||
debugProcessor.writer(true, "processing record " + varCount);
|
debugProcessor.writer(true, "processing record " + varCount);
|
||||||
|
|
||||||
Map hashMap = mapper1.next();
|
Map hashMap = mapper1.next();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user