All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.java.truelicense.jsf.UninstallBean Maven / Gradle / Ivy

Go to download

Provides an internationalized, Facelet based wizard component for license management in consumer applications.

There is a newer version: 2.6.6
Show newest version
/*
 * 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