Package org.rhq.core.domain.resource

Examples of org.rhq.core.domain.resource.ResourceCategory


        }
        return descriptor;
    }

    private void addType(ResourceType type) {
        ResourceCategory category = type.getCategory();

        synchronized (typesLock) {
            if (!typesByCategory.containsKey(category)) {
                typesByCategory.put(category, new LinkedHashSet<ResourceType>());
            }
View Full Code Here


    private void addRunsInsideParentTypes(ResourceDescriptor resourceDescriptor, ResourceType resourceType) {
        RunsInsideType runsInside = resourceDescriptor.getRunsInside();
        if (runsInside != null) {
            List<ParentResourceType> parentTypesDescriptor = runsInside.getParentResourceType();
            for (ParentResourceType parentTypeDescriptor : parentTypesDescriptor) {
                ResourceCategory parentResourceCategory = parentTypeDescriptor.getPlugin().equals("Platforms") ? ResourceCategory.PLATFORM
                    : ResourceCategory.SERVER;
                ResourceType parentResourceType = new ResourceType(parentTypeDescriptor.getName(),
                    parentTypeDescriptor.getPlugin(), parentResourceCategory, ResourceType.ANY_PLATFORM_TYPE);
                ResourceType fullParentType = allTypes.get(parentResourceType);
                if (fullParentType != null) {
View Full Code Here

    public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
        if (value == null) {
            return "null";
        }
        ResourceCategory resourceCategory;
        if (value instanceof ResourceCategory) {
            resourceCategory = (ResourceCategory) value;
        } else if (value instanceof String) {
            String categoryName = (String) value;
            resourceCategory = ResourceCategory.valueOf(categoryName);
View Full Code Here

        return getResourceIcon(resource, "24");
    }

    private static String getResourceIcon(Resource resource, String size) {
        ResourceType type = resource.getResourceType();
        ResourceCategory category;
        if (type != null) {
            category = type.getCategory();
        } else {
            category = ResourceCategory.SERVICE;
        }
View Full Code Here

            Integer typeId = (Integer) prefetched[i++];
            String typeName = (String) prefetched[i++];
            String typePlugin = (String) prefetched[i++];
            Boolean typeSingleton = (Boolean) prefetched[i++];
            ResourceCategory typeCategory = (ResourceCategory) prefetched[i++];

            String subCategory = (String) prefetched[i++];

            //we don't need the resource type reference here, only in the cache
            flyweightCache
View Full Code Here

        // Split the Resources into two lists - one for platforms and one for servers, since that's what
        // updateInventoryStatus() expects.
        List<Resource> platforms = new ArrayList<Resource>();
        List<Resource> servers = new ArrayList<Resource>();
        for (Resource resource : resources) {
            ResourceCategory category = resource.getResourceType().getCategory();
            if (category == ResourceCategory.PLATFORM) {
                if (target == InventoryStatus.IGNORED && (resource.getInventoryStatus() == InventoryStatus.COMMITTED)) {
                    LOG.warn("Cannot ignore a committed platform - skipping request to ignore:" + resource);
                } else {
                    platforms.add(resource);
View Full Code Here

            super(view, beanName);
        }

        @Override
        public PageList<ResourceComposite> fetchPage(PageControl pageControl) {
            ResourceCategory resourceCategory = null;
            int resourceTypeId = -1;
            ListChildResourcesUIBean.this.initChildTypeFilter();
            if ((ListChildResourcesUIBean.this.childTypeFilter != null)
                && !ListChildResourcesUIBean.this.childTypeFilter.equals(CHILD_TYPE_FILTER_VALUE_ALL)) {
                try {
View Full Code Here

            int repoId = Integer.parseInt(FacesContextUtility.getRequiredRequestParameter("id"));
            String search = FacesContextUtility
                .getOptionalRequestParameter("repoUnsubscriptionsListForm:searchStringFilter");
            String category = FacesContextUtility
                .getOptionalRequestParameter("repoUnsubscriptionsListForm:searchCategoryFilter");
            ResourceCategory categoryEnum = ResourceCategory.PLATFORM;

            if (search != null && search.trim().equals("")) {
                search = null;
            }
View Full Code Here

    public ResourceTypeFlyweight constructResourceType(ResourceType original) {
        int id = original.getId();
        String name = original.getName();
        String plugin = original.getPlugin();
        boolean singleton = original.isSingleton();
        ResourceCategory category = original.getCategory();
        String subCategory = original.getSubCategory();

        return constructResourceType(id, name, plugin, singleton, category, subCategory);
    }
View Full Code Here

        }

        public PageList<ResourceComposite> fetchDataForPage(PageControl pc) {
            try {
                String search = getSearch();
                ResourceCategory category = getCategory();

                ResourceCriteria criteria = new ResourceCriteria();
                criteria.setPageControl(pc);
                criteria.addFilterResourceCategories(category);
                if (search != null && !search.trim().equals("")) {
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.resource.ResourceCategory

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.