categoryDef.setCreationDate(category.getCreatedDate());
categoryDef.setLastModificationDate(category.getModifiedDate());
}
private ApplicationCategory load(CategoryDefinition categoryDef, ApplicationType<?>... appTypes) {
ApplicationCategory category = new ApplicationCategory();
//
category.setName(categoryDef.getName());
category.setDisplayName(categoryDef.getDisplayName());
category.setDescription(categoryDef.getDescription());
category.setAccessPermissions(new ArrayList<String>(categoryDef.getAccessPermissions()));
category.setCreatedDate(categoryDef.getCreationDate());
category.setModifiedDate(categoryDef.getLastModificationDate());
//
for (ContentDefinition contentDef : categoryDef.getContentList()) {
Application application = load(contentDef);
if (isApplicationType(application, appTypes)) {
category.getApplications().add(application);
}
}
//
return category;