}
}
public abstract static class BaseEditAction extends EventListener<UIGroupNavigationManagement> {
public void execute(Event<UIGroupNavigationManagement> event) throws Exception {
UserPortal userPortal = Util.getPortalRequestContext().getUserPortalConfig().getUserPortal();
UIGroupNavigationManagement uicomp = event.getSource();
WebuiRequestContext context = event.getRequestContext();
UIApplication uiApplication = context.getUIApplication();
// get navigation id
String groupName = event.getRequestContext().getRequestParameter(OBJECTID);
SiteKey siteKey = SiteKey.group(groupName);
// check edit permission, ensure that user has edit permission on that
// navigation
UserACL userACL = uicomp.getApplicationComponent(UserACL.class);
if (!userACL.hasEditPermissionOnNavigation(siteKey)) {
uiApplication
.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.Invalid-editPermission", null));
return;
}
UserNavigation navigation = userPortal.getNavigation(siteKey);
if (navigation == null) {
uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.navigation-not-exist", null));
UIWorkingWorkspace uiWorkingWS = Util.getUIPortalApplication().getChild(UIWorkingWorkspace.class);
uiWorkingWS.updatePortletsByName("UserToolbarGroupPortlet");
return;