From 575c9820dffbfee3311e19a5f64e64b98c2ed5f8 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Fri, 19 Oct 2018 11:13:05 -0500 Subject: Fix GUI Buttons Issue-ID: AAF-435 Change-Id: I8b5e83609176a22b5aa54cac6fd0911488bd707b Signed-off-by: Instrumental --- .../main/java/org/onap/aaf/auth/cmd/AAFcli.java | 70 +++++++++++----------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'auth/auth-cmd') diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/AAFcli.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/AAFcli.java index ea366576..0222965f 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/AAFcli.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/AAFcli.java @@ -251,6 +251,41 @@ public class AAFcli { } else if ("exit".equalsIgnoreCase(largs[idx])) { pw.println("Exiting..."); return false; + } else if ("set".equalsIgnoreCase(largs[idx])) { + while (largs.length > ++idx) { + int equals = largs[idx].indexOf('='); + String tag, value; + if (equals < 0) { + tag = largs[idx]; + value = access.getProperty(Config.AAF_APPPASS,null); + if (value==null) { + break; + } else { + value = access.decrypt(value, false); + if (value==null) { + break; + } + access.getProperties().put(tag, value); + pw.println("set " + tag + " "); + } + } else { + tag = largs[idx].substring(0, equals); + value = largs[idx].substring(++equals); + pw.println("set " + tag + ' ' + value); + } + boolean isTrue = "TRUE".equalsIgnoreCase(value); + if ("FORCE".equalsIgnoreCase(tag)) { + force = value; + } else if ("REQUEST".equalsIgnoreCase(tag)) { + request = isTrue; + } else if ("DETAILS".equalsIgnoreCase(tag)) { + showDetails = isTrue; + } else { + access.getProperties().put(tag, value); + } + } + continue; + // Allow Script to indicate if Failure is what is expected } } @@ -264,41 +299,6 @@ public class AAFcli { } else if ("DETAILS".equalsIgnoreCase(largs[idx])) { showDetails=true; ++idx; - } else if ("set".equalsIgnoreCase(largs[idx])) { - while (largs.length > ++idx) { - int equals = largs[idx].indexOf('='); - String tag, value; - if (equals < 0) { - tag = largs[idx]; - value = access.getProperty(Config.AAF_APPPASS,null); - if (value==null) { - break; - } else { - value = access.decrypt(value, false); - if (value==null) { - break; - } - access.getProperties().put(tag, value); - pw.println("set " + tag + " "); - } - } else { - tag = largs[idx].substring(0, equals); - value = largs[idx].substring(++equals); - pw.println("set " + tag + ' ' + value); - } - boolean isTrue = "TRUE".equalsIgnoreCase(value); - if ("FORCE".equalsIgnoreCase(tag)) { - force = value; - } else if ("REQUEST".equalsIgnoreCase(tag)) { - request = isTrue; - } else if ("DETAILS".equalsIgnoreCase(tag)) { - showDetails = isTrue; - } else { - access.getProperties().put(tag, value); - } - } - continue; - // Allow Script to indicate if Failure is what is expected } int ret = 0; -- cgit 1.2.3-korg