if(aclChangeSet.getId() >= minAclChangeSetId && aclChangeSet.getId() < maxAclChangeSetId) maxTime = Math.max(aclChangeSet.getCommitTimeMs(), maxTime); maxId = Math.max(aclChangeSet.getId(), maxId); if(aclChangeSet.getCommitTimeMs() < fromCommitTime) else if(aclChangeSet.getCommitTimeMs() > toCommitTime) maxTime = aclChangeSet.getCommitTimeMs(); maxId = aclChangeSet.getId();
/** * Get the ACLs associated with a given list of ACL ChangeSets. The ACLs may be truncated for * the last ACL ChangeSet in the return values - the ACL count from the * {@link #getAclChangeSets(Long, Long, Long, Long, int) ACL ChangeSets}. * * @param aclChangeSets the ACL ChangeSets to include * @param minAclId the lowest ACL ID (may be <tt>null</tt>) * @param maxResults the maximum number of results to retrieve * @return the ACLs (includes ChangeSet ID) */ public List<Acl> getAcls(List<AclChangeSet> aclChangeSets, Long minAclId, int maxResults) throws AuthenticationException, IOException, JSONException { if(throwException) { throw new ConnectException("THROWING EXCEPTION, better be ready!"); } List<Acl> allAcls = new ArrayList(); for(AclChangeSet aclChangeSet : aclChangeSets) { List aclList = aclMap.get(aclChangeSet.getId()); allAcls.addAll(aclList); } return allAcls; }
long commitTimeMs = aclChangeSetJSON.getLong("commitTimeMs"); int aclCount = aclChangeSetJSON.getInt("aclCount"); AclChangeSet aclChangeSet = new AclChangeSet(aclChangeSetId, commitTimeMs, aclCount); aclChangeSets.add(aclChangeSet);
for (AclChangeSet aclChangeSet : aclChangeSets) Long aclChangeSetId = aclChangeSet.getId(); aclChangeSetIdsJSON.put(aclChangeSetId); aclChangeSetIds.add(aclChangeSetId);