Create a new settings representation
@param viewSettings inner view settings
@param firstView the view to display
@param configurationSettings the configuration
@return the settings representation
166410
static Settings create(final ConfigItemSet viewSettings, final ConfigItemMapEntrySet firstView,
                                 final ConfigItemSet configurationSettings) {
        final List<ConfigBlock> rootBlocks = new ArrayList<ConfigBlock>();
        final ConfigItemMapIndexed views = new ConfigItemMapIndexed("Views");
        final Map<String, ConfigItemMapEntrySet> viewById = new HashMap<String, ConfigItemMapEntrySet>();
        final ConfigItemMapNamed tablesMap = new ConfigItemMapNamed("Tables");

        return new Settings(rootBlocks, viewSettings, views, viewById, firstView, tablesMap, configurationSettings);
    }
634138
public FacesConfigProtectedViewsType<WebFacesConfigDescriptor> getOrCreateProtectedViews()
   {
      List<Node> nodeList = model.get("protected-views");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigProtectedViewsTypeImpl<WebFacesConfigDescriptor>(this, "protected-views", model, nodeList.get(0));
      }
      return createProtectedViews();
   }
160656
View createPresetsView() {
    View contentView = View.inflate(getActivity(), R.layout.cpv_dialog_presets, null);
    shadesLayout = (LinearLayout) contentView.findViewById(R.id.shades_layout);
    transparencySeekBar = (SeekBar) contentView.findViewById(R.id.transparency_seekbar);
    transparencyPercText = (TextView) contentView.findViewById(R.id.transparency_text);
    GridView gridView = (GridView) contentView.findViewById(R.id.gridView);

    loadPresets();

    if (showColorShades) {
      createColorShades(color);
    } else {
      shadesLayout.setVisibility(View.GONE);
      contentView.findViewById(R.id.shades_divider).setVisibility(View.GONE);
    }

    adapter = new ColorPaletteAdapter(new ColorPaletteAdapter.OnColorSelectedListener() {
      @Override public void onColorSelected(int newColor) {
        if (color == newColor) {
          // Double tab selects the color
          ColorPickerDialog.this.onColorSelected(color);
          dismiss();
          return;
        }
        color = newColor;
        if (showColorShades) {
          createColorShades(color);
        }
      }
    }, presets, getSelectedItemPosition(), colorShape);

    gridView.setAdapter(adapter);

    if (showAlphaSlider) {
      setupTransparency();
    } else {
      contentView.findViewById(R.id.transparency_layout).setVisibility(View.GONE);
      contentView.findViewById(R.id.transparency_title).setVisibility(View.GONE);
    }

    return contentView;
  }
770995
func (s *DescribeConfigurationSettingsOutput) SetConfigurationSettings(v []*ConfigurationSettingsDescription) *DescribeConfigurationSettingsOutput {
	s.ConfigurationSettings = v
	return s
}
339509
public void setSubDomainSettings(java.util.Collection<SubDomainSetting> subDomainSettings) {
        if (subDomainSettings == null) {
            this.subDomainSettings = null;
            return;
        }

        this.subDomainSettings = new java.util.ArrayList<SubDomainSetting>(subDomainSettings);
    }
1100177
public void setEditorSettings(Map<String, String> settings) {

        m_editorSettings = new TreeMap<String, String>(settings);
    }
686636
private void loadSettings(HieroSettings settings) {
		paddingTop = settings.getPaddingTop();
		paddingLeft = settings.getPaddingLeft();
		paddingBottom = settings.getPaddingBottom();
		paddingRight = settings.getPaddingRight();
		paddingAdvanceX = settings.getPaddingAdvanceX();
		paddingAdvanceY = settings.getPaddingAdvanceY();
		glyphPageWidth = settings.getGlyphPageWidth();
		glyphPageHeight = settings.getGlyphPageHeight();
		effects.addAll(settings.getEffects());
	}
1158071
public java.util.List<ConfigurationSettingsDescription> getConfigurationSettings() {
        if (configurationSettings == null) {
            configurationSettings = new com.amazonaws.internal.SdkInternalList<ConfigurationSettingsDescription>();
        }
        return configurationSettings;
    }
63076
public void initPreferences(CmsWorkplaceManager wpManager) {

        CURRENT_DEFAULT_SETTINGS = this;
        Class<?> accessorClass = CmsUserSettingsStringPropertyWrapper.class;

        // first initialize all built-in preferences. these are:
        // a) Bean properties of CmsUserSettingsStringPropertyWrapper
        // b) Editor setting preferences
        // c) Gallery setting preferences
        PropertyDescriptor[] propDescs = PropertyUtils.getPropertyDescriptors(accessorClass);
        for (PropertyDescriptor descriptor : propDescs) {
            String name = descriptor.getName();
            Method getter = descriptor.getReadMethod();
            Method setter = descriptor.getWriteMethod();
            if ((getter == null) || (setter == null)) {
                continue;
            }

            PrefMetadata metadata = getter.getAnnotation(PrefMetadata.class);
            if (metadata == null) {
                CmsBuiltinPreference preference = new CmsBuiltinPreference(name);
                m_preferences.put(preference.getName(), preference);
            } else {
                try {
                    Constructor<?> constructor = metadata.type().getConstructor(String.class);
                    I_CmsPreference pref = (I_CmsPreference)constructor.newInstance(name);
                    m_preferences.put(pref.getName(), pref);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
        }

        Map<String, String> editorValues = getEditorSettings();
        if (wpManager.getWorkplaceEditorManager() != null) {
            for (String resType : wpManager.getWorkplaceEditorManager().getConfigurableEditors().keySet()) {
                if (!editorValues.containsKey(resType)) {
                    editorValues.put(resType, null);
                }
            }
        }
        for (Map.Entry<String, String> editorSettingEntry : editorValues.entrySet()) {
            CmsEditorPreference pref = new CmsEditorPreference(
                editorSettingEntry.getKey(),
                editorSettingEntry.getValue());
            m_preferences.put(pref.getName(), pref);
        }

        Map<String, String> galleryValues = new HashMap<String, String>(getStartGalleriesSettings());
        for (String key : wpManager.getGalleries().keySet()) {
            if (!galleryValues.containsKey(key)) {
                galleryValues.put(key, null);
            }
        }
        for (Map.Entry<String, String> galleryEntry : galleryValues.entrySet()) {
            CmsStartGallleryPreference pref = new CmsStartGallleryPreference(
                galleryEntry.getKey(),
                galleryEntry.getValue());
            m_preferences.put(pref.getName(), pref);
        }

        // Now process configured preferences. Each configuration entry is either
        // for a built-in preference, in which case we create a wrapper around the existing preference,
        // or for a custom user-defined preference.
        for (CmsPreferenceData prefData : m_preferenceData) {
            String name = prefData.getName();
            I_CmsPreference pref = null;
            if (m_preferences.containsKey(name)) {
                // we first remove the existing preference, because in a LinkedHashMap, put(key, value) will not
                // update the position of the entry if the key already exists
                pref = new CmsWrapperPreference(prefData, m_preferences.remove(name));
            } else {
                pref = new CmsUserDefinedPreference(
                    prefData.getName(),
                    prefData.getDefaultValue(),
                    prefData.getPropertyDefinition(),
                    prefData.getTab());
            }
            m_preferences.put(pref.getName(), pref);
            pref.setValue(this, prefData.getDefaultValue());
        }
    }
939061
private CmsGalleryDataBean getInitialSettingsInternal(CmsGalleryConfiguration conf) throws CmsRpcException {

        CmsGalleryDataBean data = new CmsGalleryDataBean();
        data.setMode(conf.getGalleryMode());
        data.setResultViewType(readResultViewType());
        boolean galleryShowInvalidDefault = Boolean.parseBoolean(
            getWorkplaceSettings().getUserSettings().getAdditionalPreference(PREF_GALLERY_SHOW_INVALID_DEFAULT, true));
        data.setIncludeExpiredDefault(galleryShowInvalidDefault);

        data.setGalleryStoragePrefix(conf.getGalleryStoragePrefix());
        data.setLocales(buildLocalesMap());
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(conf.getLocale())) {
            data.setLocale(conf.getLocale());
        } else {
            data.setLocale(getCmsObject().getRequestContext().getLocale().toString());
        }
        data.setVfsRootFolders(getRootEntries());
        data.setScope(getWorkplaceSettings().getLastSearchScope());
        data.setSortOrder(getWorkplaceSettings().getLastGalleryResultOrder());

        List<CmsResourceTypeBean> types = null;
        data.setTabIds(conf.getGalleryMode().getTabs());
        switch (conf.getGalleryMode()) {
            case editor:
            case view:
            case adeView:
            case widget:
                if (conf.getTabIds() != null) {
                    data.setTabIds(conf.getTabIds());
                }
                data.setCurrentElement(conf.getCurrentElement());
                String referencePath = conf.getReferencePath();
                if (CmsStringUtil.isEmptyOrWhitespaceOnly(referencePath)) {
                    referencePath = conf.getGalleryPath();
                }
                data.setReferenceSitePath(referencePath);
                types = getResourceTypeBeans(
                    conf.getGalleryMode(),
                    data.getReferenceSitePath(),
                    conf.getResourceTypes(),
                    conf.getSearchTypes());
                data.setTypes(types);
                Map<String, CmsGalleryTypeInfo> galleryTypeInfos = readGalleryInfosByTypeBeans(types);
                // in case the 'gallerytypes' parameter is set, allow only the given galleries
                if (conf.getGalleryTypes() != null) {
                    Map<String, CmsGalleryTypeInfo> infos = new HashMap<String, CmsGalleryTypeInfo>();
                    for (int i = 0; i < conf.getGalleryTypes().length; i++) {
                        CmsGalleryTypeInfo typeInfo = galleryTypeInfos.get(conf.getGalleryTypes()[i]);
                        if (typeInfo != null) {
                            infos.put(conf.getGalleryTypes()[i], typeInfo);
                        }
                    }
                    galleryTypeInfos = infos;
                }
                data.setGalleries(buildGalleriesList(galleryTypeInfos));
                String startGallery = conf.getGalleryPath();
                // check if the configured gallery path really is an existing gallery
                boolean galleryAvailable = false;
                for (CmsGalleryFolderBean folderBean : data.getGalleries()) {
                    if (folderBean.getPath().equals(startGallery)) {
                        galleryAvailable = true;
                        break;
                    }
                }
                data.setStartGallery(galleryAvailable ? startGallery : null);
                if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(conf.getStartFolder())) {
                    try {
                        CmsObject cloneCms = OpenCms.initCmsObject(getCmsObject());
                        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(conf.getStartSite())) {
                            cloneCms.getRequestContext().setSiteRoot(conf.getStartSite());
                        }
                        if (cloneCms.existsResource(conf.getStartFolder(), CmsResourceFilter.ONLY_VISIBLE_NO_DELETED)) {
                            data.setStartFolder(cloneCms.getRequestContext().addSiteRoot(conf.getStartFolder()));
                        }
                    } catch (CmsException e) {
                        log(e.getMessage(), e);
                    }
                }

                if (CmsStringUtil.isEmptyOrWhitespaceOnly(data.getStartGallery()) && !data.getGalleries().isEmpty()) {

                    String key = "";
                    if (!types.isEmpty() && !CmsStringUtil.isEmptyOrWhitespaceOnly(conf.getReferencePath())) {
                        key = types.get(0).getType();
                        try {
                            CmsResource refResource = getCmsObject().readResource(conf.getReferencePath());
                            String referenceType = OpenCms.getResourceManager().getResourceType(
                                refResource).getTypeName();
                            key = CmsGallerySearchBean.getGalleryStorageKey(
                                data.getGalleryStoragePrefix(),
                                referenceType);
                        } catch (Exception e) {
                            LOG.error("Could not read reference resource: " + conf.getReferencePath());
                        }
                    }

                    if (!data.getGalleries().isEmpty()) {
                        startGallery = getWorkplaceSettings().getLastUsedGallery(key);
                        if (CmsStringUtil.isEmptyOrWhitespaceOnly(startGallery)) {
                            // check the user preferences for any configured start gallery
                            String galleryTypeName = data.getGalleries().get(0).getType();
                            startGallery = getWorkplaceSettings().getUserSettings().getStartGallery(
                                galleryTypeName,
                                getCmsObject());
                            if (CmsWorkplace.INPUT_DEFAULT.equals(startGallery)) {
                                startGallery = OpenCms.getWorkplaceManager().getDefaultUserSettings().getStartGallery(
                                    galleryTypeName);
                            }
                            if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(startGallery)) {
                                startGallery = getCmsObject().getRequestContext().removeSiteRoot(startGallery);
                            }
                        }
                    }
                    // check if the gallery is available in this site and still exists
                    if (!conf.isResultsSelectable()) {
                        // if selecting results is explicitly disabled, opening the start gallery does not make much sense
                        data.setStartGallery(null);
                    } else if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(startGallery)) {
                        boolean galleryExists = getCmsObject().existsResource(startGallery);
                        if (galleryExists) {
                            data.setStartGallery(startGallery);
                        } else {
                            LOG.error("Could not read start gallery: " + startGallery);
                            data.setStartGallery(null);
                        }
                    } else {
                        data.setStartGallery(null);
                    }
                }

                GalleryTabId defaultTab = conf.getTabConfiguration().getDefaultTab();
                data.setTabConfiguration(conf.getTabConfiguration());
                if (CmsStringUtil.isEmptyOrWhitespaceOnly(data.getStartGallery())
                    && CmsStringUtil.isEmptyOrWhitespaceOnly(data.getCurrentElement())
                    && CmsStringUtil.isEmptyOrWhitespaceOnly(data.getStartFolder())) {
                    data.setStartTab(defaultTab);
                } else {
                    data.setStartTab(GalleryTabId.cms_tab_results);
                }
                break;
            case ade:
                data.setReferenceSitePath(getCmsObject().getRequestContext().getUri());
                types = getResourceTypeBeans(
                    conf.getGalleryMode(),
                    data.getReferenceSitePath(),
                    conf.getResourceTypes(),
                    conf.getSearchTypes());
                data.setTypes(types);
                Map<String, CmsGalleryTypeInfo> adeGalleryTypeInfos = readGalleryInfosByTypeBeans(types);
                data.setGalleries(buildGalleriesList(adeGalleryTypeInfos));
                data.setStartTab(GalleryTabId.cms_tab_types);
                break;
            default:
                break;
        }

        if (CmsStringUtil.isEmptyOrWhitespaceOnly(data.getStartGallery())) {
            Set<String> folderFilter = readFolderFilters();
            data.setStartFolderFilter(folderFilter);
            if ((folderFilter != null) && !folderFilter.isEmpty()) {
                try {
                    data.setVfsPreloadData(
                        generateVfsPreloadData(
                            getCmsObject(),
                            CmsGalleryService.getVfsTreeState(getRequest(), conf.getTreeToken()),
                            folderFilter));
                } catch (Exception e) {
                    LOG.error(e.getLocalizedMessage(), e);
                }
            }
        }

        CmsSiteSelectorOptionBuilder optionBuilder = new CmsSiteSelectorOptionBuilder(getCmsObject());
        optionBuilder.addNormalSites(true, getWorkplaceSettings().getUserSettings().getStartFolder());
        optionBuilder.addSharedSite();
        data.setVfsSiteSelectorOptions(optionBuilder.getOptions());

        CmsSiteSelectorOptionBuilder sitemapOptionBuilder = new CmsSiteSelectorOptionBuilder(getCmsObject());
        sitemapOptionBuilder.addNormalSites(false, null);
        if (data.getReferenceSitePath() != null) {
            sitemapOptionBuilder.addCurrentSubsite(getCmsObject().addSiteRoot(data.getReferenceSitePath()));
        }
        data.setSitemapSiteSelectorOptions(sitemapOptionBuilder.getOptions());
        data.setDefaultScope(OpenCms.getWorkplaceManager().getGalleryDefaultScope());
        return data;
    }
878712
public void openSettingsDailog() {

        CmsGlobalForm form = new CmsGlobalForm(this);
        openDialog(form, CmsVaadinUtils.getMessageText(Messages.GUI_SITE_GLOBAL_CONFIGURATION_0));
    }
1236386
public void setSettings(com.google.api.ads.admanager.axis.v201902.CompanySettings settings) {
        this.settings = settings;
    }
203161
protected ModalShownHandler createShownHandler(final DisplayerSettings settings) {

        return new ModalShownHandler() {
            @Override
            public void onShown(ModalShownEvent modalShownEvent) {
                editor.init(settings);
                setTitle(editor.isBrandNewDisplayer() ? newDisplayerTitle : editDisplayerTitle);
                removeShownHandler();
            }
        };
    }
841140
public ConfigViewImpl withProperties(Properties properties) {
        if (properties != null) {
            this.properties = properties;
            this.strategy.withProperties(properties);
        }
        return this;
    }
181459
public GetStageResult withRouteSettings(java.util.Map<String, RouteSettings> routeSettings) {
        setRouteSettings(routeSettings);
        return this;
    }
206660
protected void setConfigurationService(ConfigurationService configService) {
        if (log.isLoggable(Level.FINER)) {
            log.finer("Set configuration service = " + configService);
        }

        configurationService = configService;

        if (configurationService != null) {
            initConfig();
        }
    }
1140356
public void setSettings(java.util.Collection<Setting> settings) {
        if (settings == null) {
            this.settings = null;
            return;
        }

        this.settings = new com.amazonaws.internal.SdkInternalList<Setting>(settings);
    }