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

ARG_masterpassword

public class ARG_masterpassword extends ArgumentHandler
author
Hans Hrasna

Fields Summary
Constructors Summary
public ARG_masterpassword(ParsedArgument pa)
Creates a new instance of ARG_masterpassword

        super(pa);
        if(parameters.isEmpty()){
            helpUsage(sm.getString("enterprise.tools.upgrade.cli.argument_missing","--masterpassword/-m"));
            System.exit(1);
        }
        String masterpassword = (String)parameters.firstElement();
        commonInfo.setMasterPassword(masterpassword);
        if(!interactiveMap.containsKey("target"))
            return;
        if(!UpgradeConstants.EDITION_PE.equals(commonInfo.getSourceEdition())) {
            if(!utils.validateUserDetails(commonInfo.getAdminUserName(),commonInfo.getAdminPassword(),masterpassword)) {
                _logger.severe(sm.getString("enterprise.tools.upgrade.cli.wrong_adminuser_or_adminpassword_or_masterpassword"));
                System.exit(1);
            }
        }
        
    
Methods Summary