Examples of DeploymentAction


Examples of org.jboss.as.controller.client.helpers.domain.DeploymentAction

    private final DeploymentAction undeployModification;

    UndeployDeploymentPlanBuilderImpl(DeploymentPlanBuilderImpl existing, DeploymentSetPlanImpl setPlan) {
        super(existing, setPlan);
        DeploymentAction modification = setPlan.getLastAction();
        if (modification.getType() != DeploymentAction.Type.UNDEPLOY) {
            throw new IllegalStateException("Invalid action type " + modification.getType());
        }
        this.undeployModification = modification;
    }
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.domain.DeploymentAction

    private final DeploymentAction undeployModification;

    UndeployDeploymentPlanBuilderImpl(DeploymentPlanBuilderImpl existing, DeploymentSetPlanImpl setPlan) {
        super(existing, setPlan);
        DeploymentAction modification = setPlan.getLastAction();
        if (modification.getType() != DeploymentAction.Type.UNDEPLOY) {
            throw MESSAGES.invalidActionType(modification.getType());
        }
        this.undeployModification = modification;
    }
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.domain.DeploymentAction

        try {
            final InputStream input = archive.as(ZipExporter.class).exportAsInputStream();
            try {
                InitialDeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
                DeploymentPlan plan = builder.add(archive.getName(), input).andDeploy().toServerGroup(target).build();
                DeploymentAction deployAction = plan.getDeploymentActions().get(plan.getDeploymentActions().size() - 1);
                return executeDeploymentPlan(plan, deployAction);
            } finally {
                if (input != null)
                    try {
                        input.close();
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.standalone.DeploymentAction

            // Build and execute the deployment plan
            InputStream inputStream = dep.getRoot().openStream();
            DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
            builder = builder.add(contextName, inputStream).andDeploy();
            DeploymentPlan plan = builder.build();
            DeploymentAction deployAction = builder.getLastAction();
            executeDeploymentPlan(plan, deployAction);

        } catch (RuntimeException rte) {
            throw rte;
        } catch (BundleException ex) {
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.standalone.DeploymentAction

            // Undeploy through the deployment manager
            DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
            String contextName = DeploymentHolderService.getContextName(dep);
            builder = builder.undeploy(contextName).remove(contextName);
            DeploymentPlan plan = builder.build();
            DeploymentAction removeAction = builder.getLastAction();
            executeDeploymentPlan(plan, removeAction);
        } catch (Exception ex) {
            ROOT_LOGGER.cannotUndeployBundle(ex, dep);
        }
    }
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.standalone.DeploymentAction

    @Override
    public void deploy(final URL archiveURL) throws Exception {
        final DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan().add(archiveURL).andDeploy();
        final DeploymentPlan plan = builder.build();
        final DeploymentAction deployAction = builder.getLastAction();
        final String uniqueId = deployAction.getDeploymentUnitUniqueName();
        executeDeploymentPlan(plan, deployAction);
        url2Id.put(archiveURL, uniqueId);
    }
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.standalone.DeploymentAction

    public void undeploy(final URL archiveURL) throws Exception {
        final DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
        final String uniqueName = url2Id.get(archiveURL);
        if (uniqueName != null) {
            final DeploymentPlan plan = builder.undeploy(uniqueName).remove(uniqueName).build();
            final DeploymentAction deployAction = builder.getLastAction();
            try {
                executeDeploymentPlan(plan, deployAction);
            } finally {
                url2Id.remove(archiveURL);
            }
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.standalone.DeploymentAction

        return new DeploymentPlanBuilderImpl(this, mod);
    }

    @Override
    public DeploymentPlanBuilder andRemoveUndeployed() {
        DeploymentAction last = getLastAction();
        if (last.getType() != Type.UNDEPLOY) {
            // Someone cast to the impl class instead of using the interface
            cleanup();
            throw new IllegalStateException("Preceding action was not a " + Type.UNDEPLOY);
        }
        DeploymentActionImpl removeMod = DeploymentActionImpl.getRemoveAction(last.getDeploymentUnitUniqueName());
        return new DeploymentPlanBuilderImpl(this, removeMod);
    }
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.standalone.DeploymentAction

        return new DeploymentPlanBuilderImpl(this, -1);
    }


    private String getAddedContentKey() {
        DeploymentAction last = getLastAction();
        if (last.getType() != Type.ADD) {
            // Someone cast to the impl class instead of using the interface
            cleanup();
            throw new IllegalStateException("Preceding action was not a " + Type.ADD);
        }
        return last.getDeploymentUnitUniqueName();
    }
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.standalone.DeploymentAction

        return new DeploymentPlanBuilderImpl(this, mod);
    }

    @Override
    public DeploymentPlanBuilder andRemoveUndeployed() {
        DeploymentAction last = getLastAction();
        if (last.getType() != Type.UNDEPLOY) {
            // Someone cast to the impl class instead of using the interface
            cleanup();
            throw MESSAGES.invalidPrecedingAction(Type.UNDEPLOY);
        }
        DeploymentActionImpl removeMod = DeploymentActionImpl.getRemoveAction(last.getDeploymentUnitUniqueName());
        return new DeploymentPlanBuilderImpl(this, removeMod);
    }
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.