Examples of BundleResourceDeployment


Examples of org.rhq.core.domain.bundle.BundleResourceDeployment

    @Override
    public BundleDeployResult deployBundle(final BundleDeployRequest request) {
        BundleDeployResult result = new BundleDeployResult();
        try {
            BundleResourceDeployment resourceDeployment = request.getResourceDeployment();
            BundleDeployment bundleDeployment = resourceDeployment.getBundleDeployment();
            BundleVersion bundleVersion = bundleDeployment.getBundleVersion();

            String recipe = bundleVersion.getRecipe();
            File recipeFile = File.createTempFile("ant-bundle-recipe", ".xml", request.getBundleFilesLocation());
            File logFile = File.createTempFile("ant-bundle-recipe", ".log", this.tmpDirectory);
View Full Code Here

Examples of org.rhq.core.domain.bundle.BundleResourceDeployment

    @Override
    public BundlePurgeResult purgeBundle(BundlePurgeRequest request) {
        BundlePurgeResult result = new BundlePurgeResult();
        try {
            BundleResourceDeployment deploymentToPurge = request.getLiveResourceDeployment();
            File deployDir = request.getAbsoluteDestinationDirectory();
            String deployDirAbsolutePath = deployDir.getAbsolutePath();
            BundleManagerProvider bundleManagerProvider = request.getBundleManagerProvider();

            boolean manageAllDeployDir = true;
View Full Code Here

Examples of org.rhq.core.domain.bundle.BundleResourceDeployment

    }

    private Properties createAntProperties(BundleDeployRequest request) {
        Properties antProps = new Properties();

        BundleResourceDeployment resourceDeployment = request.getResourceDeployment();
        BundleDeployment bundleDeployment = resourceDeployment.getBundleDeployment();
        int deploymentId = bundleDeployment.getId();
        String deployDir = request.getAbsoluteDestinationDirectory().getAbsolutePath();

        antProps.setProperty(DeployPropertyNames.DEPLOY_ID, Integer.toString(deploymentId));
        antProps.setProperty(DeployPropertyNames.DEPLOY_DIR, deployDir);
        antProps.setProperty(DeployPropertyNames.DEPLOY_NAME, bundleDeployment.getName());
        antProps.setProperty(DeployPropertyNames.DEPLOY_REVERT, String.valueOf(request.isRevert()));
        antProps.setProperty(DeployPropertyNames.DEPLOY_CLEAN, String.valueOf(request.isCleanDeployment()));

        // add the resource tags
        Set<Tag> tags = resourceDeployment.getResource().getTags();
        if (tags != null) {
            for (Tag tag : tags) {
                String tagPropName = getTagPropertyName(tag);
                if (tagPropName != null) {
                    antProps.setProperty(tagPropName, tag.getName());
View Full Code Here

Examples of org.rhq.core.domain.bundle.BundleResourceDeployment

            this.request = request;
        }

        @Override
        public boolean handoverContent(HandoverInfo handoverInfo) {
            BundleResourceDeployment resourceDeployment = request.getResourceDeployment();
            BundleManagerProvider bundleManagerProvider = request.getBundleManagerProvider();

            BundleHandoverContext.Builder contextBuilder = new BundleHandoverContext.Builder();
            contextBuilder.setRevert(handoverInfo.isRevert());

            BundleHandoverRequest.Builder handoverRequestBuilder = new BundleHandoverRequest.Builder();
            handoverRequestBuilder.setContent(handoverInfo.getContent()) //
                .setFilename(handoverInfo.getFilename()) //
                .setAction(handoverInfo.getAction()).setParams(handoverInfo.getParams())//
                .setContext(contextBuilder.create());

            BundleHandoverRequest bundleHandoverRequest = handoverRequestBuilder.createBundleHandoverRequest();
            BundleHandoverResponse handoverResponse = bundleManagerProvider.handoverContent(
                resourceDeployment.getResource(), bundleHandoverRequest);

            boolean success = handoverResponse.isSuccess();
            try {

                StringWriter attachmentStringWriter = new StringWriter();
View Full Code Here

Examples of org.rhq.core.domain.bundle.BundleResourceDeployment

            result.setErrorMessage("File template bundles cannot be reverted");
            return result;
        }

        try {
            BundleResourceDeployment resourceDeployment = request.getResourceDeployment();
            BundleDeployment bundleDeployment = resourceDeployment.getBundleDeployment();
            BundleVersion bundleVersion = bundleDeployment.getBundleVersion();
            BundleManagerProvider bundleManagerProvider = request.getBundleManagerProvider();

            // before processing the recipe, wipe the dest dir if we need to perform a clean deployment
            if (request.isCleanDeployment()) {
View Full Code Here

Examples of org.rhq.core.domain.bundle.BundleResourceDeployment

    }

    public BundlePurgeResult purgeBundle(BundlePurgeRequest request) {
        BundlePurgeResult result = new BundlePurgeResult();
        try {
            BundleResourceDeployment deploymentToPurge = request.getLiveResourceDeployment();
            File deployDir = request.getAbsoluteDestinationDirectory();
            String deployDirAbsolutePath = deployDir.getAbsolutePath();
            BundleManagerProvider bundleManagerProvider = request.getBundleManagerProvider();

            // completely purge the deployment directory.
View Full Code Here

Examples of org.rhq.core.domain.bundle.BundleResourceDeployment

        tags.add(new Tag("ns1:sem1=tag1")); // we can use @@rhq.tag.ns1.sem1@@
        tags.add(new Tag("sem2=tag2")); // we can use @@rhq.tag.sem2@@
        tags.add(new Tag("ns3:tag3")); // no semantic is specified, bundle deployments will not see this
        tags.add(new Tag("tag4")); // no semantic is specified, bundle deployments will not see this
        resource.setTags(tags);
        return new BundleResourceDeployment(deployment, resource);
    }
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.