Package org.glassfish.api

Examples of org.glassfish.api.ActionReport.failure()


            }

            archive = archiveFactory.openArchive(path, this);
            ArchiveHandler archiveHandler = deployment.getArchiveHandler(archive, type);
            if (archiveHandler==null) {
                report.failure(logger,localStrings.getLocalString("deploy.unknownarchivetype","Archive type of {0} was not recognized",path.getName()));
                return;
            }

            // clean up any left over repository files
            if ( ! keepreposdir.booleanValue()) {
View Full Code Here


        final Logger logger = context.getLogger();

        try {
            VersioningUtils.checkIdentifier(appname);
        } catch (VersioningSyntaxException ex) {
            report.failure(logger,ex.getMessage());
            return;
        }

        Application matchingApp = null;
        for (Application app : apps.getApplications()) {
View Full Code Here

                matchingApp = app;
                break;
            }
        }
        if (matchingApp == null) {
            report.failure(logger, localStrings.getLocalString(
                getClass(),
                "get-client-stubs.noSuchApp",
                "Application {0} was not found",
                new Object[] {appname}));
            return;
View Full Code Here

        }
        try {
            DeployCommand.retrieveArtifacts(context, matchingApp, localDir);
        } catch (Exception e) {
            report.setFailureCause(e);
            report.failure(logger, localStrings.getLocalString(
                    getClass(),
                    "get-client-stubs.errorPrepDownloadedFiles",
                    "Error preparing for download"), e);
            return;
        }
View Full Code Here

        final CopyConfig command = (CopyConfig) runner
                .getCommand("copy-config", context.getActionReport(), context.getLogger());
        if (command == null ) {
            String msg = localStrings.getLocalString("cannot.execute.command",
                    "Cluster software is not installed");
            result.failure(logger,msg) ;
            return;
        }
       
        if (tgt==null) {
           
View Full Code Here

                    "Cannot find a {0} with a name {1}", targetType.getSimpleName(), name);
            logger.severe(localStrings.getLocalString(GenericCrudCommand.class,
                    "GenericDeleteCommand.target_object_not_found",
                    "The CrudResolver {0} could not find the configuration object of type {1} where instances of {2} should be removed",
                    resolver.getClass().toString(), parentType, targetType));
            result.failure(logger, msg);
            return;
        }
       
        try {
            ConfigBeanProxy parentProxy = child.parent().createProxy();
View Full Code Here

                    if (decorator==null) {
                        String msg = localStrings.getLocalString(GenericCrudCommand.class,
                                "GenericCreateCommand.deletion_decorator_not_found",
                                "The DeletionDecorator {0} could not be found in the habitat,is it annotated with @Service ?",
                                delete.decorator().toString());
                        result.failure(logger, msg);
                        throw new TransactionFailure(msg);
                    } else {
                        // inject the decorator with any parameters from the initial CLI invocation
                        manager.inject(decorator, paramResolver);
View Full Code Here

        } catch(TransactionFailure e) {
            String msg = localStrings.getLocalString(GenericCrudCommand.class,
                    "GenericDeleteCommand.transaction_exception",
                    "Exception while deleting the configuration {0} :{1}",
                    child.getImplementation(), e.getMessage());
            result.failure(logger, msg);
        }

    }
   
    @Override
View Full Code Here

        if (parentBean==null) {
            String msg = localStrings.getLocalString(GenericCrudCommand.class,
                    "GenericCreateCommand.target_object_not_found",
                    "The CrudResolver {0} could not find the configuration object of type {1} where instances of {2} should be added",
                    resolver.getClass().toString(), parentType, targetType);
            result.failure(logger, msg);
            return;
        }
       
        try {
            ConfigSupport.apply(new SingleConfigCode<ConfigBeanProxy> () {
View Full Code Here

                        if (cbp!=null) {
                            String msg = localStrings.getLocalString(GenericCrudCommand.class,
                                    "GenericCreateCommand.already_existing_instance",
                                    "A {0} instance with a \"{1}\" name already exist in the configuration",
                                    targetType.getSimpleName(), name);
                            result.failure(logger, msg);
                            throw new TransactionFailure(msg);
                        }
                    }

                    try {
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.