Package de.xima.fc.gui.bean.settings
Class LicenseBean
- All Implemented Interfaces:
Serializable
- Author:
- XIMA MEDIA GmbH, Dresden
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.xima.fc.gui.common.utils.msg.AJSFContext
AJSFContext.RedirectOptions, AJSFContext.RedirectOptionsBuilder
-
Field Summary
Fields inherited from class de.xima.fc.gui.bean.FCContextBean
systemUC
Fields inherited from class de.xima.fc.gui.common.utils.msg.AJSFContext
localeBean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
When the user click on the button in the UI, creates a new demo license for the current user so that they can evaluate this application.void
deleteLicense
(Long licenseFileId) org.primefaces.model.StreamedContent
downloadLicense
(String licenseKey, ELicenseFileType licenseType) void
getAllClientItemLicenses
(String licenseKey) getAllItemLicenses
(LicenseModel license) getClientLicenseModelByKey
(String licenseKey) getClientLicenseSnapshot
(LicenseFile licenseFile) getLicenseModel
(LicenseFile file) void
init()
Performed once upon page load.boolean
boolean
boolean
boolean
licenseError
(int statusCode) void
restDemoModel
(boolean clientLicense) void
selectLicense
(Long licenseFileId) void
setAllowedDemoProma
(boolean allowedDemoProma) void
setClientLicenseKey
(String licenseKey) void
setClientLicenses
(List<LicenseViewModel> clientLicenses) void
setPromaDataLoading
(boolean isPromaDataLoading) void
setSelectedClientLicenseItems
(List<ItemLicenseViewModel> selectedClientLicenseItems) void
setSwapHardwareIdList
(List<String> swapHardwareIdList) void
setSwapHardwareIdValue
(String swapHardwareIdValue) void
setSystemLicenseKey
(String licenseKey) void
swapHardwareId
(String swapTargetId) When the user click on the button, swaps the hardware ID registered with the license with the current hardward ID.void
void
updateClientToLicense
(LicenseViewModel licenseViewModel) void
When the user click on the button to refresh the client licenses.void
updateLicense
(String licenseKey, boolean isClientLicense, boolean isUpdate) Called from various XHTML action buttons.void
When the user clicks on the refresh button next to the system license.void
uploadClientLicense
(org.primefaces.event.FileUploadEvent fileEvent) File listener for the file upload in the XHTML page when the user uploads a client license.void
uploadSystemLicense
(org.primefaces.event.FileUploadEvent evt) File listener for the file upload in the XTML page when the user uploads a system license.Methods inherited from class de.xima.fc.gui.bean.FCContextBean
getNavigationBean, getSessionBean, isSetupUser, redirectToDashboard, setNavigationBean, setSessionBean, switchMainView, switchMainView, switchSubView, switchSubView
Methods inherited from class de.xima.fc.gui.bean.ABackendJSFContext
ec, findEntityContext, isDetached, isHasDB
Methods inherited from class de.xima.fc.gui.common.utils.msg.AJSFContext
destroySessionBean, encodeURL, findBean, findBean, findBean, findBean, findBean, findBean, findBean, findCurrentView, findUserContext, getBeanName, getBeanName, getContext, getCurrentViewBean, getLocaleBean, getRequest, getResponse, getSession, getSession, getSessionAttribute, isMasterServerContext, loadLazy, redirect, redirect, redirect, redirect, redirectToDashboard, redirectToDashboard, redirectToDashboard, setLocaleBean, setSessionAttribute, uc
Methods inherited from class de.xima.fc.gui.common.utils.msg.MessageUtils
addErrorMsg, addErrorMsg, addErrorMsg, addErrorMsg, addErrorMsg, addErrorMsg, addErrorMsgFromString, addErrorMsgFromString, addErrorMsgToComponent, addErrorMsgToComponent, addErrorMsgToComponent, addErrorMsgToComponent, addErrorMsgToComponent, addErrorMsgToComponent, addInfoMsg, addInfoMsg, addInfoMsg, addInfoMsg, addInfoMsgFromString, addInfoMsgFromString, addInfoMsgToComponent, addInfoMsgToComponent, addInfoMsgToComponent, addInfoMsgToComponent, addMsg, addMsg, addMsg, addMsg, addMsgs, addMsgs, addMsgToComponent, addMsgToComponent, addWarnMsg, addWarnMsg, addWarnMsg, addWarnMsg, addWarnMsgFromString, addWarnMsgFromString, addWarnMsgToComponent, addWarnMsgToComponent, addWarnMsgToComponent, addWarnMsgToComponent, cleanErrorMsg, errorMsg, errorMsg, getErrorMessage, getNewErrorMsg, getNewErrorMsg, getNewErrorMsg, getNewInfoMsg, getNewInfoMsg, getNewMsg, getNewWarnMsg, getNewWarnMsg, msg
Methods inherited from class de.xima.fc.gui.common.utils.msg.I18nUtils
getFacesContext, getLocale, rbValue, rbValue, rbValue, rbValueOrDefault, rbValueOrDefault
-
Constructor Details
-
LicenseBean
public LicenseBean()
-
-
Method Details
-
getAllSystemItemLicenses
-
getClientLicenseKey
-
setClientLicenseKey
-
getClientLicenses
-
setClientLicenses
-
getClientLicenseVersionStateMap
-
getClientList
-
getCurrentHardwareId
-
getDemoModel
-
getSelectedClientLicenseItems
-
setSelectedClientLicenseItems
-
getSelectedLicense
-
getSwapHardwareIdList
-
setSwapHardwareIdList
-
getSwapHardwareIdValue
-
setSwapHardwareIdValue
-
getSystemLicense
-
getSystemLicenseKey
-
setSystemLicenseKey
-
getSystemLicenseSnapshot
-
getSystemLicenseVersionState
-
isAllowDemo
public boolean isAllowDemo() -
isAllowedDemoProma
public boolean isAllowedDemoProma() -
setAllowedDemoProma
public void setAllowedDemoProma(boolean allowedDemoProma) -
isPromaDataLoading
public boolean isPromaDataLoading() -
setPromaDataLoading
public void setPromaDataLoading(boolean isPromaDataLoading) -
createDemoLicense
public void createDemoLicense()When the user click on the button in the UI, creates a new demo license for the current user so that they can evaluate this application. -
deleteLicense
-
downloadLicense
public org.primefaces.model.StreamedContent downloadLicense(String licenseKey, ELicenseFileType licenseType) -
getAllClientItemLicenses
-
getAllItemLicenses
-
getClientLicenseModelByKey
-
getClientLicenseSnapshot
-
getLicenseModel
-
init
@PostConstruct public void init() -
initalUpdateLicenseStates
Performed once upon page load. Updates the state of all licenses in the background.- Returns:
- A stage that completes when the initial update is completed.
-
licenseError
public boolean licenseError(int statusCode) -
restDemoModel
public void restDemoModel(boolean clientLicense) -
selectLicense
-
swapHardwareId
When the user click on the button, swaps the hardware ID registered with the license with the current hardward ID.- Parameters:
swapTargetId
- New hardware ID to register with the license.
-
updateClientLicenses
public void updateClientLicenses() -
updateClientToLicense
-
updateClientUpdateStates
public void updateClientUpdateStates()When the user click on the button to refresh the client licenses. Fetches the current license status for each client license from PROMA. -
updateLicense
Called from various XHTML action buttons. Updates the license and all sub licenses.- Parameters:
licenseKey
- License key to update.isClientLicense
- Whether the license is a client license.isUpdate
- Whether an update should take place.
-
updateSystemVersionState
public void updateSystemVersionState()When the user clicks on the refresh button next to the system license. Contact PROMA and Update the license info. -
uploadClientLicense
public void uploadClientLicense(org.primefaces.event.FileUploadEvent fileEvent) File listener for the file upload in the XHTML page when the user uploads a client license.- Parameters:
fileEvent
- Event with the file data.
-
uploadSystemLicense
public void uploadSystemLicense(org.primefaces.event.FileUploadEvent evt) File listener for the file upload in the XTML page when the user uploads a system license.- Parameters:
evt
- Event with the file data.
-