public class CableArticleRequestManager extends Object implements Serializable
| Constructor and Description |
|---|
CableArticleRequestManager()
Constructs the controller bean and handles one time setup.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cableArticleFileUpload(org.primefaces.event.FileUploadEvent event)
Uploads and stores the file.
|
void |
cableArticleImport()
Performs the cable article import from the file that was last uploaded.
|
void |
cableArticleImportTest()
Performs a test of the cable article import from the file that was last uploaded.
|
boolean |
canImportCableArticles()
Return true if the current user can import cable articles, else false.
|
void |
checkCableArticlesForDeletion()
The method builds a list of cable articles that are already deleted.
|
void |
clearImportState()
Clears the import state.
|
void |
clearSelectedCableArticles()
Clears the current cable article selection.
|
void |
clearSelection()
Clears the newly created selected cable article so editing is disabled
|
List<String> |
completeFilter(String query)
Provide suggestions for cable article given query to filter for.
|
void |
filterCableArticles()
Refreshes cable articles list based on filters.
|
List<CableArticleUI> |
getCableArticles() |
org.primefaces.model.StreamedContent |
getCableArticleSheetWithCableArticlesToExport() |
org.primefaces.model.StreamedContent |
getCableArticleSheetWithImportedCableArticles() |
List<CableArticleUI> |
getCableArticlesToExport()
Returns the cable articles to be exported,
which are the currently filtered and selected cable articles,
or all filtered cables without deleted ones if none selected.
|
int |
getCableArticlesToExportSize()
Return counter for number of cable articles to be exported.
|
List<CableArticleColumnUI> |
getColumns()
Returns current columns to show in cable article data table
|
List<CableArticleUI> |
getDeletedCableArticles() |
String |
getDisplayComments() |
String |
getDisplayDescription() |
String |
getDisplayService() |
boolean |
getEditCableArticle()
Return true if the current user can edit cable article, else false.
|
boolean |
getFileToBeImportedExists() |
List<CableArticleUI> |
getFilteredCableArticles() |
String |
getGlobalFilter() |
LoaderResult<CableArticle> |
getImportResult() |
org.primefaces.model.StreamedContent |
getImportTemplate() |
boolean |
getIsAddPopupOpened() |
String |
getLongOverlayURL() |
String |
getLongTextOverlayContent()
Gets overlay content text.
|
String |
getLongTextOverlayHeader()
Gets overlay header text.
|
int |
getNumberOfColumns() |
static int |
getNumberOfEntitiesPerPage() |
String |
getRequestedCableArticleName() |
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.
|
CableArticleUI |
getSelectedCableArticle() |
List<CableArticleUI> |
getSelectedCableArticles() |
String[] |
getStandardParts() |
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 |
isCableArticleErpNumberValid(javax.faces.context.FacesContext ctx,
javax.faces.component.UIComponent component,
Object value)
Validate cable article epr number.
|
void |
isCableArticleExternalIdValid(javax.faces.context.FacesContext ctx,
javax.faces.component.UIComponent component,
Object value)
Validate cable article external id.
|
void |
isCableArticleManufacturerValid(javax.faces.context.FacesContext ctx,
javax.faces.component.UIComponent component,
Object value)
Validate cable article manufacturer.
|
boolean |
isCableArticleRequested() |
void |
isCableArticleShortNameExternalIdValid(javax.faces.context.FacesContext ctx,
javax.faces.component.UIComponent component,
Object value)
Validate cable article short name .
|
boolean |
isColumnVisible(CableArticleColumnUI 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 |
onCableArticleAdd()
Event triggered when cable article is created.
|
void |
onCableArticleDelete()
Event triggered when cable article is deleted.
|
void |
onCableArticleEdit()
Event triggered when cable article 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 cable article dialog.
|
void |
prepareEditPopup()
Prepare for Edit cable article 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 |
setFilteredCableArticles(List<CableArticleUI> filteredCableArticles) |
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 |
setRequestedCableArticleName(String requestedCableArticleName) |
void |
setRows(int rows)
Sets (current) number of rows/entries per page in pagination component.
|
void |
setSelectedCableArticles(List<CableArticleUI> selectedCableArticles) |
String |
tooltipForCableArticle(CableArticleColumnUI column)
Return tooltip for cable article column.
|
String |
tooltipForLink(String label,
String column,
String value)
Return tooltip for cable article link.
|
void |
unselectAllRows()
Unselect all rows and proceed accordingly, i.e.
|
void |
updateCableArticlesToExportSize()
Update counter for number of cable articles to be exported.
|
void |
updateColumns()
Updates columns according to column template and loads data in them.
|
public CableArticleRequestManager()
@PostConstruct public void init()
public boolean getFileToBeImportedExists()
true if the uploaded file that hasn't been imported yet exists, false otherwisepublic List<CableArticleUI> getCableArticlesToExport()
public LoaderResult<CableArticle> getImportResult()
public void clearImportState()
public void cableArticleFileUpload(org.primefaces.event.FileUploadEvent event)
event - the event containing the filepublic void cableArticleImportTest()
public void cableArticleImport()
public org.primefaces.model.StreamedContent getCableArticleSheetWithImportedCableArticles()
public org.primefaces.model.StreamedContent getCableArticleSheetWithCableArticlesToExport()
public org.primefaces.model.StreamedContent getImportTemplate()
public boolean isEditButtonEnabled()
public boolean isDeleteButtonEnabled()
public String getRequestedCableArticleName()
public void setRequestedCableArticleName(String requestedCableArticleName)
public boolean isCableArticleRequested()
public List<CableArticleUI> getCableArticles()
public List<CableArticleUI> getFilteredCableArticles()
public void setFilteredCableArticles(List<CableArticleUI> filteredCableArticles)
filteredCableArticles - the filtered cable articles to setpublic String getGlobalFilter()
public void setGlobalFilter(String globalFilter)
globalFilter - the global text filter to setpublic void filterCableArticles()
public List<CableArticleUI> getSelectedCableArticles()
public void setSelectedCableArticles(List<CableArticleUI> selectedCableArticles)
selectedCableArticles - the cable articles to selectpublic void clearSelectedCableArticles()
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(CableArticleColumnUI column)
column - given columnpublic void unselectAllRows()
public void onRowSelect()
public boolean getIsAddPopupOpened()
public void prepareAddPopup()
public void resetValues()
public void onCableArticleAdd()
public void prepareEditPopup()
public void onCableArticleEdit()
public List<CableArticleUI> getDeletedCableArticles()
public void checkCableArticlesForDeletion()
public void onCableArticleDelete()
public void isCableArticleManufacturerValid(javax.faces.context.FacesContext ctx,
javax.faces.component.UIComponent component,
Object value)
ctx - faces contextcomponent - ui componentvalue - cable article manufacturerpublic void isCableArticleExternalIdValid(javax.faces.context.FacesContext ctx,
javax.faces.component.UIComponent component,
Object value)
ctx - faces contextcomponent - ui componentvalue - cable article external idpublic void isCableArticleErpNumberValid(javax.faces.context.FacesContext ctx,
javax.faces.component.UIComponent component,
Object value)
ctx - faces contextcomponent - ui componentvalue - cable article epr numberpublic void isCableArticleShortNameExternalIdValid(javax.faces.context.FacesContext ctx,
javax.faces.component.UIComponent component,
Object value)
ctx - faces contextcomponent - ui componentvalue - cable article short name . external id (name)public 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 CableArticleUI getSelectedCableArticle()
public boolean getEditCableArticle()
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<CableArticleColumnUI> getColumns()
public void updateColumns()
public int getNumberOfColumns()
public int getCableArticlesToExportSize()
public void updateCableArticlesToExportSize()
public boolean canImportCableArticles()
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 tooltipForLink(String label, String column, String value)
label - labelcolumn - columnvalue - (part of) tooltippublic String tooltipForCableArticle(CableArticleColumnUI column)
column - cable article columnpublic String[] getStandardParts()
Copyright © 2025 European Spallation Source. All rights reserved.