* org.onap.aaf
* ===========================================================================
* Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 IBM.
* ===========================================================================
* 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 PassDeleteAction extends Page {
- public static final String NAME = "PassDeleteAction";
+ public static final String CLASS = "PassDeleteAction";
public static final String HREF = "/gui/passdelete";
- private static enum Params{id,date,ns,type};
-
+ private enum Params{id,date,ns,type};
+
public PassDeleteAction(final AAF_GUI gui, final Page ... breadcrumbs) throws APIException, IOException {
- super(gui.env,NAME,HREF,Params.values(),
+ super(gui.env,CLASS,HREF,Params.values(),
new BreadCrumbs(breadcrumbs),
- new SlotCode<AuthzTrans>(true,gui.env,NAME,Params.values()) {
+ new SlotCode<AuthzTrans>(true,gui.env,CLASS,Params.values()) {
@Override
public void code(final Cache<HTMLGen> cache, final HTMLGen hgen) throws APIException, IOException {
cache.dynamic(hgen, new DynamicCode<HTMLGen,AAF_GUI, AuthzTrans>() {
@Override
public String code(Rcli<?> client) throws CadiException, ConnectException, APIException {
Future<CredRequest> fcr = client.delete("/authn/cred", gui.getDF(CredRequest.class),cr);
- if(!fcr.get(AAFcli.timeout())) {
+ if (!fcr.get(AAFcli.timeout())) {
return gui.aafCon.readableErrMsg(fcr);
}
return null;
}
});
- if(err==null) {
+ if (err==null) {
hgen.p("Password " + cr.getId() + ", " + cr.getEntry() + " is Deleted");
} else {
hgen.p(err);