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 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.void
deleteLicense(Long licenseFileId)
org.primefaces.model.StreamedContent
downloadLicense(String licenseKey, ELicenseFileType licenseType)
void
getAllClientItemLicenses(String licenseKey)
List<ItemLicenseViewModel>
getAllItemLicenses(LicenseModel license)
List<ItemLicenseViewModel>
getAllSystemItemLicenses()
String
getClientLicenseKey()
LicenseModel
getClientLicenseModelByKey(String licenseKey)
List<LicenseViewModel>
getClientLicenses()
LicenseDataSnapshot
getClientLicenseSnapshot(LicenseFile licenseFile)
Map<String,ELicenseVersionState>
getClientLicenseVersionStateMap()
List<Mandant>
getClientList()
String
getCurrentHardwareId()
String
getCurrentNodeName()
LicenseDemoData
getDemoModel()
LicenseModel
getLicenseModel(LicenseFile file)
List<ItemLicenseViewModel>
getSelectedClientLicenseItems()
LicenseFile
getSelectedLicense()
List<String>
getSwapHardwareIdList()
String
getSwapHardwareIdValue()
LicenseModel
getSystemLicense()
String
getSystemLicenseKey()
LicenseDataSnapshot
getSystemLicenseSnapshot()
ELicenseVersionState
getSystemLicenseVersionState()
long
getSystemNodeCount()
List<String>
getSystemNodeNames()
void
init()
Void
initalUpdateLicenseStates()
Performed once upon page load.boolean
isAllowDemo()
boolean
isAllowedDemoProma()
boolean
isPromaDataLoading()
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
updateClientLicenses()
void
updateClientToLicense(LicenseViewModel licenseViewModel)
void
updateClientUpdateStates()
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
updateSystemVersionState()
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
-
-
-
-
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()
-
-