summaryrefslogtreecommitdiffstats
path: root/auth
diff options
context:
space:
mode:
authorJonathan Gathman <jonathan.gathman@att.com>2018-09-18 11:44:06 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-18 11:44:06 +0000
commita38dd57c55262c2960c5ec70131ed2f8d979e6b6 (patch)
treee60f36058b62771e27d4769e4a901160e2ad8b07 /auth
parent362f628e6c4029a39bf9cc179443099cd1e7f0fe (diff)
parent96d9bafbbde32e22a81a315f9b67f4510d64dc75 (diff)
Merge "Attrib.java: Fixed sonar issue"
Diffstat (limited to 'auth')
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Attrib.java14
1 files changed, 8 insertions, 6 deletions
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 31dad45c..77b14456 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
@@ -34,8 +34,10 @@ import org.onap.aaf.misc.env.APIException;
public class Attrib extends BaseCmd<NS> {
private final static String[] options = {"add","upd","del"};
+ private String authzString = "/authz/ns/";
+ private String atrributeString = "/attrib/";
- public Attrib(NS ns) throws APIException {
+ public Attrib(NS ns) {
super(ns,"attrib",
new Param(optionsToString(options),true),
new Param("ns-name",true),
@@ -66,17 +68,17 @@ public class Attrib extends BaseCmd<NS> {
String message;
switch(option) {
case 0:
- fp = client.create("/authz/ns/"+ns+"/attrib/"+key+'/'+value,Void.class);
+ 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:
- fp = client.update("/authz/ns/"+ns+"/attrib/"+key+'/'+value);
+ fp = client.update(authzString+ns+atrributeString+key+'/'+value);
message = String.format("Update Attrib %s=%s for %s",
key,value,ns);
break;
case 2:
- fp = client.delete("/authz/ns/"+ns+"/attrib/"+key,Void.class);
+ fp = client.delete(authzString+ns+atrributeString+key,Void.class);
message = String.format("Attrib %s deleted from %s",
key,ns);
break;
@@ -99,8 +101,8 @@ public class Attrib extends BaseCmd<NS> {
}
@Override
- public void detailedHelp(int _indent, StringBuilder sb) {
- int indent = _indent;
+ public void detailedHelp(int indentValue, StringBuilder sb) {
+ int indent = indentValue;
detailLine(sb,indent,"Add or Delete Administrator to/from Namespace");
indent+=4;
detailLine(sb,indent,"name - Name of Namespace");