Package de.xima.fc.gui.bean.settings
Class LicenseBean
-
- All Implemented Interfaces:
Serializable
@Named @ViewScoped public class LicenseBean extends FCContextBean
- Author:
- XIMA MEDIA GmbH, Dresden
- See Also:
- Serialized Form
-
-
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 Constructor Description LicenseBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateDemoLicense()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.voiddeleteLicense(Long licenseFileId)org.primefaces.model.StreamedContentdownloadLicense(String licenseKey, ELicenseFileType licenseType)voidgetAllClientItemLicenses(String licenseKey)List<ItemLicenseViewModel>getAllItemLicenses(LicenseModel license)List<ItemLicenseViewModel>getAllSystemItemLicenses()StringgetClientLicenseKey()LicenseModelgetClientLicenseModelByKey(String licenseKey)List<LicenseViewModel>getClientLicenses()LicenseDataSnapshotgetClientLicenseSnapshot(LicenseFile licenseFile)Map<String,ELicenseVersionState>getClientLicenseVersionStateMap()List<Mandant>getClientList()StringgetCurrentHardwareId()StringgetCurrentNodeName()LicenseDemoDatagetDemoModel()LicenseModelgetLicenseModel(LicenseFile file)List<ItemLicenseViewModel>getSelectedClientLicenseItems()LicenseFilegetSelectedLicense()List<String>getSwapHardwareIdList()StringgetSwapHardwareIdValue()LicenseModelgetSystemLicense()StringgetSystemLicenseKey()LicenseDataSnapshotgetSystemLicenseSnapshot()ELicenseVersionStategetSystemLicenseVersionState()longgetSystemNodeCount()List<String>getSystemNodeNames()voidinit()VoidinitalUpdateLicenseStates()Performed once upon page load.booleanisAllowDemo()booleanisAllowedDemoProma()booleanisPromaDataLoading()booleanlicenseError(int statusCode)voidrestDemoModel(boolean clientLicense)voidselectLicense(Long licenseFileId)voidsetAllowedDemoProma(boolean allowedDemoProma)voidsetClientLicenseKey(String licenseKey)voidsetClientLicenses(List<LicenseViewModel> clientLicenses)voidsetPromaDataLoading(boolean isPromaDataLoading)voidsetSelectedClientLicenseItems(List<ItemLicenseViewModel> selectedClientLicenseItems)voidsetSwapHardwareIdList(List<String> swapHardwareIdList)voidsetSwapHardwareIdValue(String swapHardwareIdValue)voidsetSystemLicenseKey(String licenseKey)voidswapHardwareId(String swapTargetId)When the user click on the button, swaps the hardware ID registered with the license with the current hardward ID.voidupdateClientLicenses()voidupdateClientToLicense(LicenseViewModel licenseViewModel)voidupdateClientUpdateStates()When the user click on the button to refresh the client licenses.voidupdateLicense(String licenseKey, boolean isClientLicense, boolean isUpdate)Called from various XHTML action buttons.voidupdateSystemVersionState()When the user clicks on the refresh button next to the system license.voiduploadClientLicense(org.primefaces.event.FileUploadEvent fileEvent)File listener for the file upload in the XHTML page when the user uploads a client license.voiduploadSystemLicense(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
-
-
-
-
Method Detail
-
getAllSystemItemLicenses
public List<ItemLicenseViewModel> getAllSystemItemLicenses()
-
getClientLicenseKey
public String getClientLicenseKey()
-
setClientLicenseKey
public void setClientLicenseKey(String licenseKey)
-
getClientLicenses
public List<LicenseViewModel> getClientLicenses()
-
setClientLicenses
public void setClientLicenses(List<LicenseViewModel> clientLicenses)
-
getClientLicenseVersionStateMap
public Map<String,ELicenseVersionState> getClientLicenseVersionStateMap()
-
getCurrentHardwareId
public String getCurrentHardwareId()
-
getDemoModel
public LicenseDemoData getDemoModel()
-
getSelectedClientLicenseItems
public List<ItemLicenseViewModel> getSelectedClientLicenseItems()
-
setSelectedClientLicenseItems
public void setSelectedClientLicenseItems(List<ItemLicenseViewModel> selectedClientLicenseItems)
-
getSelectedLicense
public LicenseFile getSelectedLicense()
-
getSwapHardwareIdValue
public String getSwapHardwareIdValue()
-
setSwapHardwareIdValue
public void setSwapHardwareIdValue(String swapHardwareIdValue)
-
getSystemLicense
public LicenseModel getSystemLicense()
-
getSystemLicenseKey
public String getSystemLicenseKey()
-
setSystemLicenseKey
public void setSystemLicenseKey(String licenseKey)
-
getSystemLicenseSnapshot
public LicenseDataSnapshot getSystemLicenseSnapshot()
-
getSystemLicenseVersionState
public ELicenseVersionState 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
public void deleteLicense(Long licenseFileId)
-
downloadLicense
public org.primefaces.model.StreamedContent downloadLicense(String licenseKey, ELicenseFileType licenseType)
-
getAllClientItemLicenses
public void getAllClientItemLicenses(String licenseKey)
-
getAllItemLicenses
public List<ItemLicenseViewModel> getAllItemLicenses(LicenseModel license)
-
getClientLicenseModelByKey
public LicenseModel getClientLicenseModelByKey(String licenseKey)
-
getClientLicenseSnapshot
public LicenseDataSnapshot getClientLicenseSnapshot(LicenseFile licenseFile)
-
getLicenseModel
public LicenseModel getLicenseModel(LicenseFile file)
-
init
@PostConstruct public void init()
-
initalUpdateLicenseStates
public Void 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
public void selectLicense(Long licenseFileId)
-
swapHardwareId
public void swapHardwareId(String swapTargetId)
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
public void updateClientToLicense(LicenseViewModel licenseViewModel)
-
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
public void updateLicense(String licenseKey, boolean isClientLicense, boolean isUpdate)
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.
-
getSystemNodeCount
public long getSystemNodeCount()
-
getCurrentNodeName
public String getCurrentNodeName()
-
-