}
}
if (sameAsRequester) {
logSession.log(admin, adl.getCaid(), LogConstants.MODULE_APPROVAL, new Date(), null, null, LogConstants.EVENT_ERROR_APPROVALREJECTED,
"Error administrator have already approved, rejected or requested current request, approveId ");
throw new AdminAlreadyApprovedRequestException("Error administrator have already approved, rejected or requested current request, approveId : "
+ /*approvalId*/ adl.getApprovalid());
}
}
//Check that his admin has not approved this this request before
Iterator<Approval> iter = data.getApprovals().iterator();
while (iter.hasNext()) {
Approval next = iter.next();
if ((next.getAdmin().getUsername()!=null && username!=null && next.getAdmin().getUsername().equals(username)) || ((next.getAdmin().getUsername()==null || username==null) && admin.getAdminData().equals(next.getAdmin().getAdminData()))) {
logSession.log(admin, adl.getCaid(), LogConstants.MODULE_APPROVAL, new Date(), null, null, LogConstants.EVENT_ERROR_APPROVALREJECTED,
"Error administrator have already approved or rejected current request, approveId ");
throw new AdminAlreadyApprovedRequestException("Error administrator have already approved or rejected current request, approveId : "
+ /*approvalId*/ adl.getApprovalid());
}
}
}