X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-batch%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fbatch%2Fapprovalsets%2FURApprovalSet.java;fp=auth%2Fauth-batch%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fbatch%2Fapprovalsets%2FURApprovalSet.java;h=6b9e5e0bac24252e4962a936a5132be5dc59a24d;hb=1296352d8eafee57f982a4342ad79ada4aa56d28;hp=da13e84c9afd5a03f4207118b5c6c6a68f4ee985;hpb=bdce7667a6e272e2fa32e298d957a0d9090c5bc9;p=aaf%2Fauthz.git diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/approvalsets/URApprovalSet.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/approvalsets/URApprovalSet.java index da13e84c..6b9e5e0b 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/approvalsets/URApprovalSet.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/approvalsets/URApprovalSet.java @@ -7,9 +7,9 @@ * 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. @@ -57,9 +57,9 @@ public class URApprovalSet extends ApprovalSet { expires.setTime(urdd.expires); } setExpires(expires); - setTargetKey(urdd.user+'|'+urdd.role); + setTargetKey(urdd.user + '|' + urdd.role); setTargetDate(urdd.expires); - + Result r = dv.roleByName(trans, urdd.role); if(r.notOKorIsEmpty()) { throw new CadiException(r.errorString()); @@ -81,10 +81,10 @@ public class URApprovalSet extends ApprovalSet { if(found==null) { throw new CadiException(String.format("User '%s' in Role '%s' does not exist", urdd.user,urdd.role)); } - + // Primarily, Owners are responsible, unless it's owned by self boolean isOwner = false; - Result> owners = dv.ursByRole(trans, urdd.ns+".owner"); + Result> owners = dv.ursByRole(trans, urdd.ns + ".owner"); if(owners.isOK()) { for(UserRoleDAO.Data owner : owners.value) { if(urdd.user.equals(owner.user)) { @@ -114,7 +114,7 @@ public class URApprovalSet extends ApprovalSet { } } } - + private void setTargetDate(Date expires) { fdd.target_date = expires; }