Package org.rhq.core.domain.bundle

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


            for (Bundle bg : BundlesToRemove) {
                attachedBundleGroup.removeBundle(bg);
            }

            for (Bundle bg : newBundles) {
                Bundle attachedBundle = entityManager.find(Bundle.class, bg.getId());
                attachedBundleGroup.addBundle(attachedBundle);
            }
        }

        // Fetch the lazy Set for the return
View Full Code Here


    @Override
    public BundleGroupAssignmentComposite getAssignableBundleGroups(Subject subject, Subject assigningSubject,
        int bundleId) throws Exception {

        Bundle bundle = null;

        if (0 != bundleId) {
            bundle = entityManager.find(Bundle.class, bundleId);
            if (null == bundle) {
                throw new BundleNotFoundException("Bundle ID [" + bundleId + "]");
View Full Code Here

    @RequiredPermission(Permission.MANAGE_BUNDLE)
    public void updateBundleTags(Subject subject, int bundleId, Set<Tag> tags) {

        Set<Tag> definedTags = addTags(subject, tags);
        Bundle bundle = entityManager.find(Bundle.class, bundleId);

        Set<Tag> previousTags = new HashSet<Tag>(bundle.getTags());
        previousTags.removeAll(definedTags);
        for (Tag tag : previousTags) {
            tag.removeBundle(bundle);
        }
View Full Code Here

    }

    public void testNonPlatformBundleDeploy_FileSystem_AbsolutePath() 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);
View Full Code Here

        return ((File.separatorChar == '\\') && path.startsWith("/")) ? ("C:" + path) : path;
    }

    public void testNonPlatformBundleDeploy_FileSystem_RelativePath() 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, "relative/path"); // RELATIVE PATH
        BundleDeployment bundleDeployment = new BundleDeployment(bundleVersion, destination, "deploymentName");
        BundleResourceDeployment resourceDeployment = new BundleResourceDeployment(bundleDeployment, im.serverFS);
View Full Code Here

    }

    public void testNonPlatformBundleDeploy_PluginConfig() 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_PC, "relative/path/pc");
        BundleDeployment bundleDeployment = new BundleDeployment(bundleVersion, destination, "deploymentName");
        BundleResourceDeployment resourceDeployment = new BundleResourceDeployment(bundleDeployment, im.serverPC);
View Full Code Here

    }

    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);
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);
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);
View Full Code Here

                            if (result == null || result.isEmpty()) {
                                String conciseMessage = MSG.view_bundle_list_error4();
                                getMessageCenter().notify(new Message(conciseMessage, Message.Severity.Error));
                                return;
                            }
                            Bundle bundle = result.get(0);
                            viewBundle(bundle, viewPath.getCurrent());
                        }
                    });
            } else if (!viewPath.isEnd()) {
                String current = viewPath.getCurrent().getPath();
View Full Code Here

TOP

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

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.