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

ARG_target

public class ARG_target extends ArgumentHandler
author
Hans Hrasna

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

        super(pa);
        if(parameters.isEmpty()){
            helpUsage(sm.getString("enterprise.tools.upgrade.cli.argument_missing","--target/-t"));
            System.exit(1);
        }
        String targetDir = (String)parameters.firstElement();
        if(!utils.isValidTargetPath(targetDir)){
            helpUsage();
            _logger.severe(sm.getString("enterprise.tools.upgrade.cli.not_valid_target_install"));
            System.exit(1);
        }
        //For backward compatibility if the target is the same as the install directory
        //we use the setting of AS_DEF_DOMAINS_PATH as before for the domains root
        if(!new File(targetDir).equals(new File(commonInfo.getTargetInstallDir()))) {
            commonInfo.setTargetDomainRoot(targetDir);
        }
        commonInfo.enlistDomainsFromSource();
    
Methods Summary