* org.onap.aaf
* ===========================================================================
* Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modifications Copyright (C) 2018 IBM.
* ===========================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
public class CreateDelete extends Cmd {
private static final String ROLE_PATH = "/authz/role";
- private final static String[] options = {"create","delete"};
+ private static final String[] options = {"create","delete"};
public CreateDelete(Role parent) {
super(parent,null,
new Param(optionsToString(options),true),
}
boolean rolesSupplied = (args.length>idx);
- if(fp == null) {// This useless code brought to you by Sonar.
+ if (fp == null) {// This useless code brought to you by Sonar.
throw new CadiException("No call made.");
}
- if(fp.get(AAFcli.timeout())) {
+ if (fp.get(AAFcli.timeout())) {
rv=fp.code();
pw().print(verb);
pw().println("d Role");
- if(rolesSupplied) {
- for(;args.length>idx;++idx ) {
+ if (rolesSupplied) {
+ for (;args.length>idx;++idx ) {
try {
- if(201!=(rv=((Role)parent)._exec(0,new String[] {"user","add",rr.getName(),args[idx]}))) {
+ if (201!=(rv=((Role)parent)._exec(0,new String[] {"user","add",rr.getName(),args[idx]}))) {
rv = 206 /*HttpStatus.PARTIAL_CONTENT_206*/;
}
} catch (LocatorException e) {
}
}
} else {
- if((rv=fp.code())==202) {
+ if ((rv=fp.code())==202) {
pw().print("Role ");
pw().print(verb);
pw().println(" Accepted, but requires Approvals before actualizing");