* 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.
import aaf.v2_0.CredRequest;
public class ID extends Cmd {
- public static final String ATTEMPT_FAILED_SPECIFICS_WITHELD = "Attempt Failed. Specifics witheld.";
private static final String CRED_PATH = "/authn/cred";
private static final String[] options = {"add","del"};
public ID(User parent) {
}
@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);
cr.setType(10);
if (args.length>idx)
cr.setEntry(args[idx]);
-
+
// Set Start/End commands
setStartEnd(cr);
Integer ret = same(new Retryable<Integer>() {
switch(option) {
case 0:
fp = client.create(
- CRED_PATH,
- getDF(CredRequest.class),
+ CRED_PATH,
+ getDF(CredRequest.class),
cr
);
verb = "Added ID [";
} else if (fp.code()==406 && option==1) {
pw().println("FQI does not exist");
} else {
- pw().println(ATTEMPT_FAILED_SPECIFICS_WITHELD);
+ pw().println(Cred.ATTEMPT_FAILED_SPECIFICS_WITHELD);
}
return fp.code();
}
if (ret==null)ret = -1;
return ret;
}
-
+
@Override
public void detailedHelp(int _indent, StringBuilder sb) {
int indent = _indent;