// Mark Authorization Response status PERMIT for authorized documents.
for (String docId : authorizedDocIdList) {
String encodedDocId = docIdMap.get(docId);
if (encodedDocId != null) {
encodedDocuments.add(new AuthorizationResponse(Status.PERMIT,
encodedDocId));
logMessage.append(encodedDocId + ", ");
docIdMap.remove(docId);
}
}
logMessage.append(" and not authorized for document ID: ");
// Mark Authorization Response status DENY for non-authorized documents.
Set<String> docIdKeys = docIdMap.keySet();
for (String docId : docIdKeys) {
String encodedDocId = docIdMap.get(docId);
if (encodedDocId != null) {
encodedDocuments.add(new AuthorizationResponse(Status.DENY,
encodedDocId));
logMessage.append(encodedDocId + ", ");
}
}
LOG.info(logMessage.toString());