X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-batch%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Factions%2FRoleDelete.java;h=1a663c99552145c5852c2b78d1216b8d78245d0a;hb=4b5a7d721d994a49057e9bfb403c7bff1b376660;hp=cbe3c1c5e71ef2b0e03db5ef387d44d30fd4a141;hpb=ceda6e8bc270202bcb24340b86617110289c902e;p=aaf%2Fauthz.git diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/actions/RoleDelete.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/actions/RoleDelete.java index cbe3c1c5..1a663c99 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/actions/RoleDelete.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/actions/RoleDelete.java @@ -32,31 +32,31 @@ import org.onap.aaf.misc.env.APIException; import com.datastax.driver.core.Cluster; public class RoleDelete extends ActionDAO { - public RoleDelete(AuthzTrans trans, Cluster cluster, boolean dryRun) throws APIException, IOException { - super(trans, cluster, dryRun); - } - - public RoleDelete(AuthzTrans trans, ActionDAO adao) { - super(trans, adao); - } + public RoleDelete(AuthzTrans trans, Cluster cluster, boolean dryRun) throws APIException, IOException { + super(trans, cluster, dryRun); + } + + public RoleDelete(AuthzTrans trans, ActionDAO adao) { + super(trans, adao); + } - @Override - public Result exec(AuthzTrans trans, Role r,String text) { - if(dryRun) { - trans.info().log("Would Delete Role:",text,r.fullName()); - return Result.ok(); - } else { - RoleDAO.Data rdd = new RoleDAO.Data(); - rdd.ns = r.ns; - rdd.name = r.name; - Result rv = q.roleDAO.delete(trans, rdd, true); // need to read for undelete - if(rv.isOK()) { - trans.info().log("Deleted Role:",text,r.fullName()); - } else { - trans.error().log("Error Deleting Role -",rv.details,":",r.fullName()); - } - return rv; - } - } - + @Override + public Result exec(AuthzTrans trans, Role r,String text) { + if(dryRun) { + trans.info().log("Would Delete Role:",text,r.fullName()); + return Result.ok(); + } else { + RoleDAO.Data rdd = new RoleDAO.Data(); + rdd.ns = r.ns; + rdd.name = r.name; + Result rv = q.roleDAO.delete(trans, rdd, true); // need to read for undelete + if(rv.isOK()) { + trans.info().log("Deleted Role:",text,r.fullName()); + } else { + trans.error().log("Error Deleting Role -",rv.details,":",r.fullName()); + } + return rv; + } + } + } \ No newline at end of file