@Override protected void overrideConfiguration( GadgetSpec gadgetSpec, Portlet portlet, PortletDisplay portletDisplay) throws Exception { String urlConfiguration = portletDisplay.getURLConfiguration(); if (ShindigUtil.hasUserPrefs(gadgetSpec)) { portlet.setConfigurationActionClass(ConfigurationActionImpl.class.getName()); urlConfiguration = urlConfiguration.replaceAll("edit_permissions", "edit_configuration"); } else { portlet.setConfigurationActionClass(null); urlConfiguration = urlConfiguration.replaceAll("edit_configuration", "edit_permissions"); } portletDisplay.setURLConfiguration(urlConfiguration); }
public void copyTo(PortletDisplay slave) { slave.setActive(_active); slave.setColumnCount(_columnCount); slave.setColumnId(_columnId); slave.setColumnPos(_columnPos); slave.setContent(_content); slave.setControlPanelCategory(_controlPanelCategory); slave.setCustomCSSClassName(_customCSSClassName); slave.setDescription(_description); slave.setId(_id); slave.setInstanceId(_instanceId); slave.setModeAbout(_modeAbout); slave.setModeConfig(_modeConfig); slave.setModeEdit(_modeEdit); slave.setModeEditDefaults(_modeEditDefaults); slave.setModeEditGuest(_modeEditGuest); slave.setModeHelp(_modeHelp); slave.setModePreview(_modePreview); slave.setModePrint(_modePrint); slave.setModeView(_modeView); slave.setNamespace(_namespace); slave.setPortletName(_portletName); slave.setPortletResource(_portletResource); slave.setPortletSetup(_portletSetup); slave.setResourcePK(_resourcePK); slave.setRestoreCurrentView(_restoreCurrentView); slave.setRootPortletId(_rootPortletId); slave.setShowBackIcon(_showBackIcon); slave.setShowCloseIcon(_showCloseIcon); slave.setShowConfigurationIcon(_showConfigurationIcon); slave.setShowEditDefaultsIcon(_showEditDefaultsIcon); slave.setShowEditGuestIcon(_showEditGuestIcon); slave.setShowEditIcon(_showEditIcon); slave.setShowExportImportIcon(_showExportImportIcon); slave.setShowHelpIcon(_showHelpIcon); slave.setShowMaxIcon(_showMaxIcon); slave.setShowMinIcon(_showMinIcon); slave.setShowMoveIcon(_showMoveIcon); slave.setShowPortletCssIcon(_showPortletCssIcon); slave.setShowPortletIcon(_showPortletIcon); slave.setShowPrintIcon(_showPrintIcon); slave.setShowRefreshIcon(_showRefreshIcon); slave.setStateExclusive(_stateExclusive); slave.setStateMax(_stateMax); slave.setStateMin(_stateMin); slave.setStateNormal(_stateNormal); slave.setStatePopUp(_statePopUp); slave.setThemeDisplay(_themeDisplay); slave.setURLBack(_urlBack); slave.setURLClose(_urlClose); slave.setURLConfiguration(_urlConfiguration); slave.setURLEdit(_urlEdit); slave.setURLEditDefaults(_urlEditDefaults); slave.setURLEditGuest(_urlEditGuest); slave.setURLExportImport(_urlExportImport); slave.setURLHelp(_urlHelp); slave.setURLMax(_urlMax); slave.setURLMin(_urlMin); slave.setURLPortlet(_urlPortlet); slave.setURLPortletCss(_urlPortletCss); slave.setURLPrint(_urlPrint); slave.setURLRefresh(_urlRefresh); slave.setWebDAVEnabled(_webDAVEnabled); slave._title = _title; }