Class DataSourcesBean

  • All Implemented Interfaces:
    Serializable

    @Named
    @ViewScoped
    public class DataSourcesBean
    extends AMessaging
    Bean für die aktuelle Session und deren Informationen
    Author:
    XIMA MEDIA GmbH
    See Also:
    Serialized Form
    • Constructor Detail

      • DataSourcesBean

        public DataSourcesBean()
    • Method Detail

      • init

        @PostConstruct
        public void init()
      • setSessionBean

        public void setSessionBean​(SessionBean sessionBean)
      • updateModel

        public void updateModel()
      • getSourceCode

        public String getSourceCode()
        Returns:
        String sourceCode from pe:codeMirror
      • setSourceCode

        public void setSourceCode​(String sourceCode)
        Parameters:
        sourceCode - the sourceCode to set
      • getSourceCorruptedMsg

        public String getSourceCorruptedMsg()
      • setType

        public void setType​(EDatenquellenTyp type)
        Sets the type of the selected data source and gives it a unique name depending on the type
        Parameters:
        type - EDatenquellenTyp to set
      • isFirstRowIsHeader

        public boolean isFirstRowIsHeader()
        Returns:
        the firstRowIsHeader
      • setFirstRowIsHeader

        public void setFirstRowIsHeader​(boolean firstRowIsHeader)
        Parameters:
        firstRowIsHeader - the firstRowIsHeader to set
      • isTableView

        public boolean isTableView()
        Returns:
        true if the table view is currently active and false if the source code view is currently active
      • setTableView

        public void setTableView​(boolean isTableView)
        Parameters:
        isTableView - true for table view. false for source code view
      • getGeneratedUrl

        public String getGeneratedUrl()
      • getSource

        public org.primefaces.model.StreamedContent getSource​(Datenquelle source)
        Generates StreamedContent for the given data source and returns it
        Parameters:
        source - Datenquelle for which the StreamedContent should be generated
        Returns:
        StreamedContent of the given data source
      • getCurrentNameLabel

        public String getCurrentNameLabel()
      • getMarkedSources

        public org.primefaces.model.StreamedContent getMarkedSources()
        Generates StreamedContent from the List of all the marked data sources contained within the model. If this list contains only a single entry the StreamedContent for this data source will be returned. If the list contains more than one entry the data sources will be packed into a zip file and the generated StreamedContent of the zip file will be returned.
        Returns:
        the StreamedContent of all the marked model data sources
      • toggleView

        public void toggleView()
      • importCSVFromFile

        public void importCSVFromFile()
        imports the CSV data from the previously uploaded file with the previously set options (through the import dialog)
      • uploadAndPersist

        public void uploadAndPersist​(org.primefaces.event.FileUploadEvent event)
      • onImportSourceDialogCancel

        public void onImportSourceDialogCancel()
      • uploadFile

        public void uploadFile​(org.primefaces.event.FileUploadEvent event)
      • getLimitsMessage

        public String getLimitsMessage()