protected void updateActive(ActionRequest actionRequest, String cmd) throws Exception { ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY); long groupId = ParamUtil.getLong(actionRequest, "groupId"); if ((groupId == themeDisplay.getDoAsGroupId()) || (groupId == themeDisplay.getScopeGroupId()) || (groupId == getRefererGroupId(themeDisplay))) { throw new RequiredGroupException( String.valueOf(groupId), RequiredGroupException.CURRENT_GROUP); } Group group = GroupServiceUtil.getGroup(groupId); boolean active = false; if (cmd.equals(Constants.RESTORE)) { active = true; } ServiceContext serviceContext = ServiceContextFactory.getInstance(Group.class.getName(), actionRequest); GroupServiceUtil.updateGroup( groupId, group.getParentGroupId(), group.getName(), group.getDescription(), group.getType(), group.getFriendlyURL(), active, serviceContext); }
private String _getBreadcrumbLayoutURL( Layout selLayout, String selLayoutParam, PortletURL portletURL, ThemeDisplay themeDisplay) throws Exception { if (portletURL == null) { return PortalUtil.getLayoutURL(selLayout, themeDisplay); } else { portletURL.setParameter(selLayoutParam, String.valueOf(selLayout.getPlid())); if (selLayout.isTypeControlPanel()) { if (themeDisplay.getDoAsGroupId() > 0) { portletURL.setParameter("doAsGroupId", String.valueOf(themeDisplay.getDoAsGroupId())); } if (themeDisplay.getRefererPlid() != LayoutConstants.DEFAULT_PLID) { portletURL.setParameter("refererPlid", String.valueOf(themeDisplay.getRefererPlid())); } } return portletURL.toString(); } }