Class UserPortalConfigFileBean


  • @RequestScoped
    @Named
    public class UserPortalConfigFileBean
    extends Object
    Bean for handling files in the user portal backend UI. In particular, used for streaming GraphicImage.
    • Constructor Detail

      • UserPortalConfigFileBean

        public UserPortalConfigFileBean()
    • Method Detail

      • encodeDynamicResourceParams

        public String encodeDynamicResourceParams​(UserPortalFileViewModel model,
                                                  String type)
        Encodes the parameters needed to serve the given file. Encrypts the parameters so that we do not, for example, expose the file path
        Parameters:
        model - The file to encode.
        type - The type of the file, either 'project', or 'portal'.
        Returns:
        The encoded parameters.
      • getFile

        public org.primefaces.model.StreamedContent getFile()
        Serves a file from a project or portal entity.
        Returns:
        The file data.