Package de.xima.fc.gui.bean.data
Class DataSourcesBean
- java.lang.Object
-
- de.xima.fc.gui.bean.data.DataSourcesBean
-
- All Implemented Interfaces:
Serializable
@Named @ViewScoped public class DataSourcesBean extends Object implements Serializable
Bean für die aktuelle Session und deren Informationen- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
DataSourcesBean.EntityListModelImpl
-
Constructor Summary
Constructors Constructor Description DataSourcesBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<EDatenquellenTyp>
getAvailableTypes()
CSVDatasourceParameterModel
getCsvParameterModel()
String
getCurrentNameLabel()
List<DatenbankZugriff>
getDatenbankzugriffe()
DataSourceImporter
getFileImporter()
String
getGeneratedUrl()
String
getLimitsMessage()
org.primefaces.model.StreamedContent
getMarkedSources()
GeneratesStreamedContent
from the List of all the marked data sources contained within the model.IEntityListModelSelectByView<Datenquelle>
getModel()
SessionBean
getSessionBean()
Deprecated.DataSourcesSheetBean
getSheetBean()
org.primefaces.model.StreamedContent
getSource(Datenquelle source)
GeneratesStreamedContent
for the given data source and returns itString
getSourceCode()
String
getSourceCorruptedMsg()
void
importCSVFromFile()
imports the CSV data from the previously uploaded file with the previously set options (through the import dialog)void
init()
boolean
isTableView()
void
onImportSourceDialogCancel()
String
remoteLastUpdated()
String
remoteLastUpdatedStatus()
void
setCsvParameterModel(CSVDatasourceParameterModel csvParameterModel)
void
setModel(IEntityListModelSelectByView<Datenquelle> model)
void
setSessionBean(SessionBean sessionBean)
Deprecated.void
setSheetBean(DataSourcesSheetBean sheetBean)
void
setSourceCode(String sourceCode)
void
setTableView(boolean isTableView)
void
setType(EDatenquellenTyp type)
Sets the type of the selected data source and gives it a unique name depending on the typevoid
toggleView()
void
updateModel()
void
updateRemoteDataSource()
Download the data from the configured remote URL and put into data sheet.void
uploadAndPersist(org.primefaces.event.FileUploadEvent event)
void
uploadFile(org.primefaces.event.FileUploadEvent event)
-
-
-
Method Detail
-
init
@PostConstruct public void init()
-
getSheetBean
public DataSourcesSheetBean getSheetBean()
-
setSheetBean
public void setSheetBean(DataSourcesSheetBean sheetBean)
-
getAvailableTypes
public List<EDatenquellenTyp> getAvailableTypes()
-
updateModel
public void updateModel()
-
getModel
public IEntityListModelSelectByView<Datenquelle> getModel()
- Returns:
- the model
-
setModel
public void setModel(IEntityListModelSelectByView<Datenquelle> model)
- Parameters:
model
- the model to set
-
getFileImporter
public DataSourceImporter getFileImporter()
-
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
-
getCsvParameterModel
public CSVDatasourceParameterModel getCsvParameterModel()
-
setCsvParameterModel
public void setCsvParameterModel(CSVDatasourceParameterModel csvParameterModel)
-
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()
-
getDatenbankzugriffe
public List<DatenbankZugriff> getDatenbankzugriffe()
-
getSource
public org.primefaces.model.StreamedContent getSource(Datenquelle source)
GeneratesStreamedContent
for the given data source and returns it- Parameters:
source
-Datenquelle
for which theStreamedContent
should be generated- Returns:
StreamedContent
of the given data source
-
getCurrentNameLabel
public String getCurrentNameLabel()
-
remoteLastUpdated
public String remoteLastUpdated()
- Returns:
- localized string with the last update date of the remote data source
-
remoteLastUpdatedStatus
public String remoteLastUpdatedStatus()
- Returns:
- localized string with the last update status of the remote data source
-
updateRemoteDataSource
public void updateRemoteDataSource()
Download the data from the configured remote URL and put into data sheet. Also updates timestamp and status of the last update on csvParamModel.
-
getMarkedSources
public org.primefaces.model.StreamedContent getMarkedSources()
GeneratesStreamedContent
from the List of all the marked data sources contained within the model. If this list contains only a single entry theStreamedContent
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 generatedStreamedContent
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()
-
getSessionBean
@Deprecated public SessionBean getSessionBean()
Deprecated.
-
setSessionBean
@Deprecated public void setSessionBean(SessionBean sessionBean)
Deprecated.
-
-