diff options
author | Arundathi Patil <arundpil@in.ibm.com> | 2018-09-17 15:15:47 +0530 |
---|---|---|
committer | Arundathi Patil <arundpil@in.ibm.com> | 2018-09-17 10:06:55 +0000 |
commit | 96d9bafbbde32e22a81a315f9b67f4510d64dc75 (patch) | |
tree | 758663b4576effc340da317936f1932d29e205ce /auth/auth-cmd | |
parent | 31724de8ac6df8efd7aca6faed3770112e50e6c4 (diff) |
Attrib.java: Fixed sonar issue
Sonar Link: https://sonar.onap.org/code?id=org.onap.aaf.authz%3Aparent&selected=org.onap.aaf.authz%3Aaaf-auth-cmd%3Asrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fcmd%2Fns%2FAttrib.java
Issue-ID: AAF-499
Change-Id: Ifc18fa44c08f2d391444bf27538817bd197a4de0
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'auth/auth-cmd')
-rw-r--r-- | auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/Attrib.java | 14 |
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"); |