use of org.apereo.portal.layout.dlm.remoting.JsonEntityBean in project uPortal by Jasig.
the class PortletAdministrationHelper method createNewPortletDefinitionForm.
/*
* Create a {@code PortletDefinitionForm} and pre-populate it with default categories and principal permissions.
*/
private PortletDefinitionForm createNewPortletDefinitionForm() {
final PortletDefinitionForm form = new PortletDefinitionForm();
// pre-populate with top-level category
final IEntityGroup portletCategoriesGroup = GroupService.getDistinguishedGroup(IPortletDefinition.DISTINGUISHED_GROUP);
form.addCategory(new JsonEntityBean(portletCategoriesGroup, groupListHelper.getEntityType(portletCategoriesGroup)));
// pre-populate with top-level group
final IEntityGroup everyoneGroup = GroupService.getDistinguishedGroup(IPerson.DISTINGUISHED_GROUP);
final JsonEntityBean everyoneBean = new JsonEntityBean(everyoneGroup, groupListHelper.getEntityType(everyoneGroup));
form.setPrincipals(Collections.singleton(everyoneBean), true);
return form;
}
Aggregations