container.setAccessPermission(Util.from(src.getAccessPermissions()));
return container;
}
private ContainerItem getContainerItemFor(org.exoplatform.portal.config.model.Application<?> src) {
ApplicationImpl dst = new ApplicationImpl();
dst.setAccessPermission(Util.from(src.getAccessPermissions()));
dst.setDescription(src.getDescription());
dst.setIconURL(src.getIcon());
dst.setId(src.getId());
dst.setApplicationName(src.getType().getName());
ApplicationType<?> type = src.getType();
if (type == ApplicationType.GADGET) {
dst.setType(org.gatein.api.application.ApplicationType.GADGET);
} else if (type == ApplicationType.PORTLET) {
dst.setType(org.gatein.api.application.ApplicationType.PORTLET);
} else if (type == ApplicationType.WSRP_PORTLET) {
dst.setType(org.gatein.api.application.ApplicationType.WSRP);
} else {
throw new IllegalStateException("Application Type is not of any recognized type.");
}
return dst;