/** Returns the configured sort options, or the empty list if no such options are configured. * @return The configured sort options, or the empty list if no such options are configured. */ private List<I_CmsSearchConfigurationSortOption> getSortOptions() { final List<I_CmsSearchConfigurationSortOption> options = new ArrayList<I_CmsSearchConfigurationSortOption>(); final CmsXmlContentValueSequence sortOptions = m_xml.getValueSequence(XML_ELEMENT_SORTOPTIONS, m_locale); if (sortOptions == null) { return null; } else { for (int i = 0; i < sortOptions.getElementCount(); i++) { final I_CmsSearchConfigurationSortOption option = parseSortOption( sortOptions.getValue(i).getPath() + "/"); if (option != null) { options.add(option); } } return options; } }
/** * @see org.opencms.jsp.search.config.parser.I_CmsSearchConfigurationParser#parseRangeFacets() */ public Map<String, I_CmsSearchConfigurationFacetRange> parseRangeFacets() { final Map<String, I_CmsSearchConfigurationFacetRange> facetConfigs = new LinkedHashMap<String, I_CmsSearchConfigurationFacetRange>(); final CmsXmlContentValueSequence rangeFacets = m_xml.getValueSequence(XML_ELEMENT_RANGE_FACETS, m_locale); if (rangeFacets != null) { for (int i = 0; i < rangeFacets.getElementCount(); i++) { final I_CmsSearchConfigurationFacetRange config = parseRangeFacet( rangeFacets.getValue(i).getPath() + "/"); if (config != null) { facetConfigs.put(config.getName(), config); } } } return facetConfigs; }
/** * @see org.opencms.jsp.search.config.parser.I_CmsSearchConfigurationParser#parseFieldFacets() */ @Override public Map<String, I_CmsSearchConfigurationFacetField> parseFieldFacets() { final Map<String, I_CmsSearchConfigurationFacetField> facetConfigs = new LinkedHashMap<String, I_CmsSearchConfigurationFacetField>(); final CmsXmlContentValueSequence fieldFacets = m_xml.getValueSequence(XML_ELEMENT_FIELD_FACETS, m_locale); if (fieldFacets != null) { for (int i = 0; i < fieldFacets.getElementCount(); i++) { final I_CmsSearchConfigurationFacetField config = parseFieldFacet( fieldFacets.getValue(i).getPath() + "/"); if (config != null) { facetConfigs.put(config.getName(), config); } } } return facetConfigs; }
I_CmsXmlContentValue value = elementSequence.getValue(j);
I_CmsXmlContentValue value = elementSequence.getValue(j);
I_CmsXmlContentValue value = elementSequence.getValue(j); I_CmsWidget widget = null; if (type.isSimpleType()) {
for (int i = 0; i < messages.getElementCount(); i++) { String prefix = messages.getValue(i).getPath() + "/"; String key = m_descContent.getValue(prefix + Descriptor.N_KEY, Descriptor.LOCALE).getStringValue(m_cms); if (key == oldKey) {
for (int i = 0; i < messages.getElementCount(); i++) { String prefix = messages.getValue(i).getPath() + "/"; Object itemId = container.addItem(); Item item = container.getItem(itemId);
/** * Creates the container for a bundle descriptor. * @return the container for a bundle descriptor. */ private IndexedContainer createContainerForDescriptorEditing() { IndexedContainer container = new IndexedContainer(); // create properties container.addContainerProperty(TableProperty.KEY, String.class, ""); container.addContainerProperty(TableProperty.DESCRIPTION, String.class, ""); container.addContainerProperty(TableProperty.DEFAULT, String.class, ""); // add entries CmsXmlContentValueSequence messages = m_descContent.getValueSequence( "/" + Descriptor.N_MESSAGE, Descriptor.LOCALE); for (int i = 0; i < messages.getElementCount(); i++) { String prefix = messages.getValue(i).getPath() + "/"; Object itemId = container.addItem(); Item item = container.getItem(itemId); String key = m_descContent.getValue(prefix + Descriptor.N_KEY, Descriptor.LOCALE).getStringValue(m_cms); item.getItemProperty(TableProperty.KEY).setValue(key); item.getItemProperty(TableProperty.DESCRIPTION).setValue( m_descContent.getValue(prefix + Descriptor.N_DESCRIPTION, Descriptor.LOCALE).getStringValue(m_cms)); item.getItemProperty(TableProperty.DEFAULT).setValue( m_descContent.getValue(prefix + Descriptor.N_DEFAULT, Descriptor.LOCALE).getStringValue(m_cms)); } return container; }