Class ResourceContentBean

  • All Implemented Interfaces:
    Serializable

    @Named
    @SessionScoped
    public class ResourceContentBean
    extends AJSFContext
    Bean-Klasse zum Anzeigen von Resourcen. ACHTUNG!! Diese muss wird separat benutzt, da zum streamen von dynamischen Inhalten (Hier z.B. Bildern) die Bean im Session oder Application-Scope sein muss!!!
    Author:
    XIMA MEDIA GmbH
    See Also:
    Serialized Form
    • Field Detail

      • data

        protected byte[] data
      • contentType

        protected String contentType
    • Constructor Detail

      • ResourceContentBean

        public ResourceContentBean()
    • Method Detail

      • getData

        public byte[] getData()
        Returns:
        the data
      • setData

        public void setData​(byte[] data)
        Parameters:
        data - the data to set
      • setData

        public void setData​(byte[] data,
                            String contentType)
      • getResourceDataStream

        public org.primefaces.model.StreamedContent getResourceDataStream()
      • isPlainTextDataString

        public boolean isPlainTextDataString()
        Returns:
        true iff the content of the currently selected resource represents plain text, ie. valid UTF-8 bytes.
      • getResourceDataString

        public String getResourceDataString()
      • setResourceDataString

        public void setResourceDataString​(String resourceData)
      • hasData

        public boolean hasData()