Search in sources :

Example 6 with PEDomainsManager

use of com.sun.enterprise.admin.servermgmt.pe.PEDomainsManager in project Payara by payara.

the class StopAllDomainsCommand method getDomains.

// Copied from ListDomainCommand.java
private String[] getDomains() throws DomainException, IOException {
    File domainsDirFile = ok(domainDirParam) ? new File(domainDirParam) : DomainDirs.getDefaultDomainsDir();
    DomainConfig domainConfig = new DomainConfig(null, domainsDirFile.getAbsolutePath());
    DomainsManager manager = new PEDomainsManager();
    String[] domainsList = manager.listDomains(domainConfig);
    if (domainsList.length == 0) {
        logger.fine(strings.get("NoDomainsToList"));
    }
    return domainsList;
}
Also used : PEDomainsManager(com.sun.enterprise.admin.servermgmt.pe.PEDomainsManager) DomainsManager(com.sun.enterprise.admin.servermgmt.DomainsManager) File(java.io.File) PEDomainsManager(com.sun.enterprise.admin.servermgmt.pe.PEDomainsManager) DomainConfig(com.sun.enterprise.admin.servermgmt.DomainConfig)

Aggregations

PEDomainsManager (com.sun.enterprise.admin.servermgmt.pe.PEDomainsManager)6 DomainConfig (com.sun.enterprise.admin.servermgmt.DomainConfig)5 DomainsManager (com.sun.enterprise.admin.servermgmt.DomainsManager)4 File (java.io.File)3 IOException (java.io.IOException)2 CommandException (org.glassfish.api.admin.CommandException)2 DomainException (com.sun.enterprise.admin.servermgmt.DomainException)1 ColumnFormatter (com.sun.enterprise.util.ColumnFormatter)1 HostAndPort (com.sun.enterprise.util.HostAndPort)1 HashMap (java.util.HashMap)1 CommandValidationException (org.glassfish.api.admin.CommandValidationException)1