Examples of PEDomainsManager


Examples of com.sun.enterprise.admin.servermgmt.pe.PEDomainsManager

    protected int executeCommand()
            throws CommandException, CommandValidationException {

        // domain validation upfront (i.e. before we prompt)
        try {
            DomainsManager manager = new PEDomainsManager();
            DomainConfig config =
                    new DomainConfig(domainName, domainDir);
            manager.validateDomain(config, false);
            verifyPortBase();
        }
        catch (DomainException e) {
            logger.fine(e.getLocalizedMessage());
            throw new CommandException(
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.pe.PEDomainsManager

        /*
         * We must init the secure admin settings after the key tool options
         * have been set, in case those options override the default CN.
         */
        initSecureAdminSettings(domainConfig);
        DomainsManager manager = new PEDomainsManager();

        manager.createDomain(domainConfig);
        try {
            modifyInitialDomainXml(domainConfig);
        }
        catch (Exception e) {
            logger.warning(
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.pe.PEDomainsManager

        try {           
            DomainConfig domainConfig =
                new DomainConfig(getDomainName(), getDomainsDir().getPath());
            checkRunning();
            checkRename();
            DomainsManager manager = new PEDomainsManager();
            manager.deleteDomain(domainConfig);
            // By default, do as what v2 does -- don't delete the entry -
            // might need a revisit (Kedar: 09/16/2009)
            //deleteLoginInfo();
        } catch (Exception e) {
      throw new CommandException(e.getLocalizedMessage());
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.pe.PEDomainsManager

            if (isRunning(adminAddress.getHost(), adminAddress.getPort()))
                throw new CommandException(strings.get("domain.is.running",
                                                    getDomainName(), getDomainRootDir()));
            DomainConfig domainConfig = new DomainConfig(getDomainName(),
                getDomainsDir().getAbsolutePath());
            PEDomainsManager manager = new PEDomainsManager();
            String mp = super.readFromMasterPasswordFile();
            if (mp == null) {
                mp = passwords.get("AS_ADMIN_MASTERPASSWORD");
                if (mp == null) {
                    mp = super.readPassword(strings.get("current.mp"));
                }
            }
            if (mp == null)     throw new CommandException(strings.get("no.console"));
            if (!super.verifyMasterPassword(mp))
                throw new CommandException(strings.get("incorrect.mp"));
            ParamModelData nmpo = new ParamModelData("AS_ADMIN_NEWMASTERPASSWORD",
                String.class, false, null);
            nmpo.description = strings.get("new.mp");
            nmpo.param._password = true;
            String nmp = super.getPassword(nmpo, null, true);
            if (nmp == null)
                throw new CommandException(strings.get("no.console"));
            domainConfig.put(DomainConfig.K_MASTER_PASSWORD, mp);
            domainConfig.put(DomainConfig.K_NEW_MASTER_PASSWORD, nmp);
            domainConfig.put(DomainConfig.K_SAVE_MASTER_PASSWORD, savemp);
            manager.changeMasterPassword(domainConfig);

            return 0;
        } catch(Exception e) {
            throw new CommandException(e.getMessage(),e);
        }
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.pe.PEDomainsManager

        try {
            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);
            programOpts.setInteractive(false)// no prompting for passwords
            if (domainsList.length > 0) {
                for (String dn : domainsList) {
                    String status = getStatus(dn);
                    logger.info(status);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.