Package com.sun.enterprise.admin.servermgmt.services

Examples of com.sun.enterprise.admin.servermgmt.services.Service


    }

    @Override
    protected int executeCommand() throws CommandException {
        try {
            final Service service = ServiceFactory.getService(dirs, getType());
            PlatformServicesInfo info = service.getInfo();
            info.setTrace(logger.isLoggable(Level.FINER));
            info.setDryRun(dry_run);
            info.setForce(force);
            info.setAppServerUser(getProgramOptions().getUser());
            if (ok(serviceName))
                info.setServiceName(serviceName);

            if (ok(serviceUser))
                info.setServiceUser(serviceUser);

            if (programOpts.getPasswordFile() != null)
                info.setPasswordFile(SmartFile.sanitize(
                        new File(programOpts.getPasswordFile())));

            service.setServiceProperties(serviceProperties);
            service.createService();

            // Why the messiness?  We don't want to talk about the help
            // file inside the help file thus the complications below...
            String help = service.getSuccessMessage();
            String tellUserAboutHelp = strings.get("create.service.runtimeHelp", help,
                    new File(dirs.getServerDir(), "PlatformServices.log"));
            logger.info(tellUserAboutHelp);
            service.writeReadmeFile(help);

        }
        catch (Exception e) {
            // We only want to wrap the string -- not the Exception.
            // Otherwise the message that is printed out to the user will be like this:
View Full Code Here


    }

    @Override
    protected int executeCommand() throws CommandException {
        try {
            final Service service = ServiceFactory.getService(dirs, getType());
            PlatformServicesInfo info = service.getInfo();
            info.setTrace(logger.isLoggable(Level.FINER));
            info.setDryRun(dry_run);
            info.setForce(force);

            if (ok(serviceName))
                info.setServiceName(serviceName);

            if (ok(serviceUser))
                info.setServiceUser(serviceUser);

            if (programOpts.getPasswordFile() != null)
                info.setPasswordFile(SmartFile.sanitize(
                        new File(programOpts.getPasswordFile())));

            service.setServiceProperties(serviceProperties);
            service.createService();

            // Why the messiness?  We don't want to talk about the help
            // file inside the help file thus the complications below...
            String help = service.getSuccessMessage();
            String tellUserAboutHelp = strings.get("create.service.runtimeHelp", help,
                    new File(dirs.getServerDir(), "PlatformServices.log"));
            logger.info(tellUserAboutHelp);
            service.writeReadmeFile(help);

        }
        catch (Exception e) {
            // We only want to wrap the string -- not the Exception.
            // Otherwise the message that is printed out to the user will be like this:
View Full Code Here

    }

    @Override
    protected int executeCommand() throws CommandException {
        try {
            final Service service = ServiceFactory.getService(dirs, getType());
            PlatformServicesInfo info = service.getInfo();
            info.setTrace(logger.isLoggable(Level.FINER));
            info.setDryRun(dry_run);
            info.setForce(force);
            info.setAppServerUser(getProgramOptions().getUser());
            if (ok(serviceName))
                info.setServiceName(serviceName);

            if (ok(serviceUser))
                info.setServiceUser(serviceUser);

            if (programOpts.getPasswordFile() != null)
                info.setPasswordFile(SmartFile.sanitize(
                        new File(programOpts.getPasswordFile())));

            service.setServiceProperties(serviceProperties);
            service.createService();

            // Why the messiness?  We don't want to talk about the help
            // file inside the help file thus the complications below...
            String help = service.getSuccessMessage();
            String tellUserAboutHelp = strings.get("create.service.runtimeHelp", help,
                    new File(dirs.getServerDir(), "PlatformServices.log"));
            logger.info(tellUserAboutHelp);
            service.writeReadmeFile(help);

        }
        catch (Exception e) {
            // We only want to wrap the string -- not the Exception.
            // Otherwise the message that is printed out to the user will be like this:
View Full Code Here

    }

    @Override
    protected int executeCommand() throws CommandException {
        try {
            final Service service = ServiceFactory.getService(dirs, getType());
            PlatformServicesInfo info = service.getInfo();
            info.setTrace(logger.isLoggable(Level.FINER));

            if (ok(serviceName))
                info.setServiceName(serviceName);

            if (programOpts.getPasswordFile() != null)
                info.setPasswordFile(SmartFile.sanitize(
                        new File(programOpts.getPasswordFile())));

            service.deleteService();
        }
        catch (Exception e) {
            // We only want to wrap the string -- not the Exception.
            // Otherwise the message that is printed out to the user will be like this:
            // java.lang.IllegalArgumentException: The passwordfile blah blah blah
View Full Code Here

    }

    @Override
    protected int executeCommand() throws CommandException {
        try {
            final Service service = ServiceFactory.getService(dirs, getType());
            PlatformServicesInfo info = service.getInfo();
            info.setTrace(logger.isLoggable(Level.FINER));

            if (ok(serviceName))
                info.setServiceName(serviceName);

            if (programOpts.getPasswordFile() != null)
                info.setPasswordFile(SmartFile.sanitize(
                        new File(programOpts.getPasswordFile())));

            service.deleteService();
        }
        catch (Exception e) {
            // We only want to wrap the string -- not the Exception.
            // Otherwise the message that is printed out to the user will be like this:
            // java.lang.IllegalArgumentException: The passwordfile blah blah blah
View Full Code Here

    }

    @Override
    protected int executeCommand() throws CommandException {
        try {
            final Service service = ServiceFactory.getService(dirs, getType());
            PlatformServicesInfo info = service.getInfo();
            info.setTrace(logger.isLoggable(Level.FINER));
            info.setDryRun(dry_run);
            info.setForce(force);

            if (ok(serviceName))
                info.setServiceName(serviceName);

            if (ok(serviceUser))
                info.setServiceUser(serviceUser);

            if (programOpts.getPasswordFile() != null)
                info.setPasswordFile(SmartFile.sanitize(
                        new File(programOpts.getPasswordFile())));

            service.setServiceProperties(serviceProperties);
            service.createService();

            // Why the messiness?  We don't want to talk about the help
            // file inside the help file thus the complications below...
            String help = service.getSuccessMessage();
            String tellUserAboutHelp = strings.get("create.service.runtimeHelp", help,
                    new File(dirs.getServerDir(), "PlatformServices.log"));
            logger.info(tellUserAboutHelp);
            service.writeReadmeFile(help);

        }
        catch (Exception e) {
            // We only want to wrap the string -- not the Exception.
            // Otherwise the message that is printed out to the user will be like this:
View Full Code Here

TOP

Related Classes of com.sun.enterprise.admin.servermgmt.services.Service

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.