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

com.alachisoft.ncache.deactivate.cmdline.DeactivateArgs Maven / Gradle / Ivy

There is a newer version: 5.3.3
Show newest version
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.alachisoft.ncache.deactivate.cmdline;

import com.alachisoft.ncache.common.commandline.ArgumentAttributeAnnotation;
import com.alachisoft.ncache.common.commandline.CommandLineArgs;

/**
 * @author Muneeb_Shahid
 */
public class DeactivateArgs extends CommandLineArgs {

    private String deactivateKey;
    private String deactCode;
    private boolean manual = false;

    @ArgumentAttributeAnnotation(defaultValue = "", shortNotation = "-k", fullNotation = "--key", appendText = "")
    public String getDeactivateKey() {
        return deactivateKey;
    }

    @ArgumentAttributeAnnotation(defaultValue = "", shortNotation = "-k", fullNotation = "--key", appendText = "")
    public void setDeactivateKey(String deactivatKey) {
        this.deactivateKey = deactivatKey;
    }

    @ArgumentAttributeAnnotation(defaultValue = "false", shortNotation = "-m", fullNotation = "--manual", appendText = "")
    public Boolean getManual() {
        return manual;
    }

    @ArgumentAttributeAnnotation(defaultValue = "false", shortNotation = "-m", fullNotation = "--manual", appendText = "")
    public void setManual(Boolean manual) {
        this.manual = manual;
    }

    @Override
    public void printUsage() {
        StringBuilder usageBuilder = new StringBuilder();
        usageBuilder.append("Usage: -d deauthentication-code -k deactivationkey [option[...]].").append("\n");
        usageBuilder.append("Argument:").append("\n").append("\n");
        usageBuilder.append("  ").append("-k --key [key]").append("\n");
        usageBuilder.append(" \t").append("Specify the deactivation key you recieved from Alachisoft").append("\n").append("\n");
        usageBuilder.append("  ").append("-m --manual [manual]").append("\n");
        usageBuilder.append(" \t").append("Enable manual mode.").append("\n").append("\n");
        System.out.print(usageBuilder.toString());
        super.printUsage();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy