Package com.sun.enterprise.cli.framework

Examples of com.sun.enterprise.cli.framework.CommandValidationException


  throws CommandValidationException
    {
        try {
            return Integer.parseInt(port);
        } catch(Exception e) {
            throw new CommandValidationException(e);
        }
    }
View Full Code Here


            adminPort = NetUtils.getFreePort();           
        } else {
            adminPort = convertPortStr(adminPortStr);
        }
        if (!NetUtils.isPortFree(adminPort)) {
            throw new CommandValidationException(_strMgr.getString("AdminPortInUse",
                adminPortStr));
        }
        CLILogger.getInstance().printDebugMessage("agentPort =" + adminPort);
        return adminPort;
    }
View Full Code Here

            //System.out.println("adminPassword=" + adminPassword + " masterPassword=" + masterPassword +
            //    " saveMasterPassword=" + saveMasterPassword);           
           
            if (adminHost == null || adminPort == null || adminUser == null || adminPassword == null) {
                throw new CommandValidationException(_strMgr.getString("InvalidDASConfiguration"));
            }
       
            // defaulted protocol and clientHostName until moved to cli if deemed appropriate ???
            // temporary fix to remove agent user & password, for now map them to das user & password???
            AgentConfig agentConfig = new AgentConfig(agentName, getAgentPath(), adminUser,
View Full Code Here

                propertyString = propertyString.substring(0, propertyString.length() - 1);
                propertyString = propertyString.concat(DELIMITER + st.nextToken());
            }
            final int index = propertyString.indexOf(Character.toString(EQUAL_SIGN));
            if (index == -1)
                throw new CommandValidationException(_strMgr.getString("InvalidPropertySyntax"));
            final String propertyName = propertyString.substring(0, index);
            final String propertyValue = propertyString.substring(index+1);
            propertyList.put(propertyName, propertyValue);
        }
        CLILogger.getInstance().printDebugMessage("agent properties = " + propertyList);
View Full Code Here

                zip = (String)operands.firstElement();
            }

            if (rootDir==null || target==null || zip==null) {

                throw new CommandValidationException(_strMgr.getString(
                    "InvalaidApplyRepositoryCommandConfiguration"));
            }

            // target name will be part of root dir
            if (rootDir.indexOf(target) > 0) {

                Unzipper z = new Unzipper(rootDir);
                z.writeZipFile(zip);

                // successful msg
                CLILogger.getInstance().printDetailMessage(
                    _strMgr.getString("ApplyRepositoryZipCommandSuccessful",
                    new Object[] {name, zip}));
            } else {
                throw new CommandValidationException(_strMgr.getString(
                    "InvalaidRootDir", new Object[] {rootDir, target}));
            }

        } catch (Exception e) {                       
            e.printStackTrace();
View Full Code Here

TOP

Related Classes of com.sun.enterprise.cli.framework.CommandValidationException

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.