Class CmsJspContentAttachmentsBean


  • public class CmsJspContentAttachmentsBean
    extends java.lang.Object
    Allows accessing 'attachments' of an XML content via the EL in JSP code, which in OpenCms are defined as the contents of its detail-only containers.
    • Method Detail

      • getAttachmentLocales

        public static java.util.List<java.lang.String> getAttachmentLocales​(CmsObject cms,
                                                                            CmsResource content)
        Gets the list of locales for which attachments / detail-only containers are available.

        Parameters:
        cms - the current CMS context
        content - the content resource
        Returns:
        the list of locales for which there are attachments
      • getByContainer

        public java.util.Map<java.lang.String,​java.util.List<CmsContainerElementBean>> getByContainer()
        Gets lazy map that returns lists of element beans for the container whose name is given as a key.

        Returns:
        a lazy map to fetch contents of a container
      • getByType

        public java.util.Map<java.lang.String,​java.util.List<CmsContainerElementBean>> getByType()
        Gets lazy map that maps type names to lists of container elements of that type.

        Returns:
        a map from type names to lists of container elements
      • getContainers

        public java.util.Set<java.lang.String> getContainers()
        Gets the set of container names.

        Returns:
        the set of container names
      • isUndefined

        public boolean isUndefined()
        Returns true if the attachments are undefined.

        Returns:
        true if the attachments are undefined
      • getPage

        protected CmsContainerPageBean getPage()
        Gets the container page bean for the detail-only page.

        Returns:
        the container page bean