public class InstallationPackageRequestManager extends Object implements Serializable
| Constructor and Description |
|---|
InstallationPackageRequestManager()
Constructs the controller bean and handles one time setup.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canImportInstallationPackages() |
void |
checkInstallationPackagesForDeletion()
The method builds a list of installation packages that are already deleted.
|
void |
clearImportState()
Clears the import state.
|
void |
clearSelectedInstallationPackages()
Clears the current installation package selection.
|
void |
clearSelection()
Clears the newly created selected installation package so editing is disabled
|
List<String> |
completeFilter(String query)
Provide suggestions for installation package given query to filter for.
|
List<String> |
completeUsers(String query,
InstallationPackageColumnUI column)
Autocomplete method for users for InstallationPackageColumnUI column.
|
List<String> |
completeUsersCableCoordinator(String query)
Autocomplete method for users for cable coordinator.
|
List<String> |
completeUsersInstallationPackageLeader(String query)
Autocomplete method for users for installation package leader.
|
void |
filterInstallationPackages()
Refreshes installation packages list based on filters.
|
List<InstallationPackageColumnUI> |
getColumns()
Returns current columns to show in installation package data table
|
List<InstallationPackageUI> |
getDeletedInstallationPackages() |
String |
getDisplayComments() |
String |
getDisplayDescription() |
String |
getDisplayService() |
boolean |
getEditInstallationPackage() |
boolean |
getFileToBeImportedExists() |
List<InstallationPackageUI> |
getFilteredInstallationPackages() |
String |
getGlobalFilter() |
LoaderResult<InstallationPackage> |
getImportResult() |
org.primefaces.model.StreamedContent |
getImportTemplate() |
List<InstallationPackageUI> |
getInstallationPackages() |
org.primefaces.model.StreamedContent |
getInstallationPackageSheetWithImportedInstallationPackages() |
org.primefaces.model.StreamedContent |
getInstallationPackageSheetWithInstallationPackagesToExport() |
List<InstallationPackageUI> |
getInstallationPackagesToExport()
Returns the installation packages to be exported,
which are the currently filtered and selected installation packages,
or all filtered cables without deleted ones if none selected.
|
int |
getInstallationPackagesToExportSize()
Return counter for number of installation packages to be exported.
|
String[] |
getInstallers() |
boolean |
getIsAddPopupOpened() |
String |
getLongOverlayURL() |
String |
getLongTextOverlayContent()
Gets overlay content text.
|
String |
getLongTextOverlayHeader()
Gets overlay header text.
|
int |
getNumberOfColumns() |
static int |
getNumberOfEntitiesPerPage() |
String |
getRequestedInstallationPackageName() |
int |
getRowNumber()
Returns row number, if applicable, for first entry in page that contains selected entry (in list of all entries).
|
int |
getRows()
Returns (current) number of rows/entries per page in pagination component.
|
InstallationPackageUI |
getSelectedInstallationPackage() |
List<InstallationPackageUI> |
getSelectedInstallationPackages() |
void |
handleDisplayComments()
Formats comments string.
|
void |
handleDisplayDescription()
Formats description string.
|
void |
handleDisplayService()
Formats service string.
|
void |
init()
Initializes the bean for initial view display.
|
void |
installationPackageFileUpload(org.primefaces.event.FileUploadEvent event)
Uploads and stores the file.
|
void |
installationPackageImport()
Performs the installation package import from the file that was last uploaded.
|
void |
installationPackageImportTest()
Performs a test of the installation package import from the file that was last uploaded.
|
boolean |
isColumnVisible(InstallationPackageColumnUI column)
Returns column visibility for given column.
|
boolean |
isColumnVisible(int columnIndex)
Returns column visibility for column with given index.
|
boolean |
isDeleteButtonEnabled() |
boolean |
isEditButtonEnabled() |
void |
isFloatEntered(javax.faces.context.FacesContext ctx,
javax.faces.component.UIComponent component,
Object value)
Validates if entered value is Float number.
|
void |
isInstallationPackageNameValid(javax.faces.context.FacesContext ctx,
javax.faces.component.UIComponent component,
Object value)
Validate installation package name.
|
boolean |
isInstallationPackageRequested() |
void |
isIntegerEntered(javax.faces.context.FacesContext ctx,
javax.faces.component.UIComponent component,
Object value)
Validates if entered value is Integer number.
|
void |
isURLEntered(javax.faces.context.FacesContext ctx,
javax.faces.component.UIComponent component,
Object value)
Validates if entered value is URL.
|
void |
onInstallationPackageAdd()
Event triggered when installation package is created.
|
void |
onInstallationPackageDelete()
Event triggered when installation package is deleted.
|
void |
onInstallationPackageEdit()
Event triggered when installation package is updated.
|
void |
onPaginate()
Event triggered when paging for data table.
|
void |
onPaginatePageSize()
Event triggered when paging for data table is complete.
|
void |
onRowSelect()
Event triggered when row is selected in table in UI.
|
void |
onToggle(org.primefaces.event.ToggleEvent event)
Event triggered when toggling column visibility.
|
void |
prepareAddPopup()
Prepare for Add installation package dialog.
|
void |
prepareEditPopup()
Prepare for Edit installation package dialog.
|
void |
resetDisplayView()
Resets displayView to default.
|
void |
resetValues()
Reset values.
|
void |
setDisplayComments(String displayComments)
Sets comments string.
|
void |
setDisplayDescription(String displayDescription)
Sets description string.
|
void |
setDisplayService(String displayService)
Sets service string.
|
void |
setFilteredInstallationPackages(List<InstallationPackageUI> filteredInstallationPackages) |
void |
setGlobalFilter(String globalFilter) |
void |
setLongOverlayURL(String longOverlayURL)
Sets the URL for the long general popup.
|
void |
setLongTextOverlayContent(String longTextOverlayContent)
Sets overlay content text.
|
void |
setLongTextOverlayHeader(String longTextOverlayHeader)
Sets overlay header text.
|
void |
setRequestedInstallationPackageName(String requestedInstallationPackageName) |
void |
setRows(int rows)
Sets (current) number of rows/entries per page in pagination component.
|
void |
setSelectedInstallationPackages(List<InstallationPackageUI> selectedInstallationPackages) |
String |
tooltipForInstallationPackage(InstallationPackageColumnUI column)
Return tooltip for installation package column.
|
String |
tooltipForLink(String label,
String column,
String value)
Return tooltip for installation package link.
|
void |
unselectAllRows()
Unselect all rows and proceed accordingly, i.e.
|
void |
updateColumns()
Updates columns according to column template and loads data in them.
|
void |
updateInstallationPackagesToExportSize()
Update counter for number of installation packages to be exported.
|
public InstallationPackageRequestManager()
@PostConstruct public void init()
public boolean getFileToBeImportedExists()
true if the uploaded file that hasn't been imported yet exists, false otherwisepublic List<InstallationPackageUI> getInstallationPackagesToExport()
public LoaderResult<InstallationPackage> getImportResult()
public void clearImportState()
public void installationPackageFileUpload(org.primefaces.event.FileUploadEvent event)
event - the event containing the filepublic void installationPackageImportTest()
public void installationPackageImport()
public org.primefaces.model.StreamedContent getInstallationPackageSheetWithImportedInstallationPackages()
public org.primefaces.model.StreamedContent getInstallationPackageSheetWithInstallationPackagesToExport()
public org.primefaces.model.StreamedContent getImportTemplate()
public boolean isEditButtonEnabled()
public boolean isDeleteButtonEnabled()
public String getRequestedInstallationPackageName()
public void setRequestedInstallationPackageName(String requestedInstallationPackageName)
public boolean isInstallationPackageRequested()
public List<InstallationPackageUI> getInstallationPackages()
public List<InstallationPackageUI> getFilteredInstallationPackages()
public void setFilteredInstallationPackages(List<InstallationPackageUI> filteredInstallationPackages)
filteredInstallationPackages - the filtered installation packages to setpublic String getGlobalFilter()
public void setGlobalFilter(String globalFilter)
globalFilter - the global text filter to setpublic void filterInstallationPackages()
public List<InstallationPackageUI> getSelectedInstallationPackages()
public void setSelectedInstallationPackages(List<InstallationPackageUI> selectedInstallationPackages)
selectedInstallationPackages - the installation packages to selectpublic void clearSelectedInstallationPackages()
public void onPaginate()
public void onPaginatePageSize()
public void onToggle(org.primefaces.event.ToggleEvent event)
event - toggle eventpublic boolean isColumnVisible(int columnIndex)
columnIndex - column index for column in UI, counting from leftpublic boolean isColumnVisible(InstallationPackageColumnUI column)
column - given columnpublic void unselectAllRows()
public void onRowSelect()
public boolean getIsAddPopupOpened()
public void prepareAddPopup()
public void resetValues()
public void onInstallationPackageAdd()
public void prepareEditPopup()
public void onInstallationPackageEdit()
public List<InstallationPackageUI> getDeletedInstallationPackages()
public void checkInstallationPackagesForDeletion()
public void onInstallationPackageDelete()
public void isInstallationPackageNameValid(javax.faces.context.FacesContext ctx,
javax.faces.component.UIComponent component,
Object value)
ctx - faces contextcomponent - ui componentvalue - installation package namepublic void isIntegerEntered(javax.faces.context.FacesContext ctx,
javax.faces.component.UIComponent component,
Object value)
ctx - faces contextcomponent - componentvalue - entered valuejavax.faces.validator.ValidatorException - if entered value is not Integer numberpublic void isFloatEntered(javax.faces.context.FacesContext ctx,
javax.faces.component.UIComponent component,
Object value)
ctx - faces contextcomponent - componentvalue - entered valuejavax.faces.validator.ValidatorException - if entered value is not Double numberpublic void isURLEntered(javax.faces.context.FacesContext ctx,
javax.faces.component.UIComponent component,
Object value)
ctx - faces contextcomponent - componentvalue - entered valuejavax.faces.validator.ValidatorException - if entered value is not URLpublic InstallationPackageUI getSelectedInstallationPackage()
public boolean getEditInstallationPackage()
public String getDisplayDescription()
public void setDisplayDescription(String displayDescription)
displayDescription - stringpublic void handleDisplayDescription()
public String getDisplayService()
public void setDisplayService(String displayService)
displayService - service stringpublic void handleDisplayService()
public String getDisplayComments()
public void setDisplayComments(String displayComments)
displayComments - comments string.public void handleDisplayComments()
public void resetDisplayView()
public List<InstallationPackageColumnUI> getColumns()
public void updateColumns()
public int getNumberOfColumns()
public int getInstallationPackagesToExportSize()
public void updateInstallationPackagesToExportSize()
public boolean canImportInstallationPackages()
public void setLongTextOverlayHeader(String longTextOverlayHeader)
longTextOverlayHeader - the overlay header text.public String getLongTextOverlayHeader()
public void setLongTextOverlayContent(String longTextOverlayContent)
longTextOverlayContent - the overlay content text.public String getLongTextOverlayContent()
public void setLongOverlayURL(String longOverlayURL)
longOverlayURL - the url to where the popup is pointing.public String getLongOverlayURL()
public void clearSelection()
public static int getNumberOfEntitiesPerPage()
public int getRowNumber()
public int getRows()
public void setRows(int rows)
rows - number of rows per pagepublic List<String> completeFilter(String query)
query - query to filter forpublic String tooltipForInstallationPackage(InstallationPackageColumnUI column)
column - installation package columnpublic String tooltipForLink(String label, String column, String value)
label - labelcolumn - columnvalue - (part of) tooltippublic String[] getInstallers()
public List<String> completeUsersCableCoordinator(String query)
query - query to filter userspublic List<String> completeUsersInstallationPackageLeader(String query)
query - query to filter userspublic List<String> completeUsers(String query, InstallationPackageColumnUI column)
query - query to filter userscolumn - intended column (InstallationPackageColumnUI)Copyright © 2025 European Spallation Source. All rights reserved.