*
* @param projectName
* @throws Exception
*/
public void saveAndPublish(String projectName) throws Exception {
CmsProject oldProject = cms.getRequestContext().currentProject();
cms.getRequestContext().setCurrentProject(cms.readProject(projectName));
CmsFile file = content.getFile();
file.setContents(content.marshal());
cms.lockResource(file.getRootPath());