attachment.setClassName(managedObject.getAttachment().getClass().getName());
// Save the attachment
String attachmentPath = deploymentPath + attachment.getName();
// Create the persistence information
PersistenceRoot persistenceRoot = getSerializer().loadAttachment(attachmentPath, PersistenceRoot.class);
//
persistenceRoot = createPersistedMetaData(persistenceRoot, managedObject, component, remove);
// Serialize the attachment
getSerializer().saveAttachment(attachmentPath, persistenceRoot);