protected void doPostprocess(A annotation, M template, TemplateResolver resolver) {
for(Attachment attachment:attachments(annotation)) {
try {
MutableAttachedTemplate attachedTemplate = template.attachTemplate(attachment.id(), resolver.resolve(attachment.handler()), attachment.path());
updateAttachmentPredicate(template,attachment,attachedTemplate);
} catch (IllegalArgumentException e) {
throw new InvalidAttachmentDefinitionException(template.id(),attachment.id(),"Invalid attachment definition",e);
}
}
}