Filter filter = scan.getFilter();
if (filter != null) {
model.setFilter(stringifyFilter(filter));
}
// Add the visbility labels if found in the attributes
Authorizations authorizations = scan.getAuthorizations();
if (authorizations != null) {
List<String> labels = authorizations.getLabels();
for (String label : labels) {
if (!VisibilityLabelsValidator.isValidLabel(label)) {
throw new IllegalArgumentException("Invalid authorization label : " + label
+ ". Authorizations cannot contain '(', ')' ,'&' ,'|', '!'" + " " +
"and cannot be empty");