summaryrefslogtreecommitdiffstats
path: root/auth/auth-cmd/src
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2019-10-15 08:19:50 -0500
committerInstrumental <jonathan.gathman@att.com>2019-10-15 08:35:35 -0500
commit1296352d8eafee57f982a4342ad79ada4aa56d28 (patch)
tree355cdb89d85530a861319f892b0f24236e6adc50 /auth/auth-cmd/src
parentbdce7667a6e272e2fa32e298d957a0d9090c5bc9 (diff)
Sonar Fixes, Formatting
Issue-ID: AAF-1019 Change-Id: Ica49d9e7323aad9622ff9d95cc21b87430c22c54 Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-cmd/src')
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/AAFcli.java46
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/BaseCmd.java10
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Cmd.java52
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/DeprecatedCMD.java6
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Help.java8
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/MessageException.java10
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Param.java8
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Version.java4
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Cache.java4
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Clear.java6
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Deny.java8
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Log.java12
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Mgmt.java4
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/SessClear.java8
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Session.java4
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Admin.java14
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Attrib.java18
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Create.java16
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Delete.java12
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Describe.java14
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/List.java28
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListActivity.java16
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListAdminResponsible.java16
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListByName.java10
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListChildren.java10
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListNsKeysByAttrib.java12
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsers.java6
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersContact.java14
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersInRole.java14
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersWithPerm.java18
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/NS.java6
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Owner.java10
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Create.java26
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Delete.java12
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Describe.java14
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Grant.java22
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/List.java10
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListActivity.java10
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByNS.java16
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByName.java18
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByRole.java16
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByUser.java16
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Perm.java4
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Rename.java20
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/CreateDelete.java22
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/Describe.java14
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/List.java16
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListActivity.java8
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByNS.java16
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByNameOnly.java16
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByPerm.java20
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByRole.java20
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByUser.java22
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/Role.java4
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/User.java20
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java16
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Delg.java20
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ID.java14
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/List.java12
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListActivity.java12
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListApprovals.java14
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListDelegates.java12
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForCreds.java12
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForPermission.java16
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForRoles.java10
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Role.java8
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/User.java4
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/HMangrStub.java6
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_AAFCli.java34
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_BaseCmd.java6
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_BasicAuth.java10
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_Cmd.java40
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_DeprecatedCMD.java12
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_Help.java24
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_Version.java12
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/mgmt/JU_Clear.java20
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/mgmt/JU_Deny.java18
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/mgmt/JU_Log.java16
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/mgmt/JU_SessClear.java16
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Admin.java20
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Attrib.java14
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Create.java16
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Delete.java12
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Describe.java18
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_List.java34
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListActivity.java18
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListAdminResponsible.java18
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListByName.java18
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListChildren.java12
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListNsKeysByAttrib.java12
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListUsers.java10
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListUsersContact.java16
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListUsersInRole.java4
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListUsersWithPerm.java6
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Owner.java8
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Responsible.java6
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Create.java22
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Delete.java20
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Describe.java18
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Grant.java16
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListActivity.java16
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListByNS.java12
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListByName.java16
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListByRole.java12
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListByUser.java12
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Rename.java18
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_CreateDelete.java20
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_Describe.java18
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_List.java26
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListActivity.java18
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByNS.java12
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByNameOnly.java18
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByPerm.java12
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByRole.java14
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByUser.java20
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_User.java24
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_Cred.java18
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_Delg.java20
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListActivity.java20
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListApprovals.java20
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListDelegates.java20
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListForCreds.java18
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListForPermission.java20
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListForRoles.java20
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_Role.java24
125 files changed, 958 insertions, 958 deletions
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 51986b92..2c084428 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
@@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -232,7 +232,7 @@ public class AAFcli {
continue;
// Sleep, typically for reports, to allow DB to update
// Milliseconds
-
+
} else if ("sleep".equalsIgnoreCase(largs[idx])) {
Integer t = Integer.parseInt(largs[++idx]);
pw.println("sleep " + t);
@@ -298,8 +298,8 @@ public class AAFcli {
// Allow Script to indicate if Failure is what is expected
}
- }
-
+ }
+
if ("REQUEST".equalsIgnoreCase(largs[idx])) {
request=true;
++idx;
@@ -416,7 +416,7 @@ public class AAFcli {
System.out.println("For instance, C-b means hold ctrl key and press b, M-b means hold alt and press b\n");
System.out.println("Basic Keybindings:");
- System.out.println("\tC-l - clear screen");
+ System.out.println("\tC-l - clear screen");
System.out.println("\tC-a - beginning of line");
System.out.println("\tC-e - end of line");
System.out.println("\tC-b - backward character (left arrow also works)");
@@ -441,7 +441,7 @@ public class AAFcli {
*/
public static void main(String[] args) {
int rv = 0;
-
+
try {
AAFSSO aafsso = new AAFSSO(args);
String noexit = aafsso.access().getProperty("no_exit");
@@ -451,7 +451,7 @@ public class AAFcli {
if (aafsso.ok()) {
Define.set(access);
AuthzEnv env = new AuthzEnv(access);
-
+
Reader rdr = null;
boolean exitOnFailure = true;
/*
@@ -489,15 +489,15 @@ public class AAFcli {
sb.append(args[i]);
}
}
-
+
AAFConHttp aafcon = new AAFConHttp(access);
-//
+//
// SecurityInfoC<?> si = aafcon.securityInfo();
// Locator<URI> loc;
-
+
aafsso.setLogDefault();
aafsso.setStdErrDefault();
-
+
// Note, with AAF Locator, this may not longer be necessary 3/2018 Jonathan
if (!aafsso.loginOnly()) {
// try {
@@ -509,16 +509,16 @@ public class AAFcli {
// // Other Access is done writing to StdOut and StdErr, reset Std out
// aafsso.setLogDefault();
// }
-
+
TIMEOUT = Integer.parseInt(access.getProperty(Config.AAF_CONN_TIMEOUT, Config.AAF_CONN_TIMEOUT_DEF));
// HMangr hman = new HMangr(access, loc).readTimeout(TIMEOUT).apiVersion(Config.AAF_DEFAULT_API_VERSION);
-
+
if (access.getProperty(Config.AAF_DEFAULT_REALM)==null) {
access.setProperty(Config.AAF_DEFAULT_REALM, "people.osaaf.org");
aafsso.addProp(Config.AAF_DEFAULT_REALM, "people.osaaf.org");
}
-
- AAFcli aafcli = new AAFcli(access,env, new OutputStreamWriter(System.out),
+
+ AAFcli aafcli = new AAFcli(access,env, new OutputStreamWriter(System.out),
aafcon.hman(), aafcon.securityInfo(), aafcon.securityInfo().defSS);
// new HBasicAuthSS(si,aafsso.user(), access.decrypt(aafsso.enc_pass(),false)));
// }
@@ -540,18 +540,18 @@ public class AAFcli {
System.out.println("Type 'help' for short help or 'help -d' for detailed help with aafcli commands");
System.out.println("Type '?' for help with command line editing");
System.out.println("Type 'q', 'quit', or 'exit' to quit aafcli\n");
-
+
ConsoleReader reader = new ConsoleReader();
try {
reader.setPrompt("aafcli > ");
-
+
String line;
while ((line = reader.readLine()) != null) {
showDetails = (line.contains("-d"));
-
+
if (line.equalsIgnoreCase("quit") || line.equalsIgnoreCase("q") || line.equalsIgnoreCase("exit")) {
break;
- } else if (line.equalsIgnoreCase("--help -d") || line.equalsIgnoreCase("help -d")
+ } else if (line.equalsIgnoreCase("--help -d") || line.equalsIgnoreCase("help -d")
|| line.equalsIgnoreCase("help")) {
line = "--help";
} else if (line.equalsIgnoreCase("cls")) {
@@ -592,10 +592,10 @@ public class AAFcli {
}
rv = aafcli.eval(sb.toString()) ? 0 : 1;
}
-
+
} finally {
aafcli.close();
-
+
// Don't close if No Reader, or it's a Reader of Standard In
if (rdr != null && !(rdr instanceof InputStreamReader)) {
rdr.close();
@@ -629,7 +629,7 @@ public class AAFcli {
public boolean isTest() {
return AAFcli.isTest;
}
-
+
public boolean isDetailed() {
return AAFcli.showDetails;
}
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/BaseCmd.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/BaseCmd.java
index 77d1894f..6978e9e2 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/BaseCmd.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/BaseCmd.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -36,13 +36,13 @@ public class BaseCmd<CMD extends Cmd> extends Cmd {
super(aafcli, null, name, params);
cmds = new ArrayList<>();
}
-
+
public BaseCmd(CMD parent, String name, Param ... params) {
super(parent.aafcli, parent, name, params);
cmds = new ArrayList<>();
}
-
+
@Override
public int _exec( int idx, final String ... args) throws CadiException, APIException, LocatorException {
if (args.length-idx<1) {
@@ -53,7 +53,7 @@ public class BaseCmd<CMD extends Cmd> extends Cmd {
Cmd empty = null;
for (Cmd c: cmds) {
name = c.getName();
- if (name==null && empty==null) { // Mark with Command is null, and take the first one.
+ if (name==null && empty==null) { // Mark with Command is null, and take the first one.
empty = c;
} else if (s.equalsIgnoreCase(c.getName()))
return c.exec(idx+1, args);
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Cmd.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Cmd.java
index 6ca09213..0ae4ce99 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Cmd.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Cmd.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -67,7 +67,7 @@ public abstract class Cmd {
public static final String STARTDATE = "startdate";
public static final String ENDDATE = "enddate";
-
+
private String name;
private final Param[] params;
private int required;
@@ -104,7 +104,7 @@ public abstract class Cmd {
++required;
}
}
-
+
String temp = access.getProperty(Config.AAF_DEFAULT_REALM,null);
if (temp!=null && !temp.startsWith("@")) {
defaultRealm = '@' + temp;
@@ -112,16 +112,16 @@ public abstract class Cmd {
defaultRealm="<Set Default Realm>";
}
}
-
+
public final int exec(int idx, String ... args) throws CadiException, APIException, LocatorException {
if (args.length-idx<required) {
throw new CadiException(build(new StringBuilder("Too few args: "),null).toString());
}
return _exec(idx,args);
}
-
+
protected abstract int _exec(int idx, final String ... args) throws CadiException, APIException, LocatorException;
-
+
public void detailedHelp(int indent,StringBuilder sb) {
}
@@ -179,7 +179,7 @@ public abstract class Cmd {
sb.append(p.tag);
sb.append(p.required?"> ": "] ");
}
-
+
boolean first = true;
for (Cmd child : children) {
if (!(child instanceof DeprecatedCMD)) {
@@ -222,7 +222,7 @@ public abstract class Cmd {
}
return sb;
}
-
+
protected void error(Future<?> future) {
StringBuilder sb = new StringBuilder("Failed");
String desc = future.body();
@@ -275,7 +275,7 @@ public abstract class Cmd {
pw().println(sb);
}
-
+
private void withCode(StringBuilder sb, Integer code) {
sb.append(" with code ");
sb.append(code);
@@ -303,7 +303,7 @@ public abstract class Cmd {
if ((str = access.getProperty(Cmd.STARTDATE,null))!=null) {
req.setStart(Chrono.timeStamp(Date.valueOf(str)));
}
-
+
if ((str = access.getProperty(Cmd.ENDDATE,null))!=null) {
req.setEnd(Chrono.timeStamp(Date.valueOf(str)));
}
@@ -311,7 +311,7 @@ public abstract class Cmd {
/**
* For Derived classes, who have ENV in this parent
- *
+ *
* @param cls
* @return
* @throws APIException
@@ -349,17 +349,17 @@ public abstract class Cmd {
pw().print('-');
}
pw().println();
-
+
pw().format(hformat,"Date","Table","User","Memo");
for (int i=0;i<lineLength;++i) {
pw().print('-');
}
pw().println();
-
+
// Save Server time by Sorting locally
List<Item> items = history.getItem();
java.util.Collections.sort(items, (Comparator<Item>) (o1, o2) -> o2.getTimestamp().compare(o1.getTimestamp()));
-
+
for (History.Item item : items) {
GregorianCalendar gc = item.getTimestamp().toGregorianCalendar();
pw().format(hformat,
@@ -370,7 +370,7 @@ public abstract class Cmd {
}
}
}
-
+
/**
* Turn String Array into a | delimited String
* @param options
@@ -389,12 +389,12 @@ public abstract class Cmd {
}
return sb.toString();
}
-
+
/**
* return which index number the Option matches.
- *
+ *
* throws an Exception if not part of this Option Set
- *
+ *
* @param options
* @param test
* @return
@@ -420,9 +420,9 @@ public abstract class Cmd {
retryable.item(aafcli.prevCall.item());
retryable.lastClient=aafcli.prevCall.lastClient;
}
-
+
RET ret = aafcli.hman.same(aafcli.ss,retryable);
-
+
// Store last call in AAFcli, because Cmds are all different instances.
aafcli.prevCall = retryable;
return ret;
@@ -445,7 +445,7 @@ public abstract class Cmd {
public String getName() {
return name;
}
-
+
public void reportHead(String ... str) {
pw().println();
boolean first = true;
@@ -467,7 +467,7 @@ public abstract class Cmd {
pw().println();
reportLine();
}
-
+
public String reportColHead(String format, String ... args) {
pw().format(format,(Object[])args);
reportLine();
@@ -480,7 +480,7 @@ public abstract class Cmd {
}
pw().println();
}
-
+
protected void setQueryParamsOn(Rcli<?> rcli) {
StringBuilder sb=null;
String force;
@@ -502,7 +502,7 @@ public abstract class Cmd {
//
// /**
// * If Force is set, will return True once only, then revert to "FALSE".
-// *
+// *
// * @return
// */
// protected String checkForce() {
@@ -525,7 +525,7 @@ public abstract class Cmd {
/**
* Appends shortID with Realm, but only when allowed by Organization
- * @throws OrganizationException
+ * @throws OrganizationException
*/
public String fullID(String id) {
if (id != null) {
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/DeprecatedCMD.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/DeprecatedCMD.java
index 6082fac8..cb9eb7ce 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/DeprecatedCMD.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/DeprecatedCMD.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -29,7 +29,7 @@ import org.onap.aaf.misc.env.APIException;
/**
* Use this class to deprecate methods and features, by pointing to the new
* usages.
- *
+ *
* These commands will not show up in Help
* @author Jonathan
*
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Help.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Help.java
index 49ffb51b..52439046 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Help.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Help.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -31,7 +31,7 @@ public class Help extends Cmd {
private List<Cmd> cmds;
public Help(AAFcli aafcli, List<Cmd> cmds) {
- super(aafcli, "help",
+ super(aafcli, "help",
new Param("-d (more details)", false),
new Param("command",false));
this.cmds = cmds;
@@ -83,7 +83,7 @@ public class Help extends Cmd {
pw().println(sb.toString());
return 200 /*HttpStatus.OK_200*/;
}
-
+
@Override
public void detailedHelp(int indentValue, StringBuilder sb) {
int indent = indentValue;
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/MessageException.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/MessageException.java
index 934212ca..bca337e3 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/MessageException.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/MessageException.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,19 +20,19 @@
*/
/**
- *
+ *
*/
package org.onap.aaf.auth.cmd;
/**
* An Exception designed simply to give End User message, no stack trace
- *
+ *
* @author Jonathan
*
*/
public class MessageException extends Exception {
/**
- *
+ *
*/
private static final long serialVersionUID = 8143933588878259048L;
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Param.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Param.java
index 8e485528..dfcf4ed5 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Param.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Param.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -24,9 +24,9 @@ package org.onap.aaf.auth.cmd;
public class Param {
public final String tag;
public final boolean required;
-
+
/**
- *
+ *
* @param t
* @param b
*/
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Version.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Version.java
index 9bfb77f9..c6ff3bd9 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Version.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Version.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Cache.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Cache.java
index ab9758ae..29b74a8d 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Cache.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Cache.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Clear.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Clear.java
index 83bf57c0..6b958108 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Clear.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Clear.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -54,7 +54,7 @@ public class Clear extends Cmd {
public Integer code(Rcli<?> client) throws APIException, CadiException {
int rv = 409;
Future<Void> fp = client.delete(
- "/mgmt/cache/"+name,
+ "/mgmt/cache/"+name,
Void.class
);
if (fp.get(AAFcli.timeout())) {
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Deny.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Deny.java
index bc7f91f8..3ab26cbd 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Deny.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Deny.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -41,7 +41,7 @@ public class Deny extends BaseCmd<Mgmt> {
cmds.add(new DenySomething(this,"ip","ipv4or6[,ipv4or6]*"));
cmds.add(new DenySomething(this,"id","identity[,identity]*"));
}
-
+
public class DenySomething extends Cmd {
private boolean isID;
@@ -84,7 +84,7 @@ public class Deny extends BaseCmd<Mgmt> {
pw().println(name + append + resp + " on " + client);
rv=fp.code();
} else {
- if (rv==409) {
+ if (rv==409) {
rv = fp.code();
};
error(fp);
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Log.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Log.java
index 6289032d..df9f520c 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Log.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Log.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -42,7 +42,7 @@ public class Log extends BaseCmd<Mgmt> {
new Param(optionsToString(options),true),
new Param("id[,id]*",true));
}
-
+
@Override
public int _exec(int idxValue, String ... args) throws CadiException, APIException, LocatorException {
int rv=409;
@@ -56,7 +56,7 @@ public class Log extends BaseCmd<Mgmt> {
} else {
fname = name;
}
-
+
rv = all(new Retryable<Integer>() {
@Override
public Integer code(Rcli<?> client) throws APIException, CadiException {
@@ -65,7 +65,7 @@ public class Log extends BaseCmd<Mgmt> {
String str = "/mgmt/log/id/"+fname;
String msg;
switch(option) {
- case 0:
+ case 0:
fp = client.create(str,Void.class);
msg = "Added";
break;
@@ -77,7 +77,7 @@ public class Log extends BaseCmd<Mgmt> {
fp = null;
msg = "Ignored";
}
-
+
if (fp!=null) {
if (fp.get(AAFcli.timeout())) {
pw().println(msg + " Special Log for " + fname + " on " + client);
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Mgmt.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Mgmt.java
index a1c83ee0..43dfc85a 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Mgmt.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Mgmt.java
@@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/SessClear.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/SessClear.java
index 9ca01a39..ef139aef 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/SessClear.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/SessClear.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -53,14 +53,14 @@ public class SessClear extends Cmd {
public Integer code(Rcli<?> client) throws APIException, CadiException {
int rv = 409;
Future<Void> fp = client.delete(
- "/mgmt/dbsession",
+ "/mgmt/dbsession",
Void.class
);
if (fp.get(AAFcli.timeout())) {
pw().println("Cleared DBSession on " + client);
rv=200;
} else {
- if (rv==409) {
+ if (rv==409) {
rv = fp.code();
};
error(fp);
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Session.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Session.java
index c70234ed..e543e238 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Session.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/mgmt/Session.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Admin.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Admin.java
index 9d2843bc..0afa73b8 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Admin.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Admin.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -52,24 +52,24 @@ public class Admin extends BaseCmd<NS> {
return same(new Retryable<Integer>() {
@Override
- public Integer code(Rcli<?> client) throws CadiException, APIException {
+ public Integer code(Rcli<?> client) throws CadiException, APIException {
Future<Void> fp = null;
for (String id : ids) {
id = fullID(id);
String verb;
switch(option) {
- case 0:
+ case 0:
fp = client.create("/authz/ns/"+ns+"/admin/"+id,Void.class);
verb = " added to ";
break;
- case 1:
+ case 1:
fp = client.delete("/authz/ns/"+ns+"/admin/"+id,Void.class);
verb = " deleted from ";
break;
default:
throw new CadiException("Bad Argument");
};
-
+
if (fp.get(AAFcli.timeout())) {
pw().append("Admin ");
pw().append(id);
@@ -79,7 +79,7 @@ public class Admin extends BaseCmd<NS> {
error(fp);
return fp.code();
}
-
+
}
return fp==null?500:fp.code();
}
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Attrib.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Attrib.java
index feade450..63089e45 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Attrib.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Attrib.java
@@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -62,24 +62,24 @@ public class Attrib extends BaseCmd<NS> {
} else {
value = "";
}
-
+
return same(new Retryable<Integer>() {
@Override
- public Integer code(Rcli<?> client) throws CadiException, APIException {
+ public Integer code(Rcli<?> client) throws CadiException, APIException {
Future<Void> fp = null;
String message;
switch(option) {
- case 0:
+ case 0:
fp = client.create(authzString+ns+atrributeString+key+'/'+value,Void.class);
message = String.format("Add Attrib %s=%s to %s",
key,value,ns);
break;
- case 1:
+ case 1:
fp = client.update(authzString+ns+atrributeString+key+'/'+value);
message = String.format("Update Attrib %s=%s for %s",
key,value,ns);
break;
- case 2:
+ case 2:
fp = client.delete(authzString+ns+atrributeString+key,Void.class);
message = String.format("Attrib %s deleted from %s",
key,ns);
@@ -95,8 +95,8 @@ public class Attrib extends BaseCmd<NS> {
} else {
error(fp);
}
-
- return fp.code();
+
+ return fp.code();
}
}
});
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Create.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Create.java
index 05d66881..6e6b40b4 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Create.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Create.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -42,9 +42,9 @@ public class Create extends Cmd {
private static final String COMMA = ",";
public Create(NS parent) {
- super(parent,"create",
+ super(parent,"create",
new Param("ns-name",true),
- new Param("owner (id[,id]*)",true),
+ new Param("owner (id[,id]*)",true),
new Param("admin (id[,id]*)",false));
}
@@ -53,7 +53,7 @@ public class Create extends Cmd {
int idx = _idx;
final NsRequest nr = new NsRequest();
-
+
nr.setName(args[idx++]);
String[] responsible = args[idx++].split(COMMA);
for (String s : responsible) {
@@ -68,17 +68,17 @@ public class Create extends Cmd {
for (String s : admin) {
nr.getAdmin().add(fullID(s));
}
-
+
// Set Start/End commands
setStartEnd(nr);
-
+
return same(new Retryable<Integer>() {
@Override
public Integer code(Rcli<?> client) throws CadiException, APIException {
// Requestable
setQueryParamsOn(client);
Future<NsRequest> fp = client.create(
- "/authz/ns",
+ "/authz/ns",
getDF(NsRequest.class),
nr
);
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Delete.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Delete.java
index 7da6c26b..7e6b1422 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Delete.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Delete.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -39,8 +39,8 @@ import org.onap.aaf.misc.env.APIException;
*/
public class Delete extends Cmd {
public Delete(NS parent) {
- super(parent,"delete",
- new Param("ns-name",true));
+ super(parent,"delete",
+ new Param("ns-name",true));
}
@Override
@@ -51,11 +51,11 @@ public class Delete extends Cmd {
int index = idx;
StringBuilder path = new StringBuilder("/authz/ns/");
path.append(args[index++]);
-
+
// Send "Force" if set
setQueryParamsOn(client);
Future<Void> fp = client.delete(path.toString(),Void.class);
-
+
if (fp.get(AAFcli.timeout())) {
pw().println("Deleted Namespace");
} else {
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Describe.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Describe.java
index e521d616..68532c9b 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Describe.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Describe.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -37,9 +37,9 @@ import aaf.v2_0.NsRequest;
public class Describe extends Cmd {
private static final String NS_PATH = "/authz/ns";
public Describe(NS parent) {
- super(parent,"describe",
+ super(parent,"describe",
new Param("ns-name",true),
- new Param("description",true));
+ new Param("description",true));
}
@Override
@@ -53,14 +53,14 @@ public class Describe extends Cmd {
while (idx < args.length) {
desc.append(args[idx++] + ' ');
}
-
+
NsRequest nsr = new NsRequest();
nsr.setName(name);
nsr.setDescription(desc.toString());
-
+
// Set Start/End commands
setStartEnd(nsr);
-
+
Future<NsRequest> fn = null;
int rv;
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/List.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/List.java
index e1252d87..ef25f75a 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/List.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/List.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -47,9 +47,9 @@ public class List extends BaseCmd<NS> {
public List(NS parent) {
super(parent,"list");
cmds.add(new ListByName(this));
-
-// TODO: uncomment when on cassandra 2.1.2 if we like cli command to get all ns's
-// a user is admin or responsible for
+
+// TODO: uncomment when on cassandra 2.1.2 if we like cli command to get all ns's
+// a user is admin or responsible for
cmds.add(new ListAdminResponsible(this));
cmds.add(new DeprecatedCMD<List>(this,"responsible","'responsible' is deprecated. use 'owner'")); // deprecated
cmds.add(new ListActivity(this));
@@ -57,13 +57,13 @@ public class List extends BaseCmd<NS> {
cmds.add(new ListChildren(this));
cmds.add(new ListNsKeysByAttrib(this));
}
-
+
public void report(Future<Nss> fp, String ... str) {
reportHead(str);
if (fp==null) {
pw().println(" *** Namespace Not Found ***");
}
-
+
if (fp!=null && fp.value!=null) {
for (Ns ns : fp.value.getNs()) {
pw().println(ns.getName());
@@ -93,12 +93,12 @@ public class List extends BaseCmd<NS> {
}
pw().format(sformat,sb.toString());
}
-
+
}
}
}
}
-
+
public void reportName(Future<Nss> fp, String ... str) {
reportHead(str);
if (fp!=null && fp.value!=null) {
@@ -109,7 +109,7 @@ public class List extends BaseCmd<NS> {
return ns1.getName().compareTo(ns2.getName());
}
});
-
+
for (Ns ns : nss) {
pw().println(ns.getName());
if (this.aafcli.isDetailed() && ns.getDescription() != null) {
@@ -136,9 +136,9 @@ public class List extends BaseCmd<NS> {
}
}
}
-
- public void reportCred(Future<Users> fc) {
+
+ public void reportCred(Future<Users> fc) {
if (fc!=null && fc.value!=null && !(fc.value.getUser().isEmpty())) {
pw().println(" Credentials");
java.util.List<User> users = fc.value.getUser();
@@ -162,9 +162,9 @@ public class List extends BaseCmd<NS> {
Integer type;
if ((type=u.getType())==null) {
type = 9999;
- }
+ }
return Define.getCredType(type);
}
-
+
}
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListActivity.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListActivity.java
index f8f82466..ae80fd8d 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListActivity.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListActivity.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -40,9 +40,9 @@ import aaf.v2_0.History;
*/
public class ListActivity extends Cmd {
private static final String HEADER = "List Activity of Namespace";
-
+
public ListActivity(List parent) {
- super(parent,"activity",
+ super(parent,"activity",
new Param("ns-name",true));
}
@@ -50,15 +50,15 @@ public class ListActivity extends Cmd {
public int _exec(int _idx, final String ... args) throws CadiException, APIException, LocatorException {
int idx = _idx;
final String ns = args[idx++];
-
+
return same(new Retryable<Integer>() {
@Override
public Integer code(Rcli<?> client) throws CadiException, APIException {
Future<History> fp = client.read(
- "/authz/hist/ns/"+ns,
+ "/authz/hist/ns/"+ns,
getDF(History.class)
);
-
+
if (fp.get(AAFcli.timeout())) {
activity(fp.value, HEADER + " [ " + ns + " ]");
} else {
@@ -68,7 +68,7 @@ public class ListActivity extends Cmd {
}
});
}
-
+
@Override
public void detailedHelp(int indent, StringBuilder sb) {
detailLine(sb,indent,HEADER);
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListAdminResponsible.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListAdminResponsible.java
index 3e3a0ea6..1f833d9c 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListAdminResponsible.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListAdminResponsible.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -37,11 +37,11 @@ import aaf.v2_0.Nss;
public class ListAdminResponsible extends Cmd {
private static final String HEADER="List Namespaces with ";
private static final String[] options = {"admin","owner"};
-
+
public ListAdminResponsible(List parent) {
- super(parent,null,
+ super(parent,null,
new Param(optionsToString(options),true),
- new Param("user",true));
+ new Param("user",true));
}
@Override
@@ -54,21 +54,21 @@ public class ListAdminResponsible extends Cmd {
String title = args[idx++];
String user = fullID(args[idx++]);
String apipart = "owner".equals(title)?"responsible":title;
-
+
Future<Nss> fn = client.read("/authz/nss/"+apipart+"/"+user,getDF(Nss.class));
if (fn.get(AAFcli.timeout())) {
((List)parent).reportName(fn,HEADER + title + " privileges for ",user);
} else if (fn.code()==404) {
((List)parent).report(null,HEADER + title + " privileges for ",user);
return 200;
- } else {
+ } else {
error(fn);
}
return fn.code();
}
});
}
-
+
@Override
public void detailedHelp(int indent, StringBuilder sb) {
detailLine(sb,indent,HEADER + "admin or owner privileges for user");
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListByName.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListByName.java
index b4cca87e..8151b19b 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListByName.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListByName.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -45,9 +45,9 @@ import aaf.v2_0.Users;
*/
public class ListByName extends Cmd {
private static final String HEADER="List Namespaces by Name";
-
+
public ListByName(List parent) {
- super(parent,"name",
+ super(parent,"name",
new Param("ns-name",true));
}
@@ -84,7 +84,7 @@ public class ListByName extends Cmd {
} else if (fn.code()==404) {
((List)parent).report(null,HEADER,ns);
return 200;
- } else {
+ } else {
error(fn);
}
return fn.code();
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListChildren.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListChildren.java
index 96baa324..9a9f47ff 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListChildren.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListChildren.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -42,9 +42,9 @@ import aaf.v2_0.Nss.Ns;
*/
public class ListChildren extends Cmd {
private static final String HEADER="List Child Namespaces";
-
+
public ListChildren(List parent) {
- super(parent,"children",
+ super(parent,"children",
new Param("ns-name",true));
}
@@ -64,7 +64,7 @@ public class ListChildren extends Cmd {
} else if (fn.code()==404) {
((List)parent).report(null,HEADER,ns);
return 200;
- } else {
+ } else {
error(fn);
}
return fn.code();
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListNsKeysByAttrib.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListNsKeysByAttrib.java
index 01b0f21c..14bc3313 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListNsKeysByAttrib.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListNsKeysByAttrib.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -45,10 +45,10 @@ import aaf.v2_0.Users;
*/
public class ListNsKeysByAttrib extends Cmd {
private static final String HEADER="List Namespace Names by Attribute";
-
+
public ListNsKeysByAttrib(List parent) {
- super(parent,"keys",
- new Param("attrib",true));
+ super(parent,"keys",
+ new Param("attrib",true));
}
@Override
@@ -67,7 +67,7 @@ public class ListNsKeysByAttrib extends Cmd {
parent.reportHead(HEADER);
pw().println(" *** No Namespaces Found ***");
return 200;
- } else {
+ } else {
error(fn);
}
return fn.code();
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsers.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsers.java
index ba2f88dc..a89c8497 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsers.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsers.java
@@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -58,7 +58,7 @@ public class ListUsers extends BaseCmd<List> {
};
private static final String uformat = "%s%-50s expires:%02d/%02d/%04d\n";
-
+
public ListUsers(List parent) {
super(parent,"user");
cmds.add(new ListUsersWithPerm(this));
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersContact.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersContact.java
index d6eb9b30..3ebafc23 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersContact.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersContact.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -49,10 +49,10 @@ import aaf.v2_0.Users.User;
*/
public class ListUsersContact extends Cmd {
private static final String HEADER="List Contacts of Namespace ";
-
+
public ListUsersContact(ListUsers parent) {
- super(parent,"contact",
- new Param("ns-name",true));
+ super(parent,"contact",
+ new Param("ns-name",true));
}
@Override
@@ -76,7 +76,7 @@ public class ListUsersContact extends Cmd {
((ListUsers)parent).report(r.getName());
}
Future<Users> fus = client.read(
- "/authz/users/role/"+r.getName(),
+ "/authz/users/role/"+r.getName(),
getDF(Users.class)
);
if (fus.get(AAFcli.timeout())) {
@@ -102,7 +102,7 @@ public class ListUsersContact extends Cmd {
}
} else if (fn.code()==404) {
return 200;
- } else {
+ } else {
error(fn);
}
return fn.code();
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersInRole.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersInRole.java
index b33f506d..5cda15bc 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersInRole.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersInRole.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -49,10 +49,10 @@ import aaf.v2_0.Users.User;
*/
public class ListUsersInRole extends Cmd {
private static final String HEADER="List Users in Roles of Namespace ";
-
+
public ListUsersInRole(ListUsers parent) {
- super(parent,"role",
- new Param("ns-name",true));
+ super(parent,"role",
+ new Param("ns-name",true));
}
@Override
@@ -76,7 +76,7 @@ public class ListUsersInRole extends Cmd {
((ListUsers)parent).report(r.getName());
}
Future<Users> fus = client.read(
- "/authz/users/role/"+r.getName(),
+ "/authz/users/role/"+r.getName(),
getDF(Users.class)
);
if (fus.get(AAFcli.timeout())) {
@@ -102,7 +102,7 @@ public class ListUsersInRole extends Cmd {
}
} else if (fn.code()==404) {
return 200;
- } else {
+ } else {
error(fn);
}
return fn.code();
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersWithPerm.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersWithPerm.java
index 96ca95ee..cbd21a71 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersWithPerm.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersWithPerm.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -49,10 +49,10 @@ import aaf.v2_0.Users.User;
*/
public class ListUsersWithPerm extends Cmd {
private static final String HEADER="List Users of Permissions of Namespace ";
-
+
public ListUsersWithPerm(ListUsers parent) {
- super(parent,"perm",
- new Param("ns-name",true));
+ super(parent,"perm",
+ new Param("ns-name",true));
}
@Override
@@ -68,7 +68,7 @@ public class ListUsersWithPerm extends Cmd {
if (fn.get(AAFcli.timeout())) {
if (fn.value!=null) {
Set<String> uset = detail?null:new HashSet<>();
-
+
for (Ns n : fn.value.getNs()) {
Future<Perms> fp = client.read("/authz/perms/ns/"+n.getName()+(aafcli.isDetailed()?"?ns":"")
, getDF(Perms.class));
@@ -77,14 +77,14 @@ public class ListUsersWithPerm extends Cmd {
String perm = p.getType()+'/'+p.getInstance()+'/'+p.getAction();
if (detail)((ListUsers)parent).report(perm);
Future<Users> fus = client.read(
- "/authz/users/perm/"+perm,
+ "/authz/users/perm/"+perm,
getDF(Users.class)
);
if (fus.get(AAFcli.timeout())) {
for (User u : fus.value.getUser()) {
if (detail)
((ListUsers)parent).report(" ",u);
- else
+ else
uset.add(u.getId());
}
} else if (fn.code()==404) {
@@ -102,7 +102,7 @@ public class ListUsersWithPerm extends Cmd {
}
} else if (fn.code()==404) {
return 200;
- } else {
+ } else {
error(fn);
}
return fn.code();
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/NS.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/NS.java
index 092610c5..505417ec 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/NS.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/NS.java
@@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -31,7 +31,7 @@ public class NS extends BaseCmd<NS> {
public NS(AAFcli aafcli) {
super(aafcli, "ns");
-
+
cmds.add(new Create(this));
cmds.add(new Delete(this));
cmds.add(new Admin(this));
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Owner.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Owner.java
index 9ca3d21f..fd43e8da 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Owner.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Owner.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -59,18 +59,18 @@ public class Owner extends BaseCmd<NS> {
id=fullID(id);
String verb;
switch(option) {
- case 0:
+ case 0:
fp = client.create("/authz/ns/"+ns+"/responsible/"+id,Void.class);
verb = " is now ";
break;
- case 1:
+ case 1:
fp = client.delete("/authz/ns/"+ns+"/responsible/"+id,Void.class);
verb = " is no longer ";
break;
default:
throw new CadiException("Bad Argument");
};
-
+
if (fp.get(AAFcli.timeout())) {
pw().append(id);
pw().append(verb);
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Create.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Create.java
index be49cf28..559ae070 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Create.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Create.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -36,14 +36,14 @@ import aaf.v2_0.PermRequest;
import aaf.v2_0.RoleRequest;
/**
- *
+ *
* @author Jonathan
*
*/
public class Create extends Cmd {
public Create(Perm parent) {
- super(parent,"create",
- new Param("type",true),
+ super(parent,"create",
+ new Param("type",true),
new Param("instance",true),
new Param("action", true),
new Param("role[,role]* (to Grant to)", false)
@@ -56,7 +56,7 @@ public class Create extends Cmd {
@Override
public Integer code(Rcli<?> client) throws CadiException, APIException {
int idx = index;
- final PermRequest pr = new PermRequest();
+ final PermRequest pr = new PermRequest();
pr.setType(args[idx++]);
pr.setInstance(args[idx++]);
pr.setAction(args[idx++]);
@@ -64,7 +64,7 @@ public class Create extends Cmd {
String[] roles = roleCommas==null?null:roleCommas.split("\\s*,\\s*");
boolean force = aafcli.forceString()!=null;
int rv;
-
+
if (roles!=null && force) { // Make sure Roles are Created
RoleRequest rr = new RoleRequest();
for (String role : roles) {
@@ -81,7 +81,7 @@ public class Create extends Cmd {
break;
case 409:
break;
- default:
+ default:
pw().println("Role [" + role + "] does not exist, and cannot be created.");
return 206 /*HttpStatus.PARTIAL_CONTENT_206*/;
}
@@ -113,14 +113,14 @@ public class Create extends Cmd {
switch(fr.code()){
case 201:
case 409:break;
- default:
-
+ default:
+
}
}
}
-
+
try {
- if (201!=(rv=((Perm)parent)._exec(0,
+ if (201!=(rv=((Perm)parent)._exec(0,
new String[] {"grant",pr.getType(),pr.getInstance(),pr.getAction(),roleCommas}))) {
rv = 206 /*HttpStatus.PARTIAL_CONTENT_206*/;
}
@@ -144,7 +144,7 @@ public class Create extends Cmd {
}
});
}
-
+
@Override
public void detailedHelp(int _indent, StringBuilder sb) {
int indent = _indent;
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Delete.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Delete.java
index feffbdb0..fc1f9363 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Delete.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Delete.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -41,8 +41,8 @@ import aaf.v2_0.PermRequest;
*/
public class Delete extends Cmd {
public Delete(Perm parent) {
- super(parent,"delete",
- new Param("type",true),
+ super(parent,"delete",
+ new Param("type",true),
new Param("instance",true),
new Param("action", true));
}
@@ -58,7 +58,7 @@ public class Delete extends Cmd {
pk.setType(args[idx++]);
pk.setInstance(args[idx++]);
pk.setAction(args[idx++]);
-
+
if(pk.getType().contains("@")) { // User Perm deletion... Must remove from hidden role
client.setQueryParams("force");
} else {
@@ -66,7 +66,7 @@ public class Delete extends Cmd {
setQueryParamsOn(client);
}
Future<PermRequest> fp = client.delete(
- "/authz/perm",
+ "/authz/perm",
getDF(PermRequest.class),
pk);
if (fp.get(AAFcli.timeout())) {
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Describe.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Describe.java
index bb894ca7..02c57bd1 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Describe.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Describe.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -37,11 +37,11 @@ import aaf.v2_0.PermRequest;
public class Describe extends Cmd {
private static final String PERM_PATH = "/authz/perm";
public Describe(Perm parent) {
- super(parent,"describe",
+ super(parent,"describe",
new Param("type",true),
new Param("instance", true),
new Param("action", true),
- new Param("description",true));
+ new Param("description",true));
}
@Override
@@ -57,16 +57,16 @@ public class Describe extends Cmd {
while (idx < args.length) {
desc.append(args[idx++] + ' ');
}
-
+
PermRequest pr = new PermRequest();
pr.setType(type);
pr.setInstance(instance);
pr.setAction(action);
pr.setDescription(desc.toString());
-
+
// Set Start/End commands
setStartEnd(pr);
-
+
Future<PermRequest> fp = null;
int rv;
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Grant.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Grant.java
index f27a2609..eb206970 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Grant.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Grant.java
@@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -38,7 +38,7 @@ import aaf.v2_0.Pkey;
import aaf.v2_0.RolePermRequest;
/**
- *
+ *
* @author Jonathan
*
*/
@@ -52,7 +52,7 @@ public class Grant extends Cmd {
new Param("instance",true),
new Param("action",true),
new Param("role[,role]*",false)
- );
+ );
}
@Override
@@ -63,7 +63,7 @@ public class Grant extends Cmd {
int idx = index;
String action = args[idx++];
int option = whichOption(options, action);
-
+
RolePermRequest rpr = new RolePermRequest();
Pkey pk = new Pkey();
pk.setType(args[idx++]);
@@ -71,9 +71,9 @@ public class Grant extends Cmd {
pk.setAction(args[idx++]);
rpr.setPerm(pk);
setStartEnd(rpr);
-
+
Future<RolePermRequest> frpr = null;
-
+
String[] roles = args[idx++].split(",");
String strA;
String strB;
@@ -83,7 +83,7 @@ public class Grant extends Cmd {
// You can request to Grant Permission to a Role
setQueryParamsOn(client);
frpr = client.create(
- "/authz/role/perm",
+ "/authz/role/perm",
getDF(RolePermRequest.class),
rpr
);
@@ -93,7 +93,7 @@ public class Grant extends Cmd {
// You can request to UnGrant Permission to a Role
setQueryParamsOn(client);
frpr = client.delete(
- "/authz/role/" + role + "/perm",
+ "/authz/role/" + role + "/perm",
getDF(RolePermRequest.class),
rpr
);
@@ -101,7 +101,7 @@ public class Grant extends Cmd {
strB = "] from Role [";
}
if (frpr.get(AAFcli.timeout())) {
- pw().println(strA + pk.getType() + '|' + pk.getInstance() + '|' + pk.getAction()
+ pw().println(strA + pk.getType() + '|' + pk.getInstance() + '|' + pk.getAction()
+ strB + role +']');
} else {
if (frpr.code()==202) {
@@ -111,7 +111,7 @@ public class Grant extends Cmd {
} else {
error(frpr);
idx=Integer.MAX_VALUE;
- }
+ }
}
}
return frpr==null?0:frpr.code();
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/List.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/List.java
index 8ff2763a..2af8d45a 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/List.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/List.java
@@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -61,7 +61,7 @@ public class List extends BaseCmd<Perm> {
// Package Level on purpose
abstract class ListPerms extends Retryable<Integer> {
protected int list(Future<Perms> fp,String header, String parentPerm) throws CadiException {
- if (fp.get(AAFcli.timeout())) {
+ if (fp.get(AAFcli.timeout())) {
report(fp,header, parentPerm);
} else {
error(fp);
@@ -69,10 +69,10 @@ public class List extends BaseCmd<Perm> {
return fp.code();
}
}
-
+
void report(Future<Perms> fp, String ... str) {
reportHead(str);
- if (this.aafcli.isDetailed()) {
+ if (this.aafcli.isDetailed()) {
String format = "%-36s %-30s %-15s\n";
String descFmt = " %-75s\n";
reportColHead(format + descFmt,"[PERM NS].Type","Instance","Action", "Description");
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListActivity.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListActivity.java
index c96220a5..6400aad3 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListActivity.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListActivity.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -40,9 +40,9 @@ import aaf.v2_0.History;
*/
public class ListActivity extends Cmd {
private static final String HEADER = "List Activity of Permission";
-
+
public ListActivity(List parent) {
- super(parent,"activity",
+ super(parent,"activity",
new Param("type",true));
}
@@ -54,7 +54,7 @@ public class ListActivity extends Cmd {
int idx = index;
String type = args[idx++];
Future<History> fp = client.read(
- "/authz/hist/perm/"+type,
+ "/authz/hist/perm/"+type,
getDF(History.class)
);
if (fp.get(AAFcli.timeout())) {
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByNS.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByNS.java
index 7469eed5..e4b0cdb1 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByNS.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByNS.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,16 +34,16 @@ import aaf.v2_0.Perms;
/**
* Return Perms by NS
- *
+ *
* @author Jeremiah
*
*/
public class ListByNS extends Cmd {
private static final String HEADER = "List Perms by NS ";
-
+
public ListByNS(List parent) {
- super(parent,"ns",
- new Param("name",true));
+ super(parent,"ns",
+ new Param("name",true));
}
public int _exec( int idx, final String ... args) throws CadiException, APIException, LocatorException {
@@ -53,14 +53,14 @@ public class ListByNS extends Cmd {
@Override
public Integer code(Rcli<?> client) throws CadiException, APIException {
Future<Perms> fp = client.read(
- "/authz/perms/ns/"+ns+(aafcli.isDetailed()?"?ns":""),
+ "/authz/perms/ns/"+ns+(aafcli.isDetailed()?"?ns":""),
getDF(Perms.class)
);
return list(fp, HEADER, ns);
}
});
}
-
+
@Override
public void detailedHelp(int indent, StringBuilder sb) {
detailLine(sb,indent,HEADER);
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByName.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByName.java
index 099fb5f8..e13bbede 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByName.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByName.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -33,16 +33,16 @@ import org.onap.aaf.misc.env.APIException;
import aaf.v2_0.Perms;
/**
- *
+ *
* @author Jonathan
*
*/
public class ListByName extends Cmd {
private static final String HEADER = "List Child Permissions";
-
+
public ListByName(List parent) {
- super(parent,"name",
- new Param("root perm name",true));
+ super(parent,"name",
+ new Param("root perm name",true));
}
public int _exec(final int index, final String ... args) throws CadiException, APIException, LocatorException {
@@ -50,10 +50,10 @@ public class ListByName extends Cmd {
@Override
public Integer code(Rcli<?> client) throws CadiException, APIException {
String parentPerm=args[index];
-
+
Future<Perms> fp = client.read(
- "/authz/perms/"+parentPerm+(aafcli.isDetailed()?"?ns":""),
- getDF(Perms.class)
+ "/authz/perms/"+parentPerm+(aafcli.isDetailed()?"?ns":""),
+ getDF(Perms.class)
);
return list(fp,HEADER,parentPerm);
}
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByRole.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByRole.java
index 32b78a6b..294f6ad1 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByRole.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByRole.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,16 +34,16 @@ import aaf.v2_0.Perms;
/**
* Return Perms by Role
- *
+ *
* @author Jeremiah
*
*/
public class ListByRole extends Cmd {
private static final String HEADER = "List Perms by Role ";
-
+
public ListByRole(List parent) {
- super(parent,"role",
- new Param("name",true));
+ super(parent,"role",
+ new Param("name",true));
}
public int _exec(final int idx, final String ... args) throws CadiException, APIException, LocatorException {
@@ -54,14 +54,14 @@ public class ListByRole extends Cmd {
public Integer code(Rcli<?> client) throws CadiException, APIException {
Future<Perms> fp = client.read(
- "/authz/perms/role/"+role+(aafcli.isDetailed()?"?ns":""),
+ "/authz/perms/role/"+role+(aafcli.isDetailed()?"?ns":""),
getDF(Perms.class)
);
return list(fp, HEADER, role);
}
});
}
-
+
@Override
public void detailedHelp(int indent, StringBuilder sb) {
detailLine(sb,indent,HEADER);
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByUser.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByUser.java
index 00972a18..6b1fe35e 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByUser.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByUser.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -33,20 +33,20 @@ import org.onap.aaf.misc.env.APIException;
import aaf.v2_0.Perms;
/**
- *
+ *
* @author Jonathan
*
*/
public class ListByUser extends Cmd {
private static final String HEADER = "List Permissions by User";
public ListByUser(List parent) {
- super(parent,"user",
- new Param("id",true));
+ super(parent,"user",
+ new Param("id",true));
}
public int _exec( int idx, final String ... args) throws CadiException, APIException, LocatorException {
final String user=fullID(args[idx]);
-
+
return same(((List)parent).new ListPerms() {
@Override
public Integer code(Rcli<?> client) throws CadiException, APIException {
@@ -64,14 +64,14 @@ public class ListByUser extends Cmd {
sb.append("ns");
}
Future<Perms> fp = client.read(
- "/authz/perms/user/"+user+(sb==null?"":sb),
+ "/authz/perms/user/"+user+(sb==null?"":sb),
getDF(Perms.class)
);
return list(fp,HEADER, user);
}
});
}
-
+
@Override
public void detailedHelp(int indent, StringBuilder sb) {
detailLine(sb,indent,HEADER);
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Perm.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Perm.java
index 40a07f4e..499ce736 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Perm.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Perm.java
@@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Rename.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Rename.java
index 5a7b5dee..d868a7c8 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Rename.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Rename.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -41,16 +41,16 @@ import aaf.v2_0.PermRequest;
public class Rename extends Cmd {
public Rename(Perm parent) {
- super(parent,"rename",
- new Param("type",true),
+ super(parent,"rename",
+ new Param("type",true),
new Param("instance",true),
new Param("action", true),
- new Param("new type",true),
+ new Param("new type",true),
new Param("new instance",true),
new Param("new action", true)
);
}
-
+
@Override
public int _exec(final int index, final String ... args) throws CadiException, APIException, LocatorException {
return same(new Retryable<Integer>() {
@@ -60,13 +60,13 @@ public class Rename extends Cmd {
String origType = args[idx++];
String origInstance = args[idx++];
String origAction = args[idx++];
-
+
//Create new permission
PermRequest pr = new PermRequest();
pr.setType(args[idx++]);
pr.setInstance(args[idx++]);
pr.setAction(args[idx++]);
-
+
// Set Start/End commands
setStartEnd(pr);
try {
@@ -96,9 +96,9 @@ public class Rename extends Cmd {
}
}
});
-
+
}
-
+
@Override
public void detailedHelp(int indent, StringBuilder sb) {
detailLine(sb,indent,"Rename a Permission from:");
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/CreateDelete.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/CreateDelete.java
index e44185ec..a41256be 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/CreateDelete.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/CreateDelete.java
@@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -37,7 +37,7 @@ import org.onap.aaf.misc.env.APIException;
import aaf.v2_0.RoleRequest;
/**
- *
+ *
* @author Jonathan
*
*/
@@ -45,9 +45,9 @@ public class CreateDelete extends Cmd {
private static final String ROLE_PATH = "/authz/role";
private static final String[] options = {"create","delete"};
public CreateDelete(Role parent) {
- super(parent,null,
+ super(parent,null,
new Param(optionsToString(options),true),
- new Param("name",true));
+ new Param("name",true));
}
@Override
@@ -58,13 +58,13 @@ public class CreateDelete extends Cmd {
int idx = index;
String action = args[idx++];
int option = whichOption(options, action);
-
+
RoleRequest rr = new RoleRequest();
rr.setName(args[idx++]);
-
+
// Set Start/End commands
setStartEnd(rr);
-
+
Future<RoleRequest> fp = null;
String verb = null;
int rv;
@@ -81,7 +81,7 @@ public class CreateDelete extends Cmd {
// Send "Force" if set
setQueryParamsOn(client);
fp = client.delete(
- ROLE_PATH, // +args[idx++],
+ ROLE_PATH, // +args[idx++],
getDF(RoleRequest.class),
rr
);
@@ -89,11 +89,11 @@ public class CreateDelete extends Cmd {
break;
default: // note, if not an option, whichOption throws Exception
break;
-
+
}
boolean rolesSupplied = (args.length>idx);
if (fp == null) {// This useless code brought to you by Sonar.
- throw new CadiException("No call made.");
+ throw new CadiException("No call made.");
}
if (fp.get(AAFcli.timeout())) {
rv=fp.code();
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/Describe.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/Describe.java
index f4d24fb1..5341a7ce 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/Describe.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/Describe.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -37,9 +37,9 @@ import aaf.v2_0.RoleRequest;
public class Describe extends Cmd {
private static final String ROLE_PATH = "/authz/role";
public Describe(Role parent) {
- super(parent,"describe",
+ super(parent,"describe",
new Param("name",true),
- new Param("description",true));
+ new Param("description",true));
}
@Override
@@ -53,14 +53,14 @@ public class Describe extends Cmd {
while (idx < args.length) {
desc.append(args[idx++] + ' ');
}
-
+
RoleRequest rr = new RoleRequest();
rr.setName(role);
rr.setDescription(desc.toString());
-
+
// Set Start/End commands
setStartEnd(rr);
-
+
Future<RoleRequest> fp = null;
int rv;
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/List.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/List.java
index 37d328bd..2e3d1757 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/List.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/List.java
@@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -59,7 +59,7 @@ public class List extends BaseCmd<Role> {
cmds.add(new ListByPerm(this));
cmds.add(new ListActivity(this));
}
-
+
// Package Level on purpose
abstract class ListRoles extends Retryable<Integer> {
protected int list(Future<Roles> fr,Rcli<?> client, String header) throws APIException, CadiException {
@@ -68,7 +68,7 @@ public class List extends BaseCmd<Role> {
if (aafcli.isDetailed()) {
for (aaf.v2_0.Role r : fr.value.getRole()) {
Future<Perms> fp = client.read(
- "/authz/perms/role/"+r.getName()+(aafcli.isDetailed()?"?ns":""),
+ "/authz/perms/role/"+r.getName()+(aafcli.isDetailed()?"?ns":""),
getDF(Perms.class)
);
if (fp.get(AAFcli.timeout())) {
@@ -93,7 +93,7 @@ public class List extends BaseCmd<Role> {
private static final String roleExpiredFormat = "%-53s !!! EXPIRED !!! %s\n";
private static final String permFormat = " %-30s %-30s %-15s\n";
-
+
private static final Comparator<aaf.v2_0.Role> roleCompare = new Comparator<aaf.v2_0.Role>() {
@Override
public int compare(aaf.v2_0.Role a, aaf.v2_0.Role b) {
@@ -152,13 +152,13 @@ public class List extends BaseCmd<Role> {
for (Pkey pkey : r.getPerms()) {
Perm perm = get(pkey,perms);
if (perm==null || perm.getNs()==null) {
- pw().format(permFormat,
+ pw().format(permFormat,
pkey.getType(),
pkey.getInstance(),
pkey.getAction());
} else {
String ns1 = perm.getNs();
- pw().format(permFormat,
+ pw().format(permFormat,
'['+ns1+"]"+perm.getType().substring(ns1.length()),
perm.getInstance(),
perm.getAction());
@@ -185,7 +185,7 @@ public class List extends BaseCmd<Role> {
} else {
pw().format(roleFormatNoDate, r.getName());
for (Pkey perm : r.getPerms()) {
- pw().format(permFormat,
+ pw().format(permFormat,
perm.getType(),
perm.getInstance(),
perm.getAction());
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListActivity.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListActivity.java
index 603ec33b..b6a8a0da 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListActivity.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListActivity.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -42,7 +42,7 @@ public class ListActivity extends Cmd {
private static final String HEADER = "List Activity of Role";
public ListActivity(List parent) {
- super(parent,"activity",
+ super(parent,"activity",
new Param("name",true));
}
@@ -54,7 +54,7 @@ public class ListActivity extends Cmd {
@Override
public Integer code(Rcli<?> client) throws CadiException, APIException {
Future<History> fp = client.read(
- "/authz/hist/role/"+role,
+ "/authz/hist/role/"+role,
getDF(History.class)
);
if (fp.get(AAFcli.timeout())) {
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByNS.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByNS.java
index 361676a4..02a34f78 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByNS.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByNS.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,16 +34,16 @@ import aaf.v2_0.Roles;
/**
* Return Roles by NS
- *
+ *
* @author Jonathan
*
*/
public class ListByNS extends Cmd {
private static final String HEADER = "List Roles by NS ";
-
+
public ListByNS(List parent) {
- super(parent,"ns",
- new Param("name",true));
+ super(parent,"ns",
+ new Param("name",true));
}
@Override
@@ -54,14 +54,14 @@ public class ListByNS extends Cmd {
@Override
public Integer code(Rcli<?> client) throws CadiException, APIException {
Future<Roles> fp = client.read(
- "/authz/roles/ns/"+ns+(aafcli.isDetailed()?"?ns":""),
+ "/authz/roles/ns/"+ns+(aafcli.isDetailed()?"?ns":""),
getDF(Roles.class)
);
return list(fp,client, HEADER+"["+ns+"]");
}
});
}
-
+
@Override
public void detailedHelp(int indent, StringBuilder sb) {
detailLine(sb,indent,HEADER);
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByNameOnly.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByNameOnly.java
index 4d77c460..6e5a5622 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByNameOnly.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByNameOnly.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,16 +34,16 @@ import aaf.v2_0.Roles;
/**
* Return Roles by NS
- *
+ *
* @author Jonathan
*
*/
public class ListByNameOnly extends Cmd {
private static final String HEADER = "List Roles by Name ";
-
+
public ListByNameOnly(List parent) {
- super(parent,"name",
- new Param("name",true));
+ super(parent,"name",
+ new Param("name",true));
}
@Override
@@ -54,14 +54,14 @@ public class ListByNameOnly extends Cmd {
@Override
public Integer code(Rcli<?> client) throws CadiException, APIException {
Future<Roles> fp = client.read(
- "/authz/roles/name/"+name+(aafcli.isDetailed()?"?ns":""),
+ "/authz/roles/name/"+name+(aafcli.isDetailed()?"?ns":""),
getDF(Roles.class)
);
return list(fp,client, HEADER+"["+name+"]");
}
});
}
-
+
@Override
public void detailedHelp(int indent, StringBuilder sb) {
detailLine(sb,indent,HEADER);
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByPerm.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByPerm.java
index 5d291ace..3d3e5e41 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByPerm.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByPerm.java
@@ -8,9 +8,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -39,18 +39,18 @@ import aaf.v2_0.Roles;
/**
* Return Roles by NS
- *
+ *
* @author Jonathan
*
*/
public class ListByPerm extends Cmd {
private static final String HEADER = "List Roles by Perm ";
-
+
public ListByPerm(List parent) {
- super(parent,"perm",
+ super(parent,"perm",
new Param("type",true),
new Param("instance", true),
- new Param("action", true));
+ new Param("action", true));
}
@Override
@@ -59,15 +59,15 @@ public class ListByPerm extends Cmd {
final String type=args[idx];
final String instance=args[++idx];
final String action = args[++idx];
-
+
return same(((List)parent).new ListRoles() {
@Override
public Integer code(Rcli<?> client) throws CadiException, APIException {
try {
Future<Roles> fp = client.read(
- "/authz/roles/perm/"+type+'/' +
+ "/authz/roles/perm/"+type+'/' +
URLEncoder.encode(instance,Config.UTF_8)+'/'+
- action,
+ action,
getDF(Roles.class)
);
return list(fp,client, HEADER+type+'|'+instance+'|'+action);
@@ -77,7 +77,7 @@ public class ListByPerm extends Cmd {
}
});
}
-
+
@Override
public void detailedHelp(int indent, StringBuilder sb) {
detailLine(sb,indent,HEADER);
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByRole.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByRole.java
index 761df695..6520140f 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByRole.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByRole.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -33,16 +33,16 @@ import org.onap.aaf.misc.env.APIException;
import aaf.v2_0.Roles;
/**
- *
+ *
* @author Jonathan
*
*/
public class ListByRole extends Cmd {
private static final String HEADER="List Roles for Role";
-
+
public ListByRole(List parent) {
- super(parent,"role",
- new Param("role",true));
+ super(parent,"role",
+ new Param("role",true));
}
@Override
@@ -50,16 +50,16 @@ public class ListByRole extends Cmd {
return same(((List)parent).new ListRoles() {
@Override
public Integer code(Rcli<?> client) throws CadiException, APIException {
- String role=args[idx];
+ String role=args[idx];
Future<Roles> fp = client.read(
- "/authz/roles/"+role+(aafcli.isDetailed()?"?ns":""),
- getDF(Roles.class)
+ "/authz/roles/"+role+(aafcli.isDetailed()?"?ns":""),
+ getDF(Roles.class)
);
return list(fp,client,HEADER+"["+role+"]");
}
});
}
-
+
@Override
public void detailedHelp(int indent, StringBuilder sb) {
detailLine(sb,indent,HEADER);
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByUser.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByUser.java
index 8111fedc..9657721a 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByUser.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByUser.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -50,17 +50,17 @@ import aaf.v2_0.UserRoles;
*/
public class ListByUser extends Cmd {
private static final String HEADER = "List Roles for User ";
-
+
public ListByUser(List parent) {
- super(parent,"user",
+ super(parent,"user",
new Param("id",true),
- new Param("detail", false));
+ new Param("detail", false));
}
@Override
public int _exec( int idx, final String ... args) throws CadiException, APIException, LocatorException {
final String user=fullID(args[idx]);
-
+
return same(new Retryable<Integer>() {
@Override
@@ -84,7 +84,7 @@ public class ListByUser extends Cmd {
if (aafcli.isDetailed()) {
roles = new Roles();
Future<Perms> fp = client.read(
- "/authz/perms/user/"+user+"?ns&force",
+ "/authz/perms/user/"+user+"?ns&force",
getDF(Perms.class)
);
if (fp.get(AAFcli.timeout())) {
@@ -108,7 +108,7 @@ public class ListByUser extends Cmd {
r.getPerms().add(p);
}
}
- }
+ }
code = fp.code();
} else {
roles = new Roles();
@@ -120,14 +120,14 @@ public class ListByUser extends Cmd {
lr.add(r);
}
}
-
-
+
+
((List)parent).report(roles,perms,urs,HEADER,user);
return code;
}
});
}
-
+
@Override
public void detailedHelp(int indent, StringBuilder sb) {
detailLine(sb,indent,HEADER);
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/Role.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/Role.java
index c49df031..b06bc5e5 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/Role.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/Role.java
@@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/User.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/User.java
index 45361a3f..4641ade7 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/User.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/User.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -42,10 +42,10 @@ import aaf.v2_0.UserRoleRequest;
public class User extends Cmd {
private final static String[] options = {"add","del","extend"};
public User(Role parent) {
- super(parent,"user",
+ super(parent,"user",
new Param(optionsToString(options),true),
new Param("role",true),
- new Param("id[,id]*",false));
+ new Param("id[,id]*",false));
}
@Override
@@ -60,9 +60,9 @@ public class User extends Cmd {
urr.setRole(args[idx++]);
// Set Start/End commands
setStartEnd(urr);
-
+
Future<?> fp = null;
-
+
String[] ids = args[idx++].split(",");
String verb=null,participle=null;
// You can request to be added or removed from role.
@@ -74,15 +74,15 @@ public class User extends Cmd {
switch(option) {
case 0:
fp = client.create(
- "/authz/userRole",
- getDF(UserRoleRequest.class),
+ "/authz/userRole",
+ getDF(UserRoleRequest.class),
urr);
verb = "Added";
participle = "] to Role [" ;
break;
case 1:
fp = client.delete(
- "/authz/userRole/"+urr.getUser()+'/'+urr.getRole(),
+ "/authz/userRole/"+urr.getUser()+'/'+urr.getRole(),
Void.class);
verb = "Removed";
participle = "] from Role [" ;
@@ -124,7 +124,7 @@ public class User extends Cmd {
}
});
}
-
+
@Override
public void detailedHelp(int indent, StringBuilder sb) {
detailLine(sb,indent,"Add OR Delete a User to/from a Role OR extend Expiration");
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java
index 1613b2f9..1a410088 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java
@@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -72,7 +72,7 @@ public class Cred extends Cmd {
if (args.length>idx) {
cr.setEntry(args[idx]);
}
-
+
// Set Start/End commands
setStartEnd(cr);
Integer ret = same(new Retryable<Integer>() {
@@ -83,8 +83,8 @@ public class Cred extends Cmd {
switch(option) {
case 0:
fp = client.create(
- CRED_PATH,
- getDF(CredRequest.class),
+ CRED_PATH,
+ getDF(CredRequest.class),
cr
);
verb = "Added Credential [";
@@ -129,7 +129,7 @@ public class Cred extends Cmd {
Error err = em.getError(fp);
String text = err.getText();
List<String> vars = err.getVariables();
-
+
// IMPORTANT! We do this backward, because it is looking for string
// %1 or %13. If we replace %1 first, that messes up %13
for(int i=vars.size()-1;i>0;--i) {
@@ -153,7 +153,7 @@ public class Cred extends Cmd {
}
return ret;
}
-
+
@Override
public void detailedHelp(int indentVar, StringBuilder sb) {
int indent = indentVar;
@@ -169,7 +169,7 @@ public class Cred extends Cmd {
sb.append('\n');
detailLine(sb,indent,"NOTE: AAF does support multiple creds with the same ID. Check with your org if you");
detailLine(sb,indent+2,"have this implemented. (For example, this is implemented for MechIDs at AT&T)");
- sb.append('\n');
+ sb.append('\n');
detailLine(sb,indent,"*NOTE: com.att.csp is a reserved Domain for Global Sign On");
detailLine(sb,indent,"Delegates can be listed by the User or by the Delegate");
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Delg.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Delg.java
index 3d226f7e..f5cb4499 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Delg.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Delg.java
@@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -62,7 +62,7 @@ public class Delg extends BaseCmd<User> {
int idx = index;
DelgRequest dr = new DelgRequest();
setStartEnd(dr);
-
+
int option= whichOption(options, args[idx++]);
String user = fullID(args[idx++]);
dr.setUser(user);
@@ -79,29 +79,29 @@ public class Delg extends BaseCmd<User> {
dr.setEnd(Chrono.timeStamp(date));
}
}
-
+
Future<DelgRequest> fp;
RosettaDF<DelgRequest> df = getDF(DelgRequest.class);
String verb;
setQueryParamsOn(client);
switch(option) {
- case 0:
+ case 0:
fp = client.create(AUTHZ_DELG, df, dr);
verb = "Added";
break;
- case 1:
- fp = client.update(AUTHZ_DELG, df, dr);
+ case 1:
+ fp = client.update(AUTHZ_DELG, df, dr);
verb = "Updated";
break;
- case 2:
- fp = client.delete(AUTHZ_DELG, df, dr);
+ case 2:
+ fp = client.delete(AUTHZ_DELG, df, dr);
verb = "Deleted";
break;
default:
throw new CadiException("Bad Argument");
};
-
+
if (fp.get(AAFcli.timeout())) {
pw().append("Delegate ");
pw().println(verb);
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ID.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ID.java
index 71d61f79..2c88e9fe 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ID.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ID.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -45,7 +45,7 @@ public class ID extends Cmd {
}
@Override
- public int _exec(int _idx, final String ... args) throws CadiException, APIException, LocatorException {
+ public int _exec(int _idx, final String ... args) throws CadiException, APIException, LocatorException {
int idx = _idx;
String key = args[idx++];
final int option = whichOption(options,key);
@@ -55,7 +55,7 @@ public class ID extends Cmd {
cr.setType(10);
if (args.length>idx)
cr.setEntry(args[idx]);
-
+
// Set Start/End commands
setStartEnd(cr);
Integer ret = same(new Retryable<Integer>() {
@@ -66,8 +66,8 @@ public class ID extends Cmd {
switch(option) {
case 0:
fp = client.create(
- CRED_PATH,
- getDF(CredRequest.class),
+ CRED_PATH,
+ getDF(CredRequest.class),
cr
);
verb = "Added ID [";
@@ -105,7 +105,7 @@ public class ID extends Cmd {
if (ret==null)ret = -1;
return ret;
}
-
+
@Override
public void detailedHelp(int _indent, StringBuilder sb) {
int indent = _indent;
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/List.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/List.java
index 212df8ab..b3011369 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/List.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/List.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -45,7 +45,7 @@ public class List extends BaseCmd<User> {
cmds.add(new ListActivity(this));
}
-
+
void report(Users users, boolean count, String ... str) {
reportHead(str);
java.util.List<aaf.v2_0.Users.User> sorted = users.getUser();
@@ -68,7 +68,7 @@ public class List extends BaseCmd<User> {
} else if(type!=null && type>=200) {
tag = "\n\tfingerprint: " + tag;
}
- pw().format(format,
+ pw().format(format,
user.getId(),
org.onap.aaf.auth.cmd.ns.List.getType(user),
date,
@@ -107,9 +107,9 @@ public class List extends BaseCmd<User> {
String format = reportColHead(" %-25s %-25s %-10s\n","User","Delegate","Expires");
String date = "XXXX-XX-XX";
for (Delg delg : delgs.getDelgs()) {
- if (!this.aafcli.isTest())
+ if (!this.aafcli.isTest())
date = Chrono.dateOnlyStamp(delg.getExpires());
- pw().printf(format,
+ pw().printf(format,
delg.getUser(),
delg.getDelegate(),
date
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListActivity.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListActivity.java
index 162dadac..30c71e55 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListActivity.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListActivity.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -42,7 +42,7 @@ public class ListActivity extends Cmd {
private static final String HEADER = "List Activity of User";
public ListActivity(List parent) {
- super(parent,"activity",
+ super(parent,"activity",
new Param("user",true));
}
@@ -53,9 +53,9 @@ public class ListActivity extends Cmd {
return same(new Retryable<Integer>() {
@Override
public Integer code(Rcli<?> client) throws CadiException, APIException {
-
+
Future<History> fp = client.read(
- "/authz/hist/user/"+user,
+ "/authz/hist/user/"+user,
getDF(History.class)
);
if (fp.get(AAFcli.timeout())) {
@@ -67,7 +67,7 @@ public class ListActivity extends Cmd {
}
});
}
-
+
@Override
public void detailedHelp(int indent, StringBuilder sb) {
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListApprovals.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListApprovals.java
index 068aacb1..828cdcbf 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListApprovals.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListApprovals.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -35,17 +35,17 @@ import org.onap.aaf.misc.env.APIException;
import aaf.v2_0.Approvals;
/**
- *
+ *
* @author Jonathan
*
*/
public class ListApprovals extends Cmd {
- private static final String HEADER = "List Approvals";
+ private static final String HEADER = "List Approvals";
private final static String[] options = {"user","approver","ticket"};
public ListApprovals(List parent) {
- super(parent,"approvals",
+ super(parent,"approvals",
new Param(optionsToString(options),true),
- new Param("value",true));
+ new Param("value",true));
}
@Override
@@ -64,7 +64,7 @@ public class ListApprovals extends Cmd {
@Override
public Integer code(Rcli<?> client) throws CadiException, APIException {
Future<Approvals> fp = client.read(
- "/authz/approval/"+type+'/'+fullValue,
+ "/authz/approval/"+type+'/'+fullValue,
getDF(Approvals.class)
);
if (fp.get(AAFcli.timeout())) {
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListDelegates.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListDelegates.java
index 28b5c9e7..788f1c77 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListDelegates.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListDelegates.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -39,10 +39,10 @@ import aaf.v2_0.Delgs;
*
*/
public class ListDelegates extends Cmd {
- private static final String HEADER = "List Delegates";
+ private static final String HEADER = "List Delegates";
private static final String[] options = {"user","delegate"};
public ListDelegates(List parent) {
- super(parent,"delegates",
+ super(parent,"delegates",
new Param(optionsToString(options),true),
new Param("id",true));
}
@@ -56,9 +56,9 @@ public class ListDelegates extends Cmd {
return same(new Retryable<Integer>() {
@Override
public Integer code(Rcli<?> client) throws CadiException, APIException {
-
+
Future<Delgs> fp = client.read(
- "/authz/delegates/" + key + '/' + id,
+ "/authz/delegates/" + key + '/' + id,
getDF(Delgs.class)
);
if (fp.get(AAFcli.timeout())) {
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForCreds.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForCreds.java
index 176787ea..07a19d36 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForCreds.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForCreds.java
@@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -52,7 +52,7 @@ public class ListForCreds extends Cmd {
public ListForCreds(List parent) {
super(parent,"cred",
new Param(optionsToString(options),true),
- new Param("value",true));
+ new Param("value",true));
}
@Override
@@ -65,7 +65,7 @@ public class ListForCreds extends Cmd {
@Override
public Integer code(Rcli<?> client) throws CadiException, APIException {
Future<Users> fp = client.read(
- "/authn/creds/"+which+'/'+value,
+ "/authn/creds/"+which+'/'+value,
getDF(Users.class)
);
if (fp.get(AAFcli.timeout())) {
@@ -74,7 +74,7 @@ public class ListForCreds extends Cmd {
@Override
public int compare(User u1, User u2) {
return u1.getId().compareTo(u2.getId());
- }
+ }
});
((org.onap.aaf.auth.cmd.user.List)parent).report(fp.value,option==1,HEADER+which,value);
if (fp.code()==404) {
@@ -87,7 +87,7 @@ public class ListForCreds extends Cmd {
}
});
}
-
+
@Override
public void detailedHelp(int indentParam, StringBuilder sb) {
int indent = indentParam;
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForPermission.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForPermission.java
index b40c96ce..0ab24900 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForPermission.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForPermission.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -49,10 +49,10 @@ import aaf.v2_0.Users.User;
public class ListForPermission extends Cmd {
private static final String HEADER = "List Users for Permission";
public ListForPermission(List parent) {
- super(parent,"perm",
+ super(parent,"perm",
new Param("type",true),
new Param("instance",true),
- new Param("action",true));
+ new Param("action",true));
}
@Override
@@ -68,10 +68,10 @@ public class ListForPermission extends Cmd {
if ("\\*".equals(action))action="*";
try {
Future<Users> fp = client.read(
- "/authz/users/perm/" +
+ "/authz/users/perm/" +
type + '/' +
- URLEncoder.encode(instance,Config.UTF_8) + '/' +
- action,
+ URLEncoder.encode(instance,Config.UTF_8) + '/' +
+ action,
getDF(Users.class)
);
if (fp.get(AAFcli.timeout())) {
@@ -89,7 +89,7 @@ public class ListForPermission extends Cmd {
}
});
}
-
+
@Override
public void detailedHelp(int _indent, StringBuilder sb) {
int indent = _indent;
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForRoles.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForRoles.java
index 4e539ac2..6fdf1628 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForRoles.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForRoles.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -42,7 +42,7 @@ import aaf.v2_0.Users;
public class ListForRoles extends Cmd {
private static final String HEADER = "List Users for Role";
public ListForRoles(List parent) {
- super(parent,"role", new Param("role",true));
+ super(parent,"role", new Param("role",true));
}
@Override
@@ -53,7 +53,7 @@ public class ListForRoles extends Cmd {
@Override
public Integer code(Rcli<?> client) throws CadiException, APIException {
Future<Users> fp = client.read(
- "/authz/users/role/"+role,
+ "/authz/users/role/"+role,
getDF(Users.class)
);
if (fp.get(AAFcli.timeout())) {
@@ -66,7 +66,7 @@ public class ListForRoles extends Cmd {
}
});
}
-
+
@Override
public void detailedHelp(int _indent, StringBuilder sb) {
int indent = _indent;
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Role.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Role.java
index b177778e..4261df67 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Role.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Role.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -36,7 +36,7 @@ import aaf.v2_0.UserRoleRequest;
/**
* p
- *
+ *
* @author Jonathan
*
*/
@@ -65,7 +65,7 @@ public class Role extends Cmd {
Future<?> fp = null;
if (args.length < 5) {
- throw new CadiException(build(new StringBuilder("Too few args: "), null).toString());
+ throw new CadiException(build(new StringBuilder("Too few args: "), null).toString());
}
String[] roles = args[idx++].split(",");
for (String role : roles) {
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/User.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/User.java
index 746f9c22..7176cbef 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/User.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/User.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/HMangrStub.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/HMangrStub.java
index bd2eeae5..6d366ed2 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/HMangrStub.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/HMangrStub.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,7 +34,7 @@ import org.onap.aaf.cadi.client.Retryable;
import org.onap.aaf.cadi.http.HMangr;
public class HMangrStub extends HMangr {
-
+
private Rcli<HttpURLConnection> clientMock;
public HMangrStub(Access access, Locator<URI> loc, Rcli<HttpURLConnection> clientMock) throws LocatorException {
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_AAFCli.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_AAFCli.java
index abe4c342..1a43a30a 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_AAFCli.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_AAFCli.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -147,12 +147,12 @@ public class JU_AAFCli {
public void eval10() throws Exception {
assertTrue(cli.eval("set @[ 123"));
}
-
+
@Test
public void eval11() throws Exception {
assertTrue(cli.eval("DETAILS @[ 123"));
}
-
+
@Test
public void eval12() throws Exception {
assertTrue(cli.eval(". |/, .\"0 \" "));
@@ -179,7 +179,7 @@ public class JU_AAFCli {
}
assertTrue(noError);
}
-
+
@Test
public void eval_randomString() throws Exception {
assertTrue(cli.eval("Some random string @#&*& to check complete 100 coverage"));
@@ -198,64 +198,64 @@ public class JU_AAFCli {
// TODO: Consider requiring a default in properties
env.setProperty(Config.AAF_DEFAULT_REALM,
System.getProperty(Config.AAF_DEFAULT_REALM, Config.getDefaultRealm()));
-
+
HBasicAuthSS ss = mock(HBasicAuthSS.class);
env.setProperty(Config.AAF_APPPASS, "test");
return new AAFcli(env, new OutputStreamWriter(System.out), hman, si, ss);
}
-
+
@Test
public void testVerbose() {
cli.verbose(true);
cli.verbose(false);
}
-
+
@Test
public void testClose() {
cli.close();
}
-
+
@Test
public void testTimeout() {
Assert.assertNotNull(cli.timeout());
}
-
+
@Test
public void testTest() {
Assert.assertNotNull(cli.isTest());
}
-
+
@Test
public void testIsDetailed() {
Assert.assertNotNull(cli.isDetailed());
}
-
+
@Test
public void testAddRequest() {
Assert.assertNotNull(cli.addRequest());
}
-
+
@Test
public void testForceString() {
cli.clearSingleLineProperties();
Assert.assertNull(cli.forceString());
}
-
+
@Test
public void testClearSingleLineProperties() {
cli.clearSingleLineProperties();
}
-
+
@Test
public void testGui() {
cli.gui(true);
cli.gui(false);
}
-
+
@Test
public void testMain() {
String[] strArr = {"\\*","test1"};
//cli.main(strArr);
}
-
+
}
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_BaseCmd.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_BaseCmd.java
index e2e2bff5..92fdc833 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_BaseCmd.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_BaseCmd.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -65,7 +65,7 @@ public class JU_BaseCmd {
assertEquals(bCmd._exec(4, "add", "del", "reset", "extend"), 0);
}
-
+
@Test
public void exec1() throws CadiException, APIException, LocatorException {
assertEquals(bCmd._exec(0, "add", "del", "reset", "extend"), 0);
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_BasicAuth.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_BasicAuth.java
index bfb4b671..a2074bf8 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_BasicAuth.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_BasicAuth.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -36,7 +36,7 @@ import junit.framework.Assert;
//TODO: Gabe [JUnit] Import missing
@RunWith(MockitoJUnitRunner.class)
public class JU_BasicAuth {
-
+
// @Test
// public void getID () {
// try {
@@ -47,9 +47,9 @@ public class JU_BasicAuth {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
-//
+//
// }
-
+
@Test
public void netYetTested() {
Assert.assertTrue(true);
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_Cmd.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_Cmd.java
index e3cfbd17..b31f1048 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_Cmd.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_Cmd.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -67,7 +67,7 @@ public class JU_Cmd {
CmdStub cmd1;
CmdStub cmd2;
AAFcli cli;
-
+
private class CmdStub extends Cmd {
@@ -75,7 +75,7 @@ public class JU_Cmd {
super(aafcli, name, params);
// TODO Auto-generated constructor stub
}
-
+
public CmdStub(Cmd parent, String name, Param[] params) {
super(parent, name, params);
// TODO Auto-generated constructor stub
@@ -86,40 +86,40 @@ public class JU_Cmd {
// TODO Auto-generated method stub
return 0;
}
-
+
@Override
public void error(Future<?> future) {
super.error(future);
}
}
-
+
@Before
public void setUp() throws APIException, LocatorException, GeneralSecurityException, IOException, CadiException {
cli = JU_AAFCli.getAAfCli();
Param[] param = new Param[] {new Param("name",true)};
-
+
cmd = new CmdStub(cli,"test", param);
cmd1 = new CmdStub(cmd,"test", param);
cmd2 = new CmdStub(cmd,"test", param);
}
-
+
@Test
public void testReportColHead() {
String[] args = new String[] {new String("test")};
cmd.reportColHead("format", args);
}
-
+
@Test
public void testBuilder() {
StringBuilder detail = new StringBuilder();
StringBuilder sb = new StringBuilder("test 123");
-
+
cmd.build(sb, detail);
detail.append("test");
cmd.build(sb, detail);
}
-
+
@Test
public void testApi() throws APIException, CadiException {
StringBuilder sb = new StringBuilder("test 123");
@@ -131,19 +131,19 @@ public class JU_Cmd {
Clear clr = new Clear(cache);
clr.detailedHelp(0, sb);
}
-
+
@Test
public void testToString() {
cmd.toString();
}
-
+
@Test
public void testFullID() {
cmd.fullID("test");
cmd.fullID("t@st");
cmd.fullID(null);
}
-
+
@Test
public void testError() {
Future<?> future = mock(Future.class);
@@ -161,32 +161,32 @@ public class JU_Cmd {
when(future.body()).thenReturn("<html>NotNull");
cmd.error(future);
}
-
+
@Test
public void testActivity() {
History hist = new History();
cmd.activity(hist, "test");
cmd.activity(hist, "te[st");
}
-
+
@Test
public void testWhichOption() throws CadiException {
String[] strArr = {"a", "b", "c"};
cmd.whichOption(strArr, "b");
}
-
+
@Test
public void testOneOf() throws APIException, CadiException, LocatorException {
Retryable retryable = mock(Retryable.class);
//cmd.oneOf(retryable, "host"); //TODO: AAF-111 need input for hMan
}
-
+
@Test
public void testExec() throws CadiException, APIException, LocatorException {
String[] strArr = {"a", "b", "c"};
cmd.exec(1, strArr);
}
-
-
+
+
}
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_DeprecatedCMD.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_DeprecatedCMD.java
index 32697473..c6dcc148 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_DeprecatedCMD.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_DeprecatedCMD.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -49,7 +49,7 @@ public class JU_DeprecatedCMD {
CmdStub cmd;
AAFcli cli;
-
+
private class CmdStub extends Cmd {
public CmdStub(AAFcli aafcli, String name, Param[] params) {
@@ -62,14 +62,14 @@ public class JU_DeprecatedCMD {
// TODO Auto-generated method stub
return 0;
}
-
+
}
-
+
@Test
public void testExec() throws CadiException, APIException, LocatorException, GeneralSecurityException, IOException {
cli = JU_AAFCli.getAAfCli();
Param[] param = new Param[] {new Param("name",true)};
-
+
cmd = new CmdStub(cli,"test", param);
DeprecatedCMD deprecatedcmd = new DeprecatedCMD(cmd,"test", "test");
deprecatedcmd._exec(0, "test");
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_Help.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_Help.java
index d2e7b971..92cb9b8a 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_Help.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_Help.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -51,7 +51,7 @@ import junit.framework.Assert;
@RunWith(MockitoJUnitRunner.class)
public class JU_Help {
-
+
private static AAFcli cli;
private static Help help;
String[] strArr = {"null","null","b","c"};
@@ -62,7 +62,7 @@ public class JU_Help {
super(aafcli, name, params);
// TODO Auto-generated constructor stub
}
-
+
public CmdStub(Cmd parent, String name, Param[] params) {
super(parent, name, params);
// TODO Auto-generated constructor stub
@@ -73,17 +73,17 @@ public class JU_Help {
// TODO Auto-generated method stub
return 0;
}
-
+
@Override
public void error(Future<?> future) {
super.error(future);
- }
-
+ }
+
}
-
+
@Mock
private static List<Cmd> cmds;
-
+
@Before
public void setUp() throws APIException, LocatorException, GeneralSecurityException, IOException, CadiException {
cli = JU_AAFCli.getAAfCli();
@@ -93,7 +93,7 @@ public class JU_Help {
cmds.add(cmd);
help = new Help(cli, cmds);
}
-
+
@Test
public void exec_HTTP_200() {
try {
@@ -104,7 +104,7 @@ public class JU_Help {
e.printStackTrace();
}
}
-
+
@Test
public void exec_HTTP_200_1() {
try {
@@ -114,7 +114,7 @@ public class JU_Help {
e.printStackTrace();
}
}
-
+
@Test
public void detailhelp() {
boolean hasError=false;
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_Version.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_Version.java
index de8e83a6..e2bdcaee 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_Version.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_Version.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -46,22 +46,22 @@ import junit.framework.Assert;
//TODO: Gabe [JUnit] Import missing
@RunWith(MockitoJUnitRunner.class)
public class JU_Version {
-
+
private static AAFcli cli;
private static Version version;
-
+
@BeforeClass
public static void setUp() throws APIException, LocatorException, GeneralSecurityException, IOException, CadiException {
cli = JU_AAFCli.getAAfCli();
version = new Version(cli);
}
-
+
// @Test
// public void exec_HTTP_200() throws CadiException, APIException, LocatorException {
// assertEquals(version._exec(0, "Version"), HttpStatus.OK_200);
//
// }
-
+
@Test //TODO: Temporary fix AAF-111
public void netYetTested() {
Assert.assertTrue(true);
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/mgmt/JU_Clear.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/mgmt/JU_Clear.java
index 4102e595..b5fb99da 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/mgmt/JU_Clear.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/mgmt/JU_Clear.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -59,17 +59,17 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_Clear {
-
+
private static Clear clr;
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
Cache cache;
Mgmt mgmt;
-
+
@Before
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
prop = new PropAccess();
@@ -77,14 +77,14 @@ public class JU_Clear {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
-// hman = new HMangr(aEnv, loc);
+// hman = new HMangr(aEnv, loc);
// aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
// mgmt = new Mgmt(aafcli);
// cache = new Cache(mgmt);
// clr = new Clear(cache);
-
+
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -95,10 +95,10 @@ public class JU_Clear {
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
// HRcli hcli = new HRcli(hman, uri, value, secSet);
// String[] strArr = {"grant","ungrant","setTo","grant","ungrant","setTo"};
- //clr._exec(0, strArr);
+ //clr._exec(0, strArr);
}
-
+
@Test
public void testDetailedHelp() throws CadiException {
Define define = new Define();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/mgmt/JU_Deny.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/mgmt/JU_Deny.java
index 5b372881..ac33afdc 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/mgmt/JU_Deny.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/mgmt/JU_Deny.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -59,14 +59,14 @@ import java.net.URISyntaxException;
import org.junit.Test;
public class JU_Deny {
-
+
Deny deny;
DenySomething denyS;
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
@Before
@@ -76,15 +76,15 @@ public class JU_Deny {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
-// hman = new HMangr(aEnv, loc);
+// hman = new HMangr(aEnv, loc);
// aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
// Mgmt mgmt = new Mgmt(aafcli);
// deny = new Deny(mgmt);
//denyS = deny.new DenySomething(deny,"ip","ipv4or6[,ipv4or6]*");
}
-
-
+
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
@@ -99,10 +99,10 @@ public class JU_Deny {
// String[] strArr = {"add","del", "add","del"};
// deny._exec(0, strArr);
-//
+//
// String[] strArr1 = {"del", "add","del"};
// deny._exec(0, strArr1);
-
+
}
}
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/mgmt/JU_Log.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/mgmt/JU_Log.java
index 7edeaa11..01100575 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/mgmt/JU_Log.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/mgmt/JU_Log.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -56,16 +56,16 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_Log {
-
+
private static Log log;
private static Log log1;
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp() throws APIException, LocatorException, CadiException {
prop = new PropAccess();
@@ -73,12 +73,12 @@ public class JU_Log {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
Mgmt mgmt = new Mgmt(aafcli);
log1 = new Log(mgmt);
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -97,7 +97,7 @@ public class JU_Log {
// log1._exec(0, strArr1);
}
-
+
@Test
public void testDetailedHelp() throws CadiException {
Define define = new Define();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/mgmt/JU_SessClear.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/mgmt/JU_SessClear.java
index 5e88dcad..a51dbf48 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/mgmt/JU_SessClear.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/mgmt/JU_SessClear.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -57,15 +57,15 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_SessClear {
-
+
private static SessClear sessclr;
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp() throws LocatorException, APIException, CadiException {
prop = new PropAccess();
@@ -73,13 +73,13 @@ public class JU_SessClear {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
-// hman = new HMangr(aEnv, loc);
+// hman = new HMangr(aEnv, loc);
// aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
// Mgmt mgmt = new Mgmt(aafcli);
// Session sess = new Session(mgmt);
// sessclr = new SessClear(sess);
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -95,7 +95,7 @@ public class JU_SessClear {
//sessclr._exec(0, strArr);
}
-
+
@Test
public void testDetailedHelp() throws CadiException {
Define define = new Define();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Admin.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Admin.java
index 8a080ee8..faca9fff 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Admin.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Admin.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -58,14 +58,14 @@ import org.onap.aaf.misc.env.APIException;
public class JU_Admin {
private static Admin admin;
-
+
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp() throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
@@ -74,13 +74,13 @@ public class JU_Admin {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
NS ns = new NS(aafcli);
admin = new Admin(ns);
-
+
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -93,10 +93,10 @@ public class JU_Admin {
// HRcli hcli = new HRcli(hman, uri, item, secSet);
// String[] strArr = {"add", "del","add","add"};
// admin._exec(0, strArr);
-//
+//
// String[] strArr1 = {"del","add","add"};
// admin._exec(0, strArr1);
-
+
}
@Test
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Attrib.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Attrib.java
index 7ccf6578..62e32706 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Attrib.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Attrib.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -67,7 +67,7 @@ public class JU_Attrib {
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
@Before
@@ -77,7 +77,7 @@ public class JU_Attrib {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
NS ns = new NS(aafcli);
attrib = new Attrib(ns);
@@ -95,13 +95,13 @@ public class JU_Attrib {
// HRcli hcli = new HRcli(hman, uri, item, secSet);
// String[] strArr = {"add","upd","del","add","upd","del"};
// attrib._exec(0, strArr);
-//
+//
// String[] strArr1 = {"upd","del","add","upd","del","add"};
// attrib._exec(0, strArr1);
-//
+//
// String[] strArr2 = {"del","add","upd","del","add","upd"};
// attrib._exec(0, strArr2);
-
+
}
@Test
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Create.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Create.java
index a0e95ab8..f76fcd52 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Create.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Create.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -57,9 +57,9 @@ public class JU_Create {
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp() throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
prop = new PropAccess();
@@ -67,13 +67,13 @@ public class JU_Create {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
NS ns = new NS(aafcli);
create = new Create(ns);
}
-
-
+
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
@@ -87,7 +87,7 @@ public class JU_Create {
HRcli hcli = new HRcli(hman, uri, item, secSet);
String[] strArr = {"add","upd","del","add","upd","del"};
create._exec(0, strArr);
-
+
}
@Test
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Delete.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Delete.java
index 2c12d51f..3ac84029 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Delete.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Delete.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -55,9 +55,9 @@ public class JU_Delete {
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp() throws APIException, LocatorException, GeneralSecurityException, IOException, CadiException {
prop = new PropAccess();
@@ -65,7 +65,7 @@ public class JU_Delete {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
NS ns = new NS(aafcli);
delete = new Delete(ns);
@@ -84,7 +84,7 @@ public class JU_Delete {
// HRcli hcli = new HRcli(hman, uri, item, secSet);
// String[] strArr = {"add","upd","del","add","upd","del"};
// delete._exec(0, strArr);
-
+
}
@Test
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Describe.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Describe.java
index 9cc8ed17..601f0a23 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Describe.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Describe.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -49,15 +49,15 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_Describe {
-
+
private static Describe desc;
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
prop = new PropAccess();
@@ -65,12 +65,12 @@ public class JU_Describe {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
NS ns = new NS(aafcli);
desc = new Describe(ns);
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -83,9 +83,9 @@ public class JU_Describe {
// HRcli hcli = new HRcli(hman, uri, item, secSet);
// String[] strArr = {"add","upd","del","add","upd","del"};
// desc._exec(0, strArr);
-
+
}
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_List.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_List.java
index e4100a02..683db0b3 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_List.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_List.java
@@ -54,19 +54,19 @@ import static org.mockito.Mockito.*;
import org.junit.Test;
public class JU_List {
-
+
List list;
AAFcli aafcli;
User user;
-
+
private class NssStub extends Nss {
- public void addNs(Nss.Ns ns) {
+ public void addNs(Nss.Ns ns) {
if (this.ns == null) {
this.ns = new ArrayList<>();
}
this.ns.add(ns);
}
-
+
private class NsStub extends Ns{
public void addAttrib(Nss.Ns.Attrib attrib) {
if ( this.attrib == null) {
@@ -74,14 +74,14 @@ public class JU_List {
}
this.attrib.add(attrib);
}
-
+
public void addResponsible(String str) {
if (this.responsible == null) {
this.responsible = new ArrayList<>();
}
this.responsible.add(str);
}
-
+
public void addAdmin(String str) {
if (this.admin == null) {
this.admin = new ArrayList<>();
@@ -89,12 +89,12 @@ public class JU_List {
this.admin.add(str);
}
}
-
-
-
-
+
+
+
+
}
-
+
@Before
public void setUp() throws APIException, LocatorException, CadiException {
@@ -102,14 +102,14 @@ public class JU_List {
AuthzEnv aEnv = new AuthzEnv();
Writer wtr = mock(Writer.class);
Locator loc = mock(Locator.class);
- HMangr hman = new HMangr(aEnv, loc);
+ HMangr hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, null);
user = new User();
NS ns = new NS(aafcli);
-
+
list = new List(ns);
}
-
+
@Test
public void testReport() throws Exception {
Future<Nss> fu = mock(Future.class);
@@ -124,10 +124,10 @@ public class JU_List {
nssStub.addNs(nsStub);
fu.value = nssStub;
aafcli.eval("DETAILS @[ 123");
-
+
list.report(fu, "test");
}
-
+
@Test
public void testGetType() {
Assert.assertEquals("n/a", list.getType(user));
@@ -140,5 +140,5 @@ public class JU_List {
user.setType(200);
Assert.assertEquals("x509", list.getType(user));
}
-
+
}
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListActivity.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListActivity.java
index 0f8ae5c4..f534c7fa 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListActivity.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListActivity.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -58,15 +58,15 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListActivity {
-
+
private static ListActivity lsActivity;
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
prop = new PropAccess();
@@ -74,13 +74,13 @@ public class JU_ListActivity {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
NS ns = new NS(aafcli);
List ls = new List(ns);
lsActivity = new ListActivity(ls);
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -93,9 +93,9 @@ public class JU_ListActivity {
HRcli hcli = new HRcli(hman, uri, item, secSet);
String[] strArr = {"add","upd","del","add","upd","del"};
//lsActivity._exec(0, strArr);
-
+
}
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListAdminResponsible.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListAdminResponsible.java
index 2315f8cf..31bfa504 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListAdminResponsible.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListAdminResponsible.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -57,15 +57,15 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListAdminResponsible {
-
+
private static ListAdminResponsible lsAdminRes;
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
prop = new PropAccess();
@@ -73,13 +73,13 @@ public class JU_ListAdminResponsible {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
NS ns = new NS(aafcli);
List ls = new List(ns);
lsAdminRes = new ListAdminResponsible(ls);
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -92,9 +92,9 @@ public class JU_ListAdminResponsible {
HRcli hcli = new HRcli(hman, uri, item, secSet);
String[] strArr = {"add","upd","del","add","upd","del"};
//lsAdminRes._exec(0, strArr);
-
+
}
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListByName.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListByName.java
index 63ebd744..c2106ebe 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListByName.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListByName.java
@@ -8,9 +8,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -58,15 +58,15 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListByName {
-
+
private static ListByName lsByName;
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
prop = new PropAccess();
@@ -74,13 +74,13 @@ public class JU_ListByName {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
NS ns = new NS(aafcli);
List ls = new List(ns);
lsByName = new ListByName(ls);
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -93,9 +93,9 @@ public class JU_ListByName {
HRcli hcli = new HRcli(hman, uri, item, secSet);
String[] strArr = {"add","upd","del","add","upd","del"};
//lsByName._exec(0, strArr);
-
+
}
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListChildren.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListChildren.java
index 3f76cd23..6cc38339 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListChildren.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListChildren.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -42,9 +42,9 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListChildren {
-
+
private static ListChildren lsChildren;
-
+
@BeforeClass
public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
AAFcli cli = JU_AAFCli.getAAfCli();
@@ -52,7 +52,7 @@ public class JU_ListChildren {
List ls = new List(ns);
lsChildren = new ListChildren(ls);
}
-
+
// @Test
// public void exec() {
// try {
@@ -68,7 +68,7 @@ public class JU_ListChildren {
// e.printStackTrace();
// }
// }
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListNsKeysByAttrib.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListNsKeysByAttrib.java
index 68a0337c..c355948c 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListNsKeysByAttrib.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListNsKeysByAttrib.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -41,9 +41,9 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListNsKeysByAttrib {
-
+
private static ListNsKeysByAttrib lsNsKeys;
-
+
@BeforeClass
public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
AAFcli cli = JU_AAFCli.getAAfCli();
@@ -51,7 +51,7 @@ public class JU_ListNsKeysByAttrib {
List ls = new List(ns);
lsNsKeys = new ListNsKeysByAttrib(ls);
}
-
+
// @Test
// public void exec() {
// try {
@@ -67,7 +67,7 @@ public class JU_ListNsKeysByAttrib {
// e.printStackTrace();
// }
// }
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListUsers.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListUsers.java
index f400e16d..264a42c0 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListUsers.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListUsers.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -56,7 +56,7 @@ public class JU_ListUsers {
NS ns;
List list;
ListUsers lUsers;
-
+
@Before
public void setUp() throws APIException, LocatorException, GeneralSecurityException, IOException, CadiException {
cli = JU_AAFCli.getAAfCli();
@@ -64,14 +64,14 @@ public class JU_ListUsers {
list = new List(ns);
lUsers = new ListUsers(list);
}
-
+
@Test
public void testReports() throws DatatypeConfigurationException {
Users.User user = new Users.User();
GregorianCalendar gcal = new GregorianCalendar();
XMLGregorianCalendar xgcal = DatatypeFactory.newInstance().newXMLGregorianCalendar(gcal);
user.setExpires(xgcal);
-
+
lUsers.report("header", "ns");
lUsers.report("subHead");
lUsers.report("prefix", user);
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListUsersContact.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListUsersContact.java
index e0029791..19f12e08 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListUsersContact.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListUsersContact.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -59,13 +59,13 @@ public class JU_ListUsersContact {
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
NS ns;
List list;
ListUsers lUsers;
ListUsersContact lUContact;
-
+
@Before
public void setUp() throws LocatorException, APIException, CadiException {
prop = new PropAccess();
@@ -73,13 +73,13 @@ public class JU_ListUsersContact {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
ns = new NS(aafcli);
list = new List(ns);
lUsers = new ListUsers(list);
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
lUContact = new ListUsersContact(lUsers);
@@ -92,9 +92,9 @@ public class JU_ListUsersContact {
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
HRcli hcli = new HRcli(hman, uri, item, secSet);
//lUContact._exec(0, "test");
-
+
}
-
+
@Test
public void testDetailedHelp() {
lUContact = new ListUsersContact(lUsers);
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListUsersInRole.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListUsersInRole.java
index 4abc6e3c..ad4f8608 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListUsersInRole.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListUsersInRole.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListUsersWithPerm.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListUsersWithPerm.java
index ee514db6..9fb8a0c4 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListUsersWithPerm.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_ListUsersWithPerm.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -71,7 +71,7 @@ public class JU_ListUsersWithPerm {
}
assertEquals(hasNoError, true);
}
-
+
@Test //TODO: Temporary fix AAF-111
public void netYetTested() {
Assert.assertTrue(true);
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Owner.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Owner.java
index 2b552b91..c418b389 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Owner.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Owner.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -60,14 +60,14 @@ public class JU_Owner {
NS ns = new NS(cli);
owner = new Owner(ns);
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
String[] strArr = {"add","del","add","del"};
//owner._exec(0, strArr);
}
-
+
@Test
public void detailedHelp() {
boolean hasNoError = true;
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Responsible.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Responsible.java
index 515a6768..5fcf3109 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Responsible.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/ns/JU_Responsible.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -67,7 +67,7 @@ public class JU_Responsible {
// }
// assertEquals(hasNoError, true);
// }
-
+
@Test
public void netYetTested() {
Assert.assertTrue(true);
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Create.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Create.java
index 80c6d825..6118e3d7 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Create.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Create.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -60,19 +60,19 @@ public class JU_Create {
@Mock private Writer wrtMock;
@Mock private Rcli<HttpURLConnection> clientMock;
@Mock private Future<String> futureMock;
-
+
private static Create create;
private NS ns;
private PropAccess access;
- private HMangrStub hman;
+ private HMangrStub hman;
private AuthzEnv aEnv;
private AAFcli aafcli;
-
+
@Before
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
MockitoAnnotations.initMocks(this);
-
+
when(clientMock.create(any(), any(), any(String.class))).thenReturn(futureMock);
when(clientMock.delete(any(), any(), any(String.class))).thenReturn(futureMock);
when(clientMock.update(any(), any(), any(String.class))).thenReturn(futureMock);
@@ -81,18 +81,18 @@ public class JU_Create {
access = new PropAccess(new PrintStream(new ByteArrayOutputStream()), new String[0]);
aEnv = new AuthzEnv();
aafcli = new AAFcli(access, aEnv, wrtMock, hman, null, ssMock);
-
+
ns = new NS(aafcli);
create = new Create(ns);
}
-
+
@Test
public void testError() throws APIException, LocatorException, CadiException, URISyntaxException {
create._exec(0, new String[] {"grant","ungrant","setTo","grant","ungrant","setTo"});
create._exec(4, new String[] {"grant","ungrant","setTo","grant","ungrant","setTo"});
}
-
+
@Test
public void testSuccess1() throws APIException, LocatorException, CadiException, URISyntaxException {
when(futureMock.code()).thenReturn(202);
@@ -104,11 +104,11 @@ public class JU_Create {
when(futureMock.get(any(Integer.class))).thenReturn(true);
create._exec(0, new String[] {"grant","ungrant","setTo","grant","ungrant","setTo"});
}
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
create.detailedHelp(0, sb);
}
-
+
}
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Delete.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Delete.java
index 3cfdf5c9..232e5d87 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Delete.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Delete.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -58,7 +58,7 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_Delete {
-
+
@Mock private SecuritySetter<HttpURLConnection> ssMock;
@Mock private Locator<URI> locMock;
@Mock private Writer wrtMock;
@@ -66,12 +66,12 @@ public class JU_Delete {
@Mock private Future<String> futureMock;
private static Delete del;
-
+
private PropAccess access;
- private HMangrStub hman;
+ private HMangrStub hman;
private AuthzEnv aEnv;
private AAFcli aafcli;
-
+
@Before
public void setUp() throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
MockitoAnnotations.initMocks(this);
@@ -90,7 +90,7 @@ public class JU_Delete {
del = new Delete(perm);
}
-
+
@Test
public void testExecError() throws APIException, LocatorException, CadiException, URISyntaxException {
del._exec(0, new String[] {"grant","ungrant","setTo","grant","ungrant","setTo"});
@@ -101,17 +101,17 @@ public class JU_Delete {
when(futureMock.code()).thenReturn(202);
del._exec(0, new String[] {"grant","ungrant","setTo","grant","ungrant","setTo"});
}
-
+
@Test
public void testExecSuccess2() throws APIException, LocatorException, CadiException, URISyntaxException {
when(futureMock.get(any(Integer.class))).thenReturn(true);
del._exec(0, new String[] {"grant","ungrant","setTo","grant","ungrant","setTo"});
}
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
del.detailedHelp(0, sb);
}
-
+
}
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Describe.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Describe.java
index 29a72a3c..435d03e1 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Describe.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Describe.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -65,12 +65,12 @@ public class JU_Describe {
@Mock private Future<String> futureMock;
private PropAccess access;
- private HMangrStub hman;
+ private HMangrStub hman;
private AuthzEnv aEnv;
private AAFcli aafcli;
-
+
private Describe desc;
-
+
@Before
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
MockitoAnnotations.initMocks(this);
@@ -89,24 +89,24 @@ public class JU_Describe {
desc = new Describe(perm);
}
-
+
@Test
public void testExecError() throws APIException, LocatorException, CadiException, URISyntaxException {
desc._exec(0, new String[] {"grant","ungrant","setTo","grant","ungrant","setTo"});
}
-
+
@Test
public void testExecSuccess1() throws APIException, LocatorException, CadiException, URISyntaxException {
when(futureMock.code()).thenReturn(202);
desc._exec(0, new String[] {"grant","ungrant","setTo","grant","ungrant","setTo"});
}
-
+
@Test
public void testExecSuccess2() throws APIException, LocatorException, CadiException, URISyntaxException {
when(futureMock.get(any(Integer.class))).thenReturn(true);
desc._exec(0, new String[] {"grant","ungrant","setTo","grant","ungrant","setTo"});
}
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Grant.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Grant.java
index ebd5f5f9..02f3e13a 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Grant.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Grant.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -57,7 +57,7 @@ import org.onap.aaf.auth.cmd.test.HMangrStub;
@RunWith(MockitoJUnitRunner.class)
public class JU_Grant {
-
+
private static Grant grant;
@Mock private SecuritySetter<HttpURLConnection> ssMock;
@@ -67,10 +67,10 @@ public class JU_Grant {
@Mock private Future<String> futureMock;
private PropAccess access;
- private HMangrStub hman;
+ private HMangrStub hman;
private AuthzEnv aEnv;
private AAFcli aafcli;
-
+
@Before
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
MockitoAnnotations.initMocks(this);
@@ -94,20 +94,20 @@ public class JU_Grant {
public void testExecError() throws APIException, LocatorException, CadiException, URISyntaxException {
grant._exec(0, new String[] {"grant","type","instance","action","role"});
}
-
+
@Test
public void testExecSuccess1() throws APIException, LocatorException, CadiException, URISyntaxException {
when(futureMock.code()).thenReturn(202);
grant._exec(0, new String[] {"grant","type","instance","action","role"});
}
-
+
@Test
public void testExecSuccess2() throws APIException, LocatorException, CadiException, URISyntaxException {
when(futureMock.get(any(Integer.class))).thenReturn(true);
grant._exec(0, new String[] {"grant","type","instance","action","role"});
}
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListActivity.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListActivity.java
index c28f65bd..a658ec7a 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListActivity.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListActivity.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -58,15 +58,15 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListActivity {
-
+
private static ListActivity lsActivity;
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
prop = new PropAccess();
@@ -74,14 +74,14 @@ public class JU_ListActivity {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
Role role = new Role(aafcli);
Perm perm = new Perm(role);
List ls = new List(perm);
lsActivity = new ListActivity(ls);
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -96,7 +96,7 @@ public class JU_ListActivity {
//lsActivity._exec(0, strArr);
}
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListByNS.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListByNS.java
index c6113003..96106797 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListByNS.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListByNS.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -42,9 +42,9 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListByNS {
-
+
private static ListByNS lsByNS;
-
+
@BeforeClass
public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
AAFcli cli = JU_AAFCli.getAAfCli();
@@ -53,7 +53,7 @@ public class JU_ListByNS {
List ls = new List(perm);
lsByNS = new ListByNS(ls);
}
-
+
// @Test
// public void exec() {
// try {
@@ -69,7 +69,7 @@ public class JU_ListByNS {
// e.printStackTrace();
// }
// }
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListByName.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListByName.java
index 856867c8..b319a7b2 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListByName.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListByName.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -58,15 +58,15 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListByName {
-
+
private static ListByName lsByName;
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
prop = new PropAccess();
@@ -74,14 +74,14 @@ public class JU_ListByName {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
Role role = new Role(aafcli);
Perm perm = new Perm(role);
List ls = new List(perm);
lsByName = new ListByName(ls);
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -96,7 +96,7 @@ public class JU_ListByName {
//lsByName._exec(0, strArr);
}
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListByRole.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListByRole.java
index 600d1c4f..f471e4e4 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListByRole.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListByRole.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -42,9 +42,9 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListByRole {
-
+
private static ListByRole lsByRole;
-
+
@BeforeClass
public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
AAFcli cli = JU_AAFCli.getAAfCli();
@@ -53,7 +53,7 @@ public class JU_ListByRole {
List ls = new List(perm);
lsByRole = new ListByRole(ls);
}
-
+
// @Test
// public void exec() {
// try {
@@ -69,7 +69,7 @@ public class JU_ListByRole {
// e.printStackTrace();
// }
// }
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListByUser.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListByUser.java
index 6c451d08..f7a48d9b 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListByUser.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_ListByUser.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -42,9 +42,9 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListByUser {
-
+
private static ListByUser lsByName;
-
+
@BeforeClass
public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
AAFcli cli = JU_AAFCli.getAAfCli();
@@ -53,7 +53,7 @@ public class JU_ListByUser {
List ls = new List(perm);
lsByName = new ListByUser(ls);
}
-
+
// @Test
// public void exec() {
// try {
@@ -69,7 +69,7 @@ public class JU_ListByUser {
// e.printStackTrace();
// }
// }
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Rename.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Rename.java
index c5ae3d2c..b7eef51e 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Rename.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Rename.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -57,15 +57,15 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_Rename {
-
+
private static Rename rename;
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
prop = new PropAccess();
@@ -73,13 +73,13 @@ public class JU_Rename {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
Role role = new Role(aafcli);
Perm perm = new Perm(role);
rename = new Rename(perm);
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -92,9 +92,9 @@ public class JU_Rename {
// HRcli hcli = new HRcli(hman, uri, item, secSet);
// String[] strArr = {"grant","ungrant","setTo","grant","ungrant","setTo"};
// rename._exec(0, strArr);
-
+
}
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_CreateDelete.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_CreateDelete.java
index c863f9e9..3c7d4c03 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_CreateDelete.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_CreateDelete.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -56,15 +56,15 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_CreateDelete {
-
+
private static CreateDelete createDel;
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
prop = new PropAccess();
@@ -72,12 +72,12 @@ public class JU_CreateDelete {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
Role role = new Role(aafcli);
createDel = new CreateDelete(role);
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -90,12 +90,12 @@ public class JU_CreateDelete {
// HRcli hcli = new HRcli(hman, uri, item, secSet);
// String[] strArr = {"create","delete","create","delete"};
// createDel._exec(0, strArr);
-//
+//
// String[] strArr1 = {"delete","create","delete"};
// createDel._exec(0, strArr1);
-
+
}
-
+
@Test
public void testDetailedHelp() {
boolean hasNoError = true;
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_Describe.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_Describe.java
index a93a2ae4..9bddbeb8 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_Describe.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_Describe.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -50,15 +50,15 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_Describe {
-
+
private static Describe desc;
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
prop = new PropAccess();
@@ -66,12 +66,12 @@ public class JU_Describe {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
Role role = new Role(aafcli);
desc = new Describe(role);
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -84,9 +84,9 @@ public class JU_Describe {
// HRcli hcli = new HRcli(hman, uri, item, secSet);
// String[] strArr = {"add","upd","del","add","upd","del"};
// desc._exec(0, strArr);
-
+
}
-
+
@Test
public void detailedHelp() {
boolean hasNoError = true;
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_List.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_List.java
index 4ddd421a..bbdb77e8 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_List.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_List.java
@@ -66,7 +66,7 @@ import java.util.ArrayList;
import org.junit.Test;
public class JU_List {
-
+
AAFcli cli;
Role role;
List list;
@@ -74,7 +74,7 @@ public class JU_List {
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
private class ListRolesStub extends List {
@@ -84,7 +84,7 @@ public class JU_List {
// TODO Auto-generated constructor stub
}
}
-
+
private class RolesStub extends Roles {
public void addRole(aaf.v2_0.Role role) {
if (this.role == null) {
@@ -93,17 +93,17 @@ public class JU_List {
this.role.add(role);
}
}
-
+
private class RoleStub extends aaf.v2_0.Role {
-
+
public void addPerms(Pkey perms) {
if (this.perms == null) {
this.perms = new ArrayList<>();
}
- this.perms.add(perms);
+ this.perms.add(perms);
}
}
-
+
@Before
public void setUp() throws APIException, LocatorException, GeneralSecurityException, IOException, CadiException{
prop = new PropAccess();
@@ -111,19 +111,19 @@ public class JU_List {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
role = new Role(aafcli);
list = new List(role);
}
-
+
@Test
public void testRoles() throws APIException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
Role role = new Role(aafcli);
ListRolesStub listStub = new ListRolesStub(role);
Future future = mock(Future.class);
Rcli rcli = mock(Rcli.class);
-
+
Class c = listStub.getClass();
Class[] cArg = new Class[3];
cArg[0] = Future.class;
@@ -132,9 +132,9 @@ public class JU_List {
//Method listMethod = c.getDeclaredMethod("list", cArg);
//listMethod.setAccessible(true);
//listMethod.invoke(listStub, future, rcli, "test");
-
+
}
-
+
@Test
public void testReport() throws Exception {
UserRoles urs = new UserRoles();
@@ -152,7 +152,7 @@ public class JU_List {
role.addPerms(pkey);
list.report(roles, perms , null , "test");
list.report(roles, perms , urs , "test");
-
+
aafcli.eval("DETAILS @[ 123");
role.setName("test");
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListActivity.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListActivity.java
index c8ff94f3..1c5e586b 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListActivity.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListActivity.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -57,15 +57,15 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListActivity {
-
+
private static ListActivity lsActivity;
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
prop = new PropAccess();
@@ -73,13 +73,13 @@ public class JU_ListActivity {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
Role role = new Role(aafcli);
List ls = new List(role);
lsActivity = new ListActivity(ls);
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -92,9 +92,9 @@ public class JU_ListActivity {
HRcli hcli = new HRcli(hman, uri, item, secSet);
String[] strArr = {"add","upd","del","add","upd","del"};
//lsActivity._exec(0, strArr);
-
+
}
-
+
@Test
public void detailedHelp() {
boolean hasNoError = true;
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByNS.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByNS.java
index b58e44f5..2369f143 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByNS.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByNS.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -41,9 +41,9 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListByNS {
-
+
private static ListByNS lsByNS;
-
+
@BeforeClass
public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
AAFcli cli = JU_AAFCli.getAAfCli();
@@ -51,7 +51,7 @@ public class JU_ListByNS {
List ls = new List(role);
lsByNS = new ListByNS(ls);
}
-
+
// @Test
// public void exec() {
// try {
@@ -67,7 +67,7 @@ public class JU_ListByNS {
// e.printStackTrace();
// }
// }
-
+
@Test
public void detailedHelp() {
boolean hasNoError = true;
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByNameOnly.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByNameOnly.java
index c8a87170..79156c19 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByNameOnly.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByNameOnly.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -57,15 +57,15 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListByNameOnly {
-
+
private static ListByNameOnly lsByName;
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
prop = new PropAccess();
@@ -73,13 +73,13 @@ public class JU_ListByNameOnly {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
Role role = new Role(aafcli);
List ls = new List(role);
lsByName = new ListByNameOnly(ls);
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -92,9 +92,9 @@ public class JU_ListByNameOnly {
HRcli hcli = new HRcli(hman, uri, item, secSet);
String[] strArr = {"add","upd","del","add","upd","del"};
//lsByName._exec(0, strArr);
-
+
}
-
+
@Test
public void detailedHelp() {
boolean hasNoError = true;
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByPerm.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByPerm.java
index 44f642e1..646bffd8 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByPerm.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByPerm.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -41,9 +41,9 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListByPerm {
-
+
private static ListByPerm lsByPerm;
-
+
@BeforeClass
public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
AAFcli cli = JU_AAFCli.getAAfCli();
@@ -51,7 +51,7 @@ public class JU_ListByPerm {
List ls = new List(role);
lsByPerm = new ListByPerm(ls);
}
-
+
// @Test
// public void exec() {
// try {
@@ -67,7 +67,7 @@ public class JU_ListByPerm {
// e.printStackTrace();
// }
// }
-
+
@Test
public void detailedHelp() {
boolean hasNoError = true;
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByRole.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByRole.java
index 38b42904..a93e18f5 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByRole.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByRole.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -41,9 +41,9 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListByRole {
-
+
private static ListByRole lsByRole;
-
+
@BeforeClass
public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
AAFcli cli = JU_AAFCli.getAAfCli();
@@ -51,7 +51,7 @@ public class JU_ListByRole {
List ls = new List(role);
lsByRole = new ListByRole(ls);
}
-
+
// @Test
// public void exec() {
// try {
@@ -67,7 +67,7 @@ public class JU_ListByRole {
// e.printStackTrace();
// }
// }
-
+
@Test
public void detailedHelp() {
boolean hasNoError = true;
@@ -78,5 +78,5 @@ public class JU_ListByRole {
}
assertEquals(hasNoError, true);
}
-
+
}
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByUser.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByUser.java
index e4dd4ad1..1ab4da80 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByUser.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_ListByUser.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -57,15 +57,15 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListByUser {
-
+
private static ListByUser lsByUser;
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
prop = new PropAccess();
@@ -73,13 +73,13 @@ public class JU_ListByUser {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
Role role = new Role(aafcli);
List ls = new List(role);
lsByUser = new ListByUser(ls);
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -92,9 +92,9 @@ public class JU_ListByUser {
HRcli hcli = new HRcli(hman, uri, item, secSet);
String[] strArr = {"add","upd","del","add","upd","del"};
//lsByUser._exec(0, strArr);
-
+
}
-
+
@Test
public void detailedHelp() {
boolean hasNoError = true;
@@ -105,5 +105,5 @@ public class JU_ListByUser {
}
assertEquals(hasNoError, true);
}
-
+
}
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_User.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_User.java
index a2625574..6e7f8c1b 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_User.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/role/JU_User.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -57,15 +57,15 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_User {
-
+
private static User user;
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
prop = new PropAccess();
@@ -73,12 +73,12 @@ public class JU_User {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
Role role = new Role(aafcli);
user = new User(role);
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -91,18 +91,18 @@ public class JU_User {
// HRcli hcli = new HRcli(hman, uri, item, secSet);
// String[] strArr = {"add","del","setTo","extend","add","del","setTo","extend"};
// user._exec(0, strArr);
-//
+//
// String[] strArr1 = {"del","setTo","extend","add","del","setTo","extend"};
// user._exec(0, strArr1);
-//
+//
// String[] strArr2 = {"setTo","extend","add","del","setTo","extend"};
// user._exec(0, strArr2);
-//
+//
// String[] strArr3 = {"extend","add","del","setTo","extend"};
// user._exec(0, strArr3);
-
+
}
-
+
@Test
public void detailedHelp() {
boolean hasNoError = true;
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_Cred.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_Cred.java
index 0855a2a3..f9111c23 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_Cred.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_Cred.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -66,7 +66,7 @@ public class JU_Cred {
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
@Before
@@ -76,12 +76,12 @@ public class JU_Cred {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
user = new User(aafcli);
cred = new Cred(user);
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -94,18 +94,18 @@ public class JU_Cred {
// HRcli hcli = new HRcli(hman, uri, item, secSet);
// String[] strArr = {"add","del","reset","extend"};
// cred._exec(0, strArr);
-//
+//
// String[] strArr1 = {"del","reset","extend","add"};
// cred._exec(0, strArr1);
-//
+//
// String[] strArr2 = {"reset","extend", "add","del"};
// cred._exec(0, strArr2);
-//
+//
// String[] strArr3 = {"extend","add","del","reset"};
// cred._exec(0, strArr3);
}
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_Delg.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_Delg.java
index 4888f28f..628b8a6b 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_Delg.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_Delg.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -57,7 +57,7 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_Delg {
-
+
private static User testUser;
private static Delg delg;
User user;
@@ -65,7 +65,7 @@ public class JU_Delg {
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
@Before
@@ -75,12 +75,12 @@ public class JU_Delg {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = mock(HMangr.class); //new HMangr(aEnv, loc);
+ hman = mock(HMangr.class); //new HMangr(aEnv, loc);
aafcli = mock(AAFcli.class);//new AAFcli(prop, aEnv, wtr, hman, null, secSet);
// user = mock(User.class); //new User(aafcli);
// delg = new Delg(user);
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -93,19 +93,19 @@ public class JU_Delg {
HRcli hcli = new HRcli(hman, uri, item, secSet);
String[] strArr = {"add","upd","del"};
// delg._exec(0, strArr);
-
+
String[] strArr1 = {"upd","del","add"};
// delg._exec(0, strArr1);
-
+
String[] strArr2 = {"del","add"};
// delg._exec(0, strArr2);
}
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
// delg.detailedHelp(0, sb);
}
-
+
}
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListActivity.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListActivity.java
index a299fcf5..93b5081f 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListActivity.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListActivity.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -41,34 +41,34 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListActivity {
-
+
private static ListActivity lsActivity;
-
+
@BeforeClass
public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
AAFcli cli = JU_AAFCli.getAAfCli();
User usr = new User(cli);
List parent = new List(usr);
lsActivity = new ListActivity(parent);
-
+
}
-//
+//
// @Test
// public void exec() {
// try {
// assertEquals(lsActivity._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
// } catch (CadiException e) {
-//
+//
// e.printStackTrace();
// } catch (APIException e) {
-//
+//
// e.printStackTrace();
// } catch (LocatorException e) {
-//
+//
// e.printStackTrace();
// }
// }
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListApprovals.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListApprovals.java
index 9ef4c16f..5a972b10 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListApprovals.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListApprovals.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -59,15 +59,15 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListApprovals {
-
+
private static ListApprovals lsApprovals;
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp() throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
prop = new PropAccess();
@@ -75,14 +75,14 @@ public class JU_ListApprovals {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
User usr = new User(aafcli);
List parent = new List(usr);
lsApprovals = new ListApprovals(parent);
}
-
-
+
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
@@ -96,9 +96,9 @@ public class JU_ListApprovals {
HRcli hcli = new HRcli(hman, uri, item, secSet);
String[] strArr = {"user","approver","ticket"};
//lsApprovals._exec(0, strArr);
-
+
}
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListDelegates.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListDelegates.java
index 16a5dae0..473c64fa 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListDelegates.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListDelegates.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -41,34 +41,34 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListDelegates {
-
+
private static ListDelegates lsDelegates;
-
+
@BeforeClass
public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
AAFcli cli = JU_AAFCli.getAAfCli();
User usr = new User(cli);
List parent = new List(usr);
lsDelegates = new ListDelegates(parent);
-
+
}
-
+
// @Test
// public void exec() {
// try {
// assertEquals(lsDelegates._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
// } catch (CadiException e) {
-//
+//
// e.printStackTrace();
// } catch (APIException e) {
-//
+//
// e.printStackTrace();
// } catch (LocatorException e) {
-//
+//
// e.printStackTrace();
// }
// }
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListForCreds.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListForCreds.java
index 9db943e2..a2b4e860 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListForCreds.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListForCreds.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -57,16 +57,16 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListForCreds {
-
+
private static ListForCreds lsForCreds;
User user;
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
prop = new PropAccess();
@@ -74,14 +74,14 @@ public class JU_ListForCreds {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
User usr = new User(aafcli);
List parent = new List(usr);
lsForCreds = new ListForCreds(parent);
-
+
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -96,7 +96,7 @@ public class JU_ListForCreds {
//lsForCreds._exec(0, strArr);
}
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListForPermission.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListForPermission.java
index 9087626a..36399d64 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListForPermission.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListForPermission.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -41,34 +41,34 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListForPermission {
-
+
private static ListForPermission lsForPermission;
-
+
@BeforeClass
public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
AAFcli cli = JU_AAFCli.getAAfCli();
User usr = new User(cli);
List parent = new List(usr);
lsForPermission = new ListForPermission(parent);
-
+
}
-
+
// @Test
// public void exec() {
// try {
// assertEquals(lsForPermission._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
// } catch (CadiException e) {
-//
+//
// e.printStackTrace();
// } catch (APIException e) {
-//
+//
// e.printStackTrace();
// } catch (LocatorException e) {
-//
+//
// e.printStackTrace();
// }
// }
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListForRoles.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListForRoles.java
index 2b64f0a1..a0d940d4 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListForRoles.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_ListForRoles.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -41,34 +41,34 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_ListForRoles {
-
+
private static ListForRoles lsForRoles;
-
+
@BeforeClass
public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
AAFcli cli = JU_AAFCli.getAAfCli();
User usr = new User(cli);
List parent = new List(usr);
lsForRoles = new ListForRoles(parent);
-
+
}
-
+
// @Test
// public void exec() {
// try {
// assertEquals(lsForRoles._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
// } catch (CadiException e) {
-//
+//
// e.printStackTrace();
// } catch (APIException e) {
-//
+//
// e.printStackTrace();
// } catch (LocatorException e) {
-//
+//
// e.printStackTrace();
// }
// }
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_Role.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_Role.java
index e44ee02d..3a47fbad 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_Role.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/user/JU_Role.java
@@ -7,9 +7,9 @@
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
- * *
+ * *
* * http://www.apache.org/licenses/LICENSE-2.0
- * *
+ * *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -56,16 +56,16 @@ import org.onap.aaf.misc.env.APIException;
@RunWith(MockitoJUnitRunner.class)
public class JU_Role {
-
+
private static Role role;
User user;
PropAccess prop;
AuthzEnv aEnv;
Writer wtr;
Locator<URI> loc;
- HMangr hman;
+ HMangr hman;
AAFcli aafcli;
-
+
@Before
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
prop = new PropAccess();
@@ -73,13 +73,13 @@ public class JU_Role {
wtr = mock(Writer.class);
loc = mock(Locator.class);
SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
- hman = new HMangr(aEnv, loc);
+ hman = new HMangr(aEnv, loc);
aafcli = new AAFcli(prop, aEnv, wtr, hman, null, secSet);
User usr = new User(aafcli);
role = new Role(usr);
-
+
}
-
+
@Test
public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
Item value = mock(Item.class);
@@ -92,18 +92,18 @@ public class JU_Role {
// HRcli hcli = new HRcli(hman, uri, item, secSet);
// String[] strArr = {"add", "del", "setTo","extend", "del", "setTo","extend"};
// Assert.assertEquals(200, role._exec(0, strArr));
-//
+//
// String[] strArr1 = { "del", "setTo","extend","add", "del", "setTo","extend"};
// Assert.assertEquals(501, role._exec(0, strArr1));
-//
+//
// String[] strArr2 = {"setTo","extend","add", "del", "del", "setTo","extend" };
// Assert.assertEquals(501, role._exec(0, strArr2));
-//
+//
// String[] strArr3 = {"extend","add", "del","setTo", "del", "setTo","extend" };
// Assert.assertEquals(501, role._exec(0, strArr3));
}
-
+
@Test
public void testDetailedHelp() {
StringBuilder sb = new StringBuilder();