for (Ace ace : source.getAces()) {
if (ace != null) {
writer.writeStartElement(PREFIX_CMIS, TAG_ACL_PERMISSISONS, NAMESPACE_CMIS);
if (ace.getPrincipal() != null) {
Principal principal = ace.getPrincipal();
writer.writeStartElement(PREFIX_CMIS, TAG_ACE_PRINCIPAL, NAMESPACE_CMIS);
XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_ACE_PRINCIPAL_ID, principal.getId());
writeExtensions(writer, principal);
writer.writeEndElement();
}
if (ace.getPermissions() != null) {