contentDef.setCreationDate(application.getCreatedDate());
contentDef.setLastModificationDate(application.getModifiedDate());
}
private Application load(ContentDefinition contentDef) {
Customization customization = contentDef.getCustomization();
//
ContentType<?> contentType = customization.getType();
ApplicationType<?> applicationType = ApplicationType.getType(contentType);
//
Application application = new Application();
/**
* Apps ID has a "/" character that is rendered into id markup.
* We need to workaround it to be W3C compliant.
*/
application.setId(contentDef.getCategory().getName() + "_slash_" + contentDef.getName());
application.setCategoryName(contentDef.getCategory().getName());
application.setType(applicationType);
application.setApplicationName(contentDef.getName());
application.setIconURL(getApplicationIconURL(contentDef));
application.setDisplayName(contentDef.getDisplayName());
application.setDescription(contentDef.getDescription());
application.setAccessPermissions(new ArrayList<String>(contentDef.getAccessPermissions()));
application.setCreatedDate(contentDef.getCreationDate());
application.setModifiedDate(contentDef.getLastModificationDate());
application.setStorageId(customization.getId());
application.setContentId(customization.getContentId());
return application;
}