Package org.rhq.core.domain.bundle

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


    }

    public void testNonPlatformBundleDeploy_ResourceConfig() throws Exception {
        BundleType bundleType = new BundleType("bundleTypeName", im.bundleHandlerType);
        Bundle bundle = new Bundle("bundleName", bundleType, null, null);
        BundleVersion bundleVersion = new BundleVersion("bundleVersionName", "1.0", bundle, "");
        BundleDestination destination = new BundleDestination(bundle, "destName", null,
            MockInventoryManager.BUNDLE_CONFIG_NAME_RC, "relative/path/rc");
        BundleDeployment bundleDeployment = new BundleDeployment(bundleVersion, destination, "deploymentName");
        BundleResourceDeployment resourceDeployment = new BundleResourceDeployment(bundleDeployment, im.serverRC);
        BundleScheduleRequest request = new BundleScheduleRequest(resourceDeployment);
View Full Code Here


    }

    public void testNonPlatformBundleDeploy_Trait() throws Exception {
        BundleType bundleType = new BundleType("bundleTypeName", im.bundleHandlerType);
        Bundle bundle = new Bundle("bundleName", bundleType, null, null);
        BundleVersion bundleVersion = new BundleVersion("bundleVersionName", "1.0", bundle, "");
        BundleDestination destination = new BundleDestination(bundle, "destName", null,
            MockInventoryManager.BUNDLE_CONFIG_NAME_MT, "relative/path/mt");
        BundleDeployment bundleDeployment = new BundleDeployment(bundleVersion, destination, "deploymentName");
        BundleResourceDeployment resourceDeployment = new BundleResourceDeployment(bundleDeployment, im.serverMT);
        BundleScheduleRequest request = new BundleScheduleRequest(resourceDeployment);
View Full Code Here

    }

    public void testNonPlatformBundleDeploy_FileSystem_Failure() throws Exception {
        BundleType bundleType = new BundleType("bundleTypeName", im.bundleHandlerType);
        Bundle bundle = new Bundle("bundleName", bundleType, null, null);
        BundleVersion bundleVersion = new BundleVersion("bundleVersionName", "1.0", bundle, "");
        BundleDestination destination = new BundleDestination(bundle, "destName", null,
            MockInventoryManager.BUNDLE_CONFIG_NAME_FS, getPath("/tmp/dest")); // ABSOLUTE PATH
        BundleDeployment bundleDeployment = new BundleDeployment(bundleVersion, destination, "deploymentName");
        BundleResourceDeployment resourceDeployment = new BundleResourceDeployment(bundleDeployment, im.serverFS);
        BundleScheduleRequest request = new BundleScheduleRequest(resourceDeployment);
View Full Code Here

                                    MSG.view_bundle_deployWizard_selectVersion_latest(latestVersion.getVersion()));

                                if (!result.isEmpty()) {
                                    BundleDeployment liveDeployment = result.get(0);
                                    // make sure the liveDeployment record has a bundleversion with configdef loaded
                                    BundleVersion liveBundleVersion = liveDeployment.getBundleVersion();
                                    int i = bundleVersions.indexOf(liveBundleVersion);
                                    liveDeployment.setBundleVersion(bundleVersions.get(i));
                                    wizard.setLiveDeployment(liveDeployment);
                                    liveVersion = liveDeployment.getBundleVersion();
                                    radioGroupValues.put(LIVE_VERSION,
View Full Code Here

                getErrorHandler().handleError(MSG.view_bundle_version_loadFailure(), caught);
            }

            @Override
            public void onSuccess(PageList<BundleVersion> result) {
                BundleVersion version = result.get(0);
                ViewId nextPath = viewPath.next().getCurrent();
                viewBundleVersion(version, nextPath);
            }
        });
    }
View Full Code Here

    public void setInitialBundleGroups(Set<BundleGroup> initialBundleGroups) {
        this.initialBundleGroups = initialBundleGroups;
    }

    public void cancel() {
        final BundleVersion bv = getBundleVersion();
        if (bv != null) {
            // the user must have created it already after verification step, delete it, if possible
            BundleGWTServiceAsync bundleServer = GWTServiceLookup.getBundleService();
            bundleServer.deleteBundleVersion(bv.getId(), true, new AsyncCallback<Void>() {
                public void onSuccess(Void result) {
                    CoreGUI.getMessageCenter().notify(
                        new Message(MSG.view_bundle_createWizard_cancelSuccessful(bv.getName(), bv.getVersion()),
                            Severity.Info));
                }

                public void onFailure(Throwable caught) {
                    String msg = MSG.view_bundle_createWizard_cancelFailure(bv.getName(), bv.getVersion());
                    // provide a more specific message if the cancel failed due to the user not having delete permission
                    if (caught.getMessage().contains("PermissionException")) {
                        msg = MSG.view_bundle_createWizard_cancelFailurePerm(bv.getName(), bv.getVersion());
                    }
                    CoreGUI.getErrorHandler().handleError(msg, caught);
                }
            });
        }
View Full Code Here

        ResourceType resourceType = new ResourceType("name", "plugin", ResourceCategory.PLATFORM, null);
        Resource resource = new Resource("key", "name", resourceType);
        BundleType bundleType = new BundleType("name", resourceType);
        Bundle bundle = new Bundle("name", bundleType, null, null);
        BundleVersion bundleVersion = new BundleVersion("bname", "bversion", bundle, "");
        String name = "name";
        String destBaseDirName = "destBaseDirName";
        String installDir = "installDir";
        BundleDestination bundleDestination = new BundleDestination(bundle, "destName", new ResourceGroup("groupName"),
            destBaseDirName, installDir);
View Full Code Here

            node.setID(String.valueOf(bundleGroupId) + "_" + bundle.getId());
            node.setParentID(String.valueOf(bundleGroupId));
            node.setName(StringUtility.escapeHtml(bundle.getName()));
            sortValue = bundle.getName();
        } else if (from instanceof BundleVersion) {
            BundleVersion version = (BundleVersion) from;
            node.setIsFolder(false);
            node.setIcon("subsystems/bundle/BundleVersion_16.png");
            parentID = bundleGroupId.toString() + "_" + version.getBundle().getId() + "_versions";
            node.setParentID(parentID);
            node.setID(parentID + '_' + version.getId());
            node.setName(version.getVersion());
            sortValue = NumberFormat.getFormat("000000").format(version.getVersionOrder());

        } else if (from instanceof BundleDeployment) {
            BundleDeployment deployment = (BundleDeployment) from;
            node.setIsFolder(false);
            node.setIcon("subsystems/bundle/BundleDeployment_16.png");
View Full Code Here

                criteria.fetchBundle(true);
                BundleGWTServiceAsync bundleServer = GWTServiceLookup.getBundleService();
                bundleServer.findBundleVersionsByCriteria(criteria, new AsyncCallback<PageList<BundleVersion>>() {
                    @Override
                    public void onSuccess(PageList<BundleVersion> result) {
                        BundleVersion bv = result.get(0);
                        CoreGUI.getMessageCenter().notify(
                            new Message(MSG.view_bundle_createWizard_createSuccessful(bv.getName(), bv.getVersion()),
                                Message.Severity.Info));
                        wizard.setBundleVersion(bv);
                        setButtonsDisableMode(false);
                        incrementStep(); // go to the next step
                    }
View Full Code Here

    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);
            PrintWriter logFileOutput = null;
            try {
                // Open the log file for writing.
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.bundle.BundleVersion

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.