FileDocCategorySizeDatePackage
ARG_targetnsspwdfile.javaAPI DocGlassfish v2 API3517Fri May 04 22:35:06 BST 2007com.sun.enterprise.tools.upgrade.common.arguments

ARG_targetnsspwdfile

public class ARG_targetnsspwdfile extends CertificateArgumentHandler
author
Hans Hrasna

Fields Summary
private String
nssPwdFile
Constructors Summary
public ARG_targetnsspwdfile(ParsedArgument pa)
Creates a new instance of ARG_targetnsspwdfile

        super(pa);
        if(parameters.isEmpty()){
            helpUsage(sm.getString("enterprise.tools.upgrade.cli.argument_missing" + " --targetnsspwdfile/-n"));
            System.exit(1);
        }
        nssPwdFile = (String)parameters.firstElement();
        processCertificatePasswords(nssPwdFile);
    
Methods Summary
protected voidsetCertificatePassword(java.lang.String password)

        if(password == null) {
            _logger.severe(sm.getString("enterprise.tools.upgrade.cli.password_error",nssPwdFile));
            System.exit(1);
        }
        commonInfo.setTargetCertDbPassword(password);
        commonInfo.setTargetNSSPwdFile(nssPwdFile);
        if(!interactiveMap.containsKey("target"))
            return;
        boolean validpwd = PasswordVerifier.verifyTargetNSSPassword(commonInfo,commonInfo.getTargetConfig());
        if(!validpwd) {
            commonInfo.recover();
            _logger.severe(sm.getString("enterprise.tools.upgrade.cli.Invalid_target_nss_password"));
            System.exit(1);
        }
        interactiveMap.put(ArgsParser.TARGETNSSPWD + "-" + commonInfo.getCurrentDomain(), password);