/** * Returns a lazy initialized map that describes if a certain element if part of this container.<p> * * @return a lazy initialized map that describes if a certain element if part of this container */ public Map<CmsUUID, Boolean> getContainsElement() { if (m_containsElement == null) { m_containsElement = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() { public Object transform(Object input) { return Boolean.valueOf(containsElement((CmsUUID)input)); } }); } return m_containsElement; }
/** * Returns a lazy initialized map that describes if a certain element if part of this container.<p> * * @return a lazy initialized map that describes if a certain element if part of this container */ public Map<CmsUUID, Boolean> getContainsElement() { if (m_containsElement == null) { m_containsElement = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() { public Object transform(Object input) { return Boolean.valueOf(containsElement((CmsUUID)input)); } }); } return m_containsElement; }
/** * @see org.opencms.jsp.search.state.I_CmsSearchStateSorting#getCheckSelected() */ @Override public Map<I_CmsSearchConfigurationSortOption, Boolean> getCheckSelected() { if (m_selectedMap == null) { m_selectedMap = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() { @Override public Object transform(final Object option) { return Boolean.valueOf(((I_CmsSearchConfigurationSortOption)option).equals(m_selected)); } }); } return m_selectedMap; }
/** * @see org.opencms.jsp.search.state.I_CmsSearchStateFacet#getIsChecked() */ @Override public Map<String, Boolean> getIsChecked() { if (m_checkedMap == null) { m_checkedMap = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() { @Override public Object transform(final Object option) { return Boolean.valueOf(m_checked.contains(option)); } }); } return m_checkedMap; }
/** * @see org.opencms.jsp.search.result.I_CmsSearchResultWrapper#getFieldFacet() */ @Override public Map<String, FacetField> getFieldFacet() { if (m_fieldFacetMap == null) { m_fieldFacetMap = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() { @Override public Object transform(final Object fieldName) { return m_solrResultList == null ? null : m_solrResultList.getFacetField(fieldName.toString()); } }); } return m_fieldFacetMap; }
/** * @see org.opencms.jsp.search.result.I_CmsSearchResourceBean#getMultiValuedFields() */ @Override public Map<String, List<String>> getMultiValuedFields() { if (m_multivaluedfields == null) { m_multivaluedfields = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() { @Override public Object transform(final Object fieldName) { return getSearchResource().getMultivaluedField(fieldName.toString()); } }); } return m_multivaluedfields; }
/** * Returns a lazily generated map from site paths of resources to the available locales for the resource. * * @return a lazily generated map from site paths of resources to the available locales for the resource. */ public Map<String, List<Locale>> getAvailableLocales() { if (m_availableLocales == null) { // create lazy map only on demand m_availableLocales = CmsCollectionsGenericWrapper.createLazyMap(new CmsAvailableLocaleLoaderTransformer()); } return m_availableLocales; }
/** * Helper to get locale specific properties. * @return the locale specific properties map. */ private Map<String, String> getLocaleProperties() { if (m_localeProperties == null) { m_localeProperties = CmsCollectionsGenericWrapper.createLazyMap( new CmsProperty.CmsPropertyLocaleTransformer(m_properties, m_locale)); } return m_localeProperties; }
/** * Returns the map of RDFA maps by locale.<p> * * @return the map of RDFA maps by locale */ public Map<String, Map<String, String>> getLocaleRdfa() { if (m_localeRdfa == null) { m_localeRdfa = CmsCollectionsGenericWrapper.createLazyMap(new CmsLocaleRdfaTransformer()); } return m_localeRdfa; }
/** * Returns a lazy initialized setting map.<p> * * @return the settings */ public Map<String, ElementSettingWrapper> getSetting() { return CmsCollectionsGenericWrapper.createLazyMap(new SettingsTransformer(m_wrappedElement)); }
/** * Returns a lazy initialized Map that provides direct access to the XML element * for the current value from the XML content.<p> * * @return a lazy initialized Map that provides direct access to the XML element for the current value from the XML content */ public Map<String, String> getXmlText() { if (m_xml == null) { m_xml = CmsCollectionsGenericWrapper.createLazyMap(new CmsXmlValueTransformer()); } return m_xml; }
/** * Gets the lazy imageDnd map.<p> * * @return the lazy imageDnd map */ public Map<String, String> getImageDnd() { if (m_imageDnd == null) { m_imageDnd = CmsCollectionsGenericWrapper.createLazyMap(new CmsImageDndTransformer()); } return m_imageDnd; }
/** * Returns a lazy initialized Map that provides the RDFA for nested sub values.<p> * * The provided Map key is assumed to be a String that represents the relative xpath to the value.<p> * * @return a lazy initialized Map that provides the RDFA for nested sub values */ public Map<String, String> getRdfa() { if (m_rdfa == null) { m_rdfa = CmsCollectionsGenericWrapper.createLazyMap(new CmsRdfaTransformer()); } return m_rdfa; }
/** * Returns a map from a category path to the wrapper of all the sub-categories of the category with the path given as key. * * @return a map from a category path to all sub-categories of the path's category. */ public Map<String, CmsJspCategoryAccessBean> getSubCategories() { if (m_subCategories == null) { m_subCategories = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() { @SuppressWarnings("synthetic-access") public Object transform(Object pathPrefix) { return new CmsJspCategoryAccessBean(m_categories, (String)pathPrefix); } }); } return m_subCategories; }
/** * @see org.apache.commons.collections.Transformer#transform(java.lang.Object) */ public Object transform(Object input) { Map<String, String> result = null; // first read the resource using the lazy map CmsResource resource = getReadResource().get(input); if (resource != null) { result = CmsCollectionsGenericWrapper.createLazyMap( new CmsLocalePropertyLoaderTransformer(getCmsObject(), resource, m_search)); } // result may still be null return (result == null) ? Collections.EMPTY_MAP : result; } }
/** * @see org.apache.commons.collections.Transformer#transform(java.lang.Object) */ public Object transform(Object input) { Map<String, String> result = null; // first read the resource using the lazy map CmsResource resource = getReadResource().get(input); if (resource != null) { result = CmsCollectionsGenericWrapper.createLazyMap( new CmsPropertyLoaderTransformer(getCmsObject(), resource, m_search)); } // result may still be null return (result == null) ? Collections.EMPTY_MAP : result; } }
/** * @see org.apache.commons.collections.Transformer#transform(java.lang.Object) */ public Object transform(Object input) { Locale locale = CmsLocaleManager.getLocale(String.valueOf(input)); Map<String, CmsJspContentAccessValueWrapper> result; if (getRawContent().hasLocale(locale)) { result = CmsCollectionsGenericWrapper.createLazyMap(new CmsValueTransformer(locale)); } else { result = CONSTANT_NULL_VALUE_WRAPPER_MAP; } return result; } }
/** * @see org.apache.commons.collections.Transformer#transform(java.lang.Object) */ public Object transform(Object input) { Locale locale = CmsJspElFunctions.convertLocale(input); Map<String, Boolean> result; if (getRawContent().hasLocale(locale)) { result = CmsCollectionsGenericWrapper.createLazyMap(new CmsHasValueTransformer(locale)); } else { result = CmsConstantMap.CONSTANT_BOOLEAN_FALSE_MAP; } return result; } }
/** * @see org.apache.commons.collections.Transformer#transform(java.lang.Object) */ public Object transform(Object input) { Locale locale = CmsJspElFunctions.convertLocale(input); Map<String, List<CmsJspContentAccessValueWrapper>> result; if (getRawContent().hasLocale(locale)) { result = CmsCollectionsGenericWrapper.createLazyMap(new CmsSubValueListTransformer(locale)); } else { result = CmsConstantMap.CONSTANT_EMPTY_LIST_MAP; } return result; } }
/** * @see org.apache.commons.collections.Transformer#transform(java.lang.Object) */ public Object transform(Object input) { Locale locale = CmsJspElFunctions.convertLocale(input); Map<String, List<CmsJspContentAccessValueWrapper>> result; if (getRawContent().hasLocale(locale)) { result = CmsCollectionsGenericWrapper.createLazyMap(new CmsValueListTransformer(locale)); } else { result = CmsConstantMap.CONSTANT_EMPTY_LIST_MAP; } return result; } }