Examples of PackageType


Examples of org.rhq.core.domain.content.PackageType

    private PackageType lookupPackageType() {
        if (resourceType == null) {
            resourceType = lookupResourceType();
        }
        ContentManagerLocal contentManager = LookupUtil.getContentManager();
        PackageType packageType = contentManager.getResourceCreationPackageType(this.resourceType.getId());
        return packageType;
    }
View Full Code Here

Examples of org.rhq.core.domain.content.PackageType

            // string to "", in which case this exception is triggered
            return null;
        }

        ContentUIManagerLocal contentUIManager = LookupUtil.getContentUIManager();
        PackageType packageType = contentUIManager.getPackageType(packageTypeId);

        return packageType;
    }
View Full Code Here

Examples of org.rhq.core.domain.content.PackageType

        return packageType;
    }

    public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object object) {
        PackageType packageType = (PackageType) object;
        return Integer.toString(packageType.getId());
    }
View Full Code Here

Examples of org.rhq.core.domain.content.PackageType

                    + env.getPluginKey().getPluginName() + "' does not inherit from AbstractPackageTypeBehavior class.");
            }

            //check that all the package types defined by this plugin exist
            for (PackageTypeDefinitionType def : descriptor.getPackageType()) {
                PackageType pt = ensurePackageTypeExists(def);
                pluginsByPackageTypeId.put(pt, env);
            }
        } catch (Exception e) {
            // do not deploy this plugin - its stinky
            try {
View Full Code Here

Examples of org.rhq.core.domain.content.PackageType

    private PackageType ensurePackageTypeExists(PackageTypeDefinitionType def) throws InvalidPluginDescriptorException {
        SubjectManagerLocal subjectManager = LookupUtil.getSubjectManager();
        ContentManagerLocal cm = LookupUtil.getContentManager();

        PackageType packageType = cm.findPackageType(subjectManager.getOverlord(), null, def.getName());

        if (packageType == null) {
            //TODO support tying the package type to the resource types?
            packageType = new PackageType(def.getName(), null);
            packageType.setDescription(def.getDescription());
            packageType.setDisplayName(def.getDisplayName());
            packageType.setSupportsArchitecture(def.isSupportsArchitecture());
            packageType.setCreationData(false);
            packageType.setDeploymentConfigurationDefinition(ConfigurationMetadataParser.parse(def.getName(),
                def.getConfiguration()));
            packageType.setDiscoveryInterval(-1);
            packageType.setPackageExtraPropertiesDefinition(null);

            packageType = cm.persistServersidePackageType(packageType);
        }

        return packageType;
View Full Code Here

Examples of org.rhq.core.domain.content.PackageType

    @Override
    public ContentDiscoveryReport executeResourcePackageDiscoveryImmediately(int resourceId, String packageTypeName)
        throws PluginContainerException {
        // Load the package type object
        PackageType packageType = findPackageType(resourceId, packageTypeName);
        if (packageType == null) {
            throw new PluginContainerException("Could not load package type [" + packageTypeName + "] for resource: "
                + resourceId);
        }
View Full Code Here

Examples of org.rhq.core.domain.content.PackageType

        Architecture mockArchitecture = mock(Architecture.class);
        when(mockArchitecture.getName()).thenReturn("ArchitectureName");
        when(mockEntityManager.find(eq(Architecture.class), anyInt())).thenReturn(mockArchitecture);

        PackageType mockPackageType = mock(PackageType.class);
        when(mockEntityManager.find(eq(PackageType.class), eq(1))).thenReturn(mockPackageType);

        PackageTypeBehavior mockPackageTypeBehavior = mock(PackageTypeBehavior.class);
        PowerMockito.mockStatic(ContentManagerHelper.class);
        when(ContentManagerHelper.getPackageTypeBehavior(1)).thenReturn(mockPackageTypeBehavior);
View Full Code Here

Examples of org.rhq.core.domain.content.PackageType

            List<PackageType> packageTypes = contentManager.findPackageTypes(overlord,
                TestContentProvider.RESOURCE_TYPE_NAME, TestContentProvider.RESOURCE_TYPE_PLUGIN_NAME);
            if (!packageTypes.isEmpty()) {
                packageType = packageTypes.get(0);
            } else {
                packageType = new PackageType(TestContentProvider.PACKAGE_TYPE_NAME, resourceType);
                entityManager.persist(packageType);
            }

            // Create the repo to be synced
            List<Repo> repos = repoManager.getRepoByName(TestContentProvider.REPO_WITH_PACKAGES);
View Full Code Here

Examples of org.rhq.core.domain.content.PackageType

            contentBackedChildResourceType.setCreationDataType(ResourceCreationDataType.CONTENT);
            contentBackedChildResourceType.setSingleton(true);
            em.persist(contentBackedChildResourceType);

            // Create artifact type under child resource type that is marked as the creation artifact type
            packageType = new PackageType();
            packageType.setName("artifact-" + System.currentTimeMillis());
            packageType.setDescription("");
            packageType.setCategory(PackageCategory.DEPLOYABLE);
            packageType.setDisplayName("TestResourceArtifact");
            packageType.setCreationData(true);
View Full Code Here

Examples of org.rhq.core.domain.content.PackageType

    }

    @Test
    public void content() {
        // Setup
        PackageType artifactType1 = new PackageType();
        artifactType1.setName("artifact1");
        artifactType1.setDescription("");
        artifactType1.setCategory(PackageCategory.CONFIGURATION);

        PackageType artifactType2 = new PackageType();
        artifactType2.setName("artifact2");
        artifactType2.setDescription("");
        artifactType2.setCategory(PackageCategory.CONFIGURATION);

        // Test
        ScenarioManager manager = ScenarioManager.getInstance();

        ContentFactory artifactFactory;
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.