Package com.sun.enterprise.util.io

Examples of com.sun.enterprise.util.io.DomainDirs


            File domainsDirFile = null;

            if (ok(domainDirParam))
                domainsDirFile = new File(domainDirParam);

            dd = new DomainDirs(domainsDirFile, getDomainName());
            setServerDirs(dd.getServerDirs());
        } catch (Exception e) {
            throw new CommandException(e.getMessage(), e);
        }
        setLocalPassword();
View Full Code Here


    private void validateDomainOrInstance() throws CommandException, IOException {

       
        // case 1: since ddp is specified - it MUST be a domain
        if (userSpecifiedDomainDirParent != null) {
            domainDirs = new DomainDirs(userSpecifiedDomainDirParent, userSpecifiedServerName);
        }
        //case 2: if either of these are set then it MUST be an instance
        else if (userSpecifiedNode != null || userSpecifiedNodeDir != null) {
            instanceDirs = new InstanceDirs(userSpecifiedNodeDir, userSpecifiedNode, userSpecifiedServerName);
        }
        // case 3: nothing is specified -- use default domain as in v3.0
        else if (userSpecifiedServerName == null) {
            domainDirs = new DomainDirs(userSpecifiedDomainDirParent, userSpecifiedServerName);
        }
        // case 4: userSpecifiedServerName is set and the other 3 are all null
        // we need to figure out if it's a DAS or an instance
        else {
            try {
                domainDirs = new DomainDirs(userSpecifiedDomainDirParent, userSpecifiedServerName);
                return;
            }
            catch (IOException e) {
                // handled below
            }
View Full Code Here

            //return if no domains exist
            if (files == null || files.length == 0)
                return false;

            for (File file : files) {
                DomainDirs dir = new DomainDirs(file);
                File domainXMLFile = dir.getServerDirs().getDomainXml();
                logger.finer("Domain XML file = " + domainXMLFile);
                // this block of code (static domain.xml parsing) is copied from verify-domain-xml
                try {
                    // get the list of JAR files from the modules directory
                    ArrayList<URL> urls = new ArrayList<URL>();
View Full Code Here

            //return if no domains exist
            if (files == null || files.length == 0)
                return false;

            for (File file : files) {
                DomainDirs dir = new DomainDirs(file);
                File domainXMLFile = dir.getServerDirs().getDomainXml();
                logger.finer("Domain XML file = " + domainXMLFile);
                try {
                    Habitat habitat = Globals.getStaticHabitat();
                    ConfigParser parser = new ConfigParser(habitat);
                    URL domainURL = domainXMLFile.toURI().toURL();
View Full Code Here

    private void validateDomainOrInstance() throws CommandException, IOException {

       
        // case 1: since ddp is specified - it MUST be a domain
        if (userSpecifiedDomainDirParent != null) {
            domainDirs = new DomainDirs(userSpecifiedDomainDirParent, userSpecifiedServerName);
        }
        //case 2: if either of these are set then it MUST be an instance
        else if (userSpecifiedNode != null || userSpecifiedNodeDir != null) {
            instanceDirs = new InstanceDirs(userSpecifiedNodeDir, userSpecifiedNode, userSpecifiedServerName);
        }
        // case 3: nothing is specified -- use default domain as in v3.0
        else if (userSpecifiedServerName == null) {
            domainDirs = new DomainDirs(userSpecifiedDomainDirParent, userSpecifiedServerName);
        }
        // case 4: userSpecifiedServerName is set and the other 3 are all null
        // we need to figure out if it's a DAS or an instance
        else {
            try {
                domainDirs = new DomainDirs(userSpecifiedDomainDirParent, userSpecifiedServerName);
                return;
            }
            catch (IOException e) {
                // handled below
            }
View Full Code Here

            //return if no domains exist
            if (files == null || files.length == 0)
                return false;

            for (File file : files) {
                DomainDirs dir = new DomainDirs(file);
                File domainXMLFile = dir.getServerDirs().getDomainXml();
                logger.finer("Domain XML file = " + domainXMLFile);
                try {
                    Habitat habitat = Globals.getStaticHabitat();
                    ConfigParser parser = new ConfigParser(habitat);
                    URL domainURL = domainXMLFile.toURI().toURL();
View Full Code Here

        return 0;
      
    }

    private boolean isDomain() throws IOException {
        DomainDirs domainDirs = null;
        //if both domainDir and domainNameOrNodeName are null get default domaindir
        if (domainDirParam == null && domainNameOrNodeName == null ) {
            domainDirs = new DomainDirs(DomainDirs.getDefaultDomainsDir());
        } else  {
            if (domainDirParam != null) {
                domainDirs = new DomainDirs(new File(domainDirParam),domainNameOrNodeName);
                return domainDirs.isValid();
            }
            if (domainNameOrNodeName != null) {
                return new File(DomainDirs.getDefaultDomainsDir(),domainNameOrNodeName).isDirectory();
            }
        }
        //It can be null in the case when this is not a domain but a node
        if (domainDirs != null) {
            return domainDirs.getDomainsDir().isDirectory();
        }
        return false;

    }
View Full Code Here

            File domainsDirFile = null;

            if (ok(domainDirParam))
                domainsDirFile = new File(domainDirParam);

            dd = new DomainDirs(domainsDirFile, getDomainName());
            setServerDirs(dd.getServerDirs());
        } catch (Exception e) {
            throw new CommandException(e.getMessage(), e);
        }
        setLocalPassword();
View Full Code Here

        return 0;
      
    }

    private boolean isDomain() throws IOException {
        DomainDirs domainDirs = null;
        //if both domainDir and domainNameOrNodeName are null get default domaindir
        if (domainDirParam == null && domainNameOrNodeName == null ) {
            domainDirs = new DomainDirs(DomainDirs.getDefaultDomainsDir());
        } else  {
            if (domainDirParam != null) {
                domainDirs = new DomainDirs(new File(domainDirParam),domainNameOrNodeName);
                return domainDirs.isValid();
            }
            if (domainNameOrNodeName != null) {
                return new File(DomainDirs.getDefaultDomainsDir(),domainNameOrNodeName).isDirectory();
            }
        }
        //It can be null in the case when this is not a domain but a node
        if (domainDirs != null) {
            return domainDirs.getDomainsDir().isDirectory();
        }
        return false;

    }
View Full Code Here

            //return if no domains exist
            if (files == null || files.length == 0)
                return false;

            for (File file : files) {
                DomainDirs dir = new DomainDirs(file);
                File domainXMLFile = dir.getServerDirs().getDomainXml();
                logger.finer("Domain XML file = " + domainXMLFile);
                try {
                    Habitat habitat = Globals.getStaticHabitat();
                    ConfigParser parser = new ConfigParser(habitat);
                    URL domainURL = domainXMLFile.toURI().toURL();
View Full Code Here

TOP

Related Classes of com.sun.enterprise.util.io.DomainDirs

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.