Iterator<? extends IMarking> markings = this.markings.iterator();
LOGGER.log(Level.FINER, "Authorizing user :[" + user.get_Name()
+ "] for Marking Sets");
while (markings.hasNext()) {
IMarking marking = markings.next();
LOGGER.log(Level.FINEST,
"Authorizing user: {0} [Marking: {1}, Constraint Mask: {2}]",
new Object[] {user.get_Name(), marking.get_MarkingValue(),
marking.get_ConstraintMask()});
Permissions perms = new Permissions(marking.get_Permissions());
if (!perms.authorizeMarking(user, marking.get_ConstraintMask())) {
LOGGER.log(Level.FINER,
"User {0} is not authorized for Marking value: {1}",
new Object[] {user.get_Name(), marking.get_MarkingValue()});
return false;
}
}
LOGGER.log(Level.FINER, "User " + user.get_Name()
+ " is authorized to view the document");