net.java.truelicense.jsf.UninstallBean Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truelicense-jsf Show documentation
Show all versions of truelicense-jsf Show documentation
Provides an internationalized, Facelet based wizard component
for license management in consumer applications.
/*
* Copyright (C) 2005-2015 Schlichtherle IT Services.
* All rights reserved. Use is subject to license terms.
*/
package net.java.truelicense.jsf;
import javax.faces.component.FacesComponent;
import net.java.truelicense.core.LicenseManagementException;
import static net.java.truelicense.ui.LicenseWizardMessage.*;
import net.java.truelicense.ui.LicenseWizardState;
/**
* The backing bean for uninstalling the installed license key.
*
* @since TrueLicense 2.3
* @author Christian Schlichtherle
*/
@FacesComponent("")
public final class UninstallBean extends LicenseBean {
public String getTitle() { return message(uninstall_title); }
public String getPrompt() { return message(uninstall_prompt); }
public String getSuccess() { return message(uninstall_success); }
public String getFailure() { return message(uninstall_failure); }
public String getUninstallValue() { return message(uninstall_uninstall); }
public boolean isUninstallDisabled() { return !licenseInstalled(); }
public String uninstallAction() {
try {
manager().uninstall();
outputInfo(getSuccess());
} catch (LicenseManagementException ex) {
outputError(getFailure(), ex);
}
return null;
}
@Override public LicenseWizardState nextState() {
return LicenseWizardState.uninstall;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy