org.rhq.enterprise.server.resource
Class ResourceManagerBean

java.lang.Object
  extended by org.rhq.enterprise.server.resource.ResourceManagerBean
All Implemented Interfaces:
ResourceManagerLocal, ResourceManagerRemote

public class ResourceManagerBean
extends Object
implements ResourceManagerLocal, ResourceManagerRemote

A manager that provides methods for creating, updating, deleting, and querying Resources.

Author:
Ian Springer, Joseph Marques, Jay Shaughnessy (delete operations)

Constructor Summary
ResourceManagerBean()
           
 
Method Summary
 void addResourceError(org.rhq.core.domain.resource.ResourceError resourceError)
          Indicates an error occurred on a resource.
 boolean bulkNamedQueryDeleteInNewTransaction(org.rhq.core.domain.auth.Subject subject, String namedQuery, List<Integer> resourceIds)
           
 boolean bulkNativeQueryDeleteInNewTransaction(org.rhq.core.domain.auth.Subject subject, String nativeQueryString, List<Integer> resourceIds)
           
 void clearResourceConfigError(int resourceId)
          Clears errors of type ResourceErrorType.INVALID_PLUGIN_CONFIGURATION
 int clearResourceConfigErrorByType(org.rhq.core.domain.auth.Subject subject, int resourceId, org.rhq.core.domain.resource.ResourceErrorType resourceErrorType)
          Clears errors of the given type.
 void createResource(org.rhq.core.domain.auth.Subject user, org.rhq.core.domain.resource.Resource resource, int parentId)
          Create a new Resource.
 void deleteResourceError(org.rhq.core.domain.auth.Subject user, int resourceErrorId)
          Deletes the given resource error, effectively removing it from its resource's list of errors.
<T> List<org.rhq.core.domain.resource.composite.DisambiguationReport<T>>
disambiguate(List<T> results, org.rhq.core.util.IntExtractor<? super T> extractor, DisambiguationUpdateStrategy updateStrategy)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findAvailableResourcesForDashboardPortlet(org.rhq.core.domain.auth.Subject user, Integer typeId, org.rhq.core.domain.resource.ResourceCategory category, int[] excludeIds, org.rhq.core.domain.util.PageControl pageControl)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findAvailableResourcesForRepo(org.rhq.core.domain.auth.Subject user, int repoId, String search, org.rhq.core.domain.resource.ResourceCategory category, org.rhq.core.domain.util.PageControl pageControl)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findAvailableResourcesForResourceGroup(org.rhq.core.domain.auth.Subject user, int groupId, org.rhq.core.domain.resource.ResourceType type, org.rhq.core.domain.resource.ResourceCategory category, String nameFilter, int[] excludeIds, org.rhq.core.domain.util.PageControl pageControl)
           
 List<org.rhq.core.domain.resource.group.composite.AutoGroupComposite> findChildrenAutoGroups(org.rhq.core.domain.auth.Subject user, int parentResourceId)
           
 List<org.rhq.core.domain.resource.group.composite.AutoGroupComposite> findChildrenAutoGroups(org.rhq.core.domain.auth.Subject user, int parentResourceId, int[] resourceTypeIds)
           
 List<Integer> findChildrenResourceIds(int parentResourceId, org.rhq.core.domain.resource.InventoryStatus status)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findChildResources(org.rhq.core.domain.auth.Subject subject, int parentResourceId, org.rhq.core.domain.util.PageControl pageControl)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findChildResources(org.rhq.core.domain.auth.Subject user, org.rhq.core.domain.resource.Resource parent, org.rhq.core.domain.util.PageControl pageControl)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findChildResourcesByCategoryAndInventoryStatus(org.rhq.core.domain.auth.Subject user, org.rhq.core.domain.resource.Resource parent, org.rhq.core.domain.resource.ResourceCategory category, org.rhq.core.domain.resource.InventoryStatus status, org.rhq.core.domain.util.PageControl pageControl)
           
 List<Integer> findExplicitResourceIdsByResourceGroup(int resourceGroupId)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findExplicitResourcesByResourceGroup(org.rhq.core.domain.auth.Subject user, org.rhq.core.domain.resource.group.ResourceGroup group, org.rhq.core.domain.util.PageControl pageControl)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.composite.ResourceWithAvailability> findExplicitResourceWithAvailabilityByResourceGroup(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.resource.group.ResourceGroup group, org.rhq.core.domain.util.PageControl pageControl)
           
 List<org.rhq.core.domain.resource.composite.ResourceIdFlyWeight> findFlyWeights(int[] resourceIds)
           
 List<Integer> findIdsByTypeIds(List<Integer> resourceTypeIds)
           
 List<Integer> findImplicitResourceIdsByResourceGroup(int resourceGroupId)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findImplicitResourcesByResourceGroup(org.rhq.core.domain.auth.Subject user, org.rhq.core.domain.resource.group.ResourceGroup group, org.rhq.core.domain.util.PageControl pageControl)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.composite.ResourceWithAvailability> findImplicitResourceWithAvailabilityByResourceGroup(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.resource.group.ResourceGroup group, org.rhq.core.domain.util.PageControl pageControl)
           
 List<org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite> findRecentlyAddedPlatforms(org.rhq.core.domain.auth.Subject user, long ctime, int maxItems)
          Gets a list of platforms that were recently added (committed) to inventory.
 List<org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite> findRecentlyAddedServers(org.rhq.core.domain.auth.Subject user, long ctime, int platformId)
          Gets a list of servers that are children of the given platform that were recently added (committed) to inventory.
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findResourceByIds(org.rhq.core.domain.auth.Subject subject, int[] resourceIds, boolean attachParentResource, org.rhq.core.domain.util.PageControl pageControl)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findResourceByParentAndInventoryStatus(org.rhq.core.domain.auth.Subject user, org.rhq.core.domain.resource.Resource parent, org.rhq.core.domain.resource.InventoryStatus inventoryStatus, org.rhq.core.domain.util.PageControl pageControl)
           
 List<org.rhq.core.domain.resource.composite.ResourceInstallCount> findResourceComplianceCounts(org.rhq.core.domain.auth.Subject subject)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.composite.ResourceComposite> findResourceCompositeForParentAndTypeAndCategory(org.rhq.core.domain.auth.Subject user, org.rhq.core.domain.resource.ResourceCategory category, int resourceTypeId, org.rhq.core.domain.resource.Resource parentResource, org.rhq.core.domain.util.PageControl pageControl)
          Get a Resource Composite for Resources limited by the given parameters
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.composite.ResourceComposite> findResourceComposites(org.rhq.core.domain.auth.Subject user, org.rhq.core.domain.resource.ResourceCategory category, String typeName, String pluginName, org.rhq.core.domain.resource.Resource parentResource, String searchString, boolean attachParentResource, org.rhq.core.domain.util.PageControl pageControl)
          This finder query can be used to find resources with various combinations of attributes in their composite form.
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.composite.ResourceComposite> findResourceCompositesByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.ResourceCriteria criteria)
           
 List<org.rhq.core.domain.resource.ResourceError> findResourceErrors(org.rhq.core.domain.auth.Subject user, int resourceId)
          Returns all the errors that have occurred for the given resource.
 List<org.rhq.core.domain.resource.ResourceError> findResourceErrors(org.rhq.core.domain.auth.Subject user, int resourceId, org.rhq.core.domain.resource.ResourceErrorType errorType)
          Returns the errors of the given type that have occurred for the given resource.
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.composite.ResourceHealthComposite> findResourceHealth(org.rhq.core.domain.auth.Subject user, int[] resourceIds, org.rhq.core.domain.util.PageControl pc)
          Gets the "health" of a set of resources, where the health composite gives you the resource's availability status and the number of alerts it has emitted.
 List<org.rhq.core.domain.resource.composite.ResourceInstallCount> findResourceInstallCounts(org.rhq.core.domain.auth.Subject subject, boolean groupByVersions)
           
 List<org.rhq.core.domain.resource.Resource> findResourceLineage(org.rhq.core.domain.auth.Subject subject, int resourceId)
          #see {@link ResourceManagerRemote#findResourceLineage(Subject, int)
 List<org.rhq.core.domain.resource.group.composite.AutoGroupComposite> findResourcesAutoGroups(org.rhq.core.domain.auth.Subject subject, int[] resourceIds)
           
 List<org.rhq.core.domain.resource.flyweight.ResourceFlyweight> findResourcesByAgent(org.rhq.core.domain.auth.Subject user, int agentId, org.rhq.core.domain.util.PageControl unlimitedInstance)
          Load the entire list of resources under an agent.
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findResourcesByCategory(org.rhq.core.domain.auth.Subject user, org.rhq.core.domain.resource.ResourceCategory category, org.rhq.core.domain.resource.InventoryStatus inventoryStatus, org.rhq.core.domain.util.PageControl pageControl)
           
 List<org.rhq.core.domain.resource.flyweight.ResourceFlyweight> findResourcesByCompatibleGroup(org.rhq.core.domain.auth.Subject user, int compatibleGroupId, org.rhq.core.domain.util.PageControl pageControl)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findResourcesByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.ResourceCriteria criteria)
           
 List<org.rhq.core.domain.resource.composite.ResourceWithAvailability> findResourcesByParentAndType(org.rhq.core.domain.auth.Subject user, org.rhq.core.domain.resource.Resource parent, org.rhq.core.domain.resource.ResourceType type)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findResourcesByType(org.rhq.core.domain.auth.Subject user, org.rhq.core.domain.resource.ResourceType resourceType, org.rhq.core.domain.util.PageControl pageControl)
           
 List<Integer> findResourcesMarkedForAsyncDeletion(org.rhq.core.domain.auth.Subject user)
           
 org.rhq.core.domain.resource.composite.ResourceAvailabilitySummary getAvailabilitySummary(org.rhq.core.domain.auth.Subject user, int resourceId)
           
 org.rhq.core.domain.measurement.ResourceAvailability getLiveResourceAvailability(org.rhq.core.domain.auth.Subject subject, int resourceId)
          #see {@link ResourceManagerRemote#getLiveResourceAvailability(Subject, int)
 org.rhq.core.domain.resource.Resource getParentResource(int resourceId)
          Returns the parent of the Resource with the specified id, or null if the Resource does not have a parent (i.e.
 org.rhq.core.domain.resource.Resource getParentResource(org.rhq.core.domain.auth.Subject subject, int resourceId)
           
 org.rhq.core.domain.resource.Resource getPlaformOfResource(org.rhq.core.domain.auth.Subject subject, int resourceId)
           
 org.rhq.core.domain.resource.Resource getPlatform(org.rhq.core.domain.resource.Agent agent)
          Returns the platform Resource associated with the specified Agent.
 org.rhq.core.domain.resource.Resource getResource(org.rhq.core.domain.auth.Subject subject, int resourceId)
          #see {@link ResourceManagerRemote#getResource(Subject, int)
 org.rhq.core.domain.resource.group.composite.AutoGroupComposite getResourceAutoGroup(org.rhq.core.domain.auth.Subject user, int resourceId)
           
 org.rhq.core.domain.resource.Resource getResourceById(org.rhq.core.domain.auth.Subject user, int resourceId)
           
 org.rhq.core.domain.resource.Resource getResourceByParentAndKey(org.rhq.core.domain.auth.Subject user, org.rhq.core.domain.resource.Resource parent, String key, String plugin, String typeName)
           
 Integer getResourceCount(List<Integer> resourceTypeIds)
           
 int getResourceCountByCategory(org.rhq.core.domain.auth.Subject user, org.rhq.core.domain.resource.ResourceCategory category, org.rhq.core.domain.resource.InventoryStatus status)
           
 int getResourceCountByTypeAndIds(org.rhq.core.domain.auth.Subject user, org.rhq.core.domain.resource.ResourceType type, int[] resourceIds)
           
 int[] getResourceCountSummary(org.rhq.core.domain.auth.Subject user, org.rhq.core.domain.resource.InventoryStatus status)
          Get a summary of counts, by category, of the user's viewable resources having the provided inventory status.
 List<Integer> getResourceDescendantsByTypeAndName(org.rhq.core.domain.auth.Subject user, int resourceId, Integer resourceTypeId, String name)
           
 List<Integer> getResourceIdLineage(int resourceId)
           
 List<org.rhq.core.domain.resource.Resource> getResourceLineage(int resourceId)
          Returns the lineage of the Resource with the specified id.
 List<org.rhq.core.domain.resource.composite.ResourceLineageComposite> getResourceLineage(org.rhq.core.domain.auth.Subject subject, int resourceId)
          Returns the direct lineage of a resource up to the top most resource in the hierarchy.
 List<org.rhq.core.domain.resource.composite.ResourceLineageComposite> getResourceLineageAndSiblings(org.rhq.core.domain.auth.Subject subject, int resourceId)
          Returns the lineage of a resource plus all the siblings of the resources in the lineage.
 Map<Integer,String> getResourcesAncestry(org.rhq.core.domain.auth.Subject subject, Integer[] resourceIds, org.rhq.core.domain.resource.ResourceAncestryFormat format)
          Resource.ancestry is an encoded value that holds the resource's parental ancestry.
 Map<Integer,org.rhq.core.domain.resource.InventoryStatus> getResourceStatuses(int rootResourceId, boolean descendents)
           
 org.rhq.core.domain.resource.Resource getResourceTree(int rootResourceId, boolean recursive)
           
 org.rhq.core.domain.resource.Resource getRootResourceForResource(int resourceId)
          Looks up the root of a subtree in the inventory.
 org.rhq.core.domain.resource.Resource setResourceStatus(org.rhq.core.domain.auth.Subject user, org.rhq.core.domain.resource.Resource resource, org.rhq.core.domain.resource.InventoryStatus newStatus, boolean setDescendents)
          Changes the inventory status of the specified resource and optionally its descendants to the provided inventory status if the user is authorized to do so.
 List<Integer> uninventoryResource(org.rhq.core.domain.auth.Subject user, int resourceId)
          This will delete the resource with the given ID along with all of its child resources.
 void uninventoryResourceAsyncWork(org.rhq.core.domain.auth.Subject user, int resourceId)
          Deletes the given resource (but not its children) in a new transaction.
 List<Integer> uninventoryResources(org.rhq.core.domain.auth.Subject user, int[] resourceIds)
          This will uninventory the resources with the given ID along with all of their child resources.
 void updateAncestry(org.rhq.core.domain.auth.Subject subject, int resourceId)
          Update the ancestry for the specified resource and its child lineage.
 org.rhq.core.domain.resource.Resource updateResource(org.rhq.core.domain.auth.Subject user, org.rhq.core.domain.resource.Resource resource)
          Update a Resource's editable properties (name, description, and location).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceManagerBean

public ResourceManagerBean()
Method Detail

createResource

public void createResource(org.rhq.core.domain.auth.Subject user,
                           org.rhq.core.domain.resource.Resource resource,
                           int parentId)
                    throws ResourceAlreadyExistsException
Description copied from interface: ResourceManagerLocal
Create a new Resource.

Specified by:
createResource in interface ResourceManagerLocal
Parameters:
user - the user creating the resource
resource - the resource to be created
parentId - set to -1 to imply that this is a root resource, which has no parent
Throws:
ResourceAlreadyExistsException - if an equivalent resource already exists

updateResource

public org.rhq.core.domain.resource.Resource updateResource(org.rhq.core.domain.auth.Subject user,
                                                            org.rhq.core.domain.resource.Resource resource)
Description copied from interface: ResourceManagerLocal
Update a Resource's editable properties (name, description, and location).

Specified by:
updateResource in interface ResourceManagerLocal
Specified by:
updateResource in interface ResourceManagerRemote
Parameters:
user - the user updating the Resource
resource - the Resource to be updated
Returns:
the updated (attached) resource

uninventoryResources

public List<Integer> uninventoryResources(org.rhq.core.domain.auth.Subject user,
                                          int[] resourceIds)
Description copied from interface: ResourceManagerLocal
This will uninventory the resources with the given ID along with all of their child resources. This method will not create its own transaction; each individual child resource as well as the top level resources identified with the given IDs will be uninventoried in their own transaction. This will ensure that resources are uninventoried in the proper order (for example, if a given resource is actually a child of one of the other given resources, this method ensures the uninventory occurs properly).

Specified by:
uninventoryResources in interface ResourceManagerLocal
Specified by:
uninventoryResources in interface ResourceManagerRemote
Parameters:
user - the user performing the uninventory action
resourceIds - the ID of the resource to be deleted
Returns:
the list of all resources that were deleted - in effect, this will contain resourceIds and their childrens' IDs

uninventoryResource

public List<Integer> uninventoryResource(org.rhq.core.domain.auth.Subject user,
                                         int resourceId)
Description copied from interface: ResourceManagerLocal
This will delete the resource with the given ID along with all of its child resources. This method will not create its own transaction; each individual child resource as well as the top level resource identified with the given ID will be deleted in its own transaction.

Specified by:
uninventoryResource in interface ResourceManagerLocal
Parameters:
user - the user deleting the resource
resourceId - the ID of the resource to be deleted
Returns:
the list of all resources that were deleted - in effect, this will contain resourceId and its children's IDs

getResourceDescendantsByTypeAndName

public List<Integer> getResourceDescendantsByTypeAndName(org.rhq.core.domain.auth.Subject user,
                                                         int resourceId,
                                                         Integer resourceTypeId,
                                                         String name)
Specified by:
getResourceDescendantsByTypeAndName in interface ResourceManagerLocal

uninventoryResourceAsyncWork

public void uninventoryResourceAsyncWork(org.rhq.core.domain.auth.Subject user,
                                         int resourceId)
Description copied from interface: ResourceManagerLocal
Deletes the given resource (but not its children) in a new transaction. This is normally used only within this manager bean itself. Clients normally should call ResourceManagerLocal.uninventoryResource(Subject, int). If you call this method, make sure you have a specific reason for it; check to see if calling ResourceManagerLocal.uninventoryResource(Subject, int) would not be more appropriate.

Specified by:
uninventoryResourceAsyncWork in interface ResourceManagerLocal
Parameters:
user - the user deleting the resource
resourceId - the ID of the resource to be deleted

bulkNativeQueryDeleteInNewTransaction

public boolean bulkNativeQueryDeleteInNewTransaction(org.rhq.core.domain.auth.Subject subject,
                                                     String nativeQueryString,
                                                     List<Integer> resourceIds)
Specified by:
bulkNativeQueryDeleteInNewTransaction in interface ResourceManagerLocal

bulkNamedQueryDeleteInNewTransaction

public boolean bulkNamedQueryDeleteInNewTransaction(org.rhq.core.domain.auth.Subject subject,
                                                    String namedQuery,
                                                    List<Integer> resourceIds)
Specified by:
bulkNamedQueryDeleteInNewTransaction in interface ResourceManagerLocal

setResourceStatus

public org.rhq.core.domain.resource.Resource setResourceStatus(org.rhq.core.domain.auth.Subject user,
                                                               org.rhq.core.domain.resource.Resource resource,
                                                               org.rhq.core.domain.resource.InventoryStatus newStatus,
                                                               boolean setDescendents)
Description copied from interface: ResourceManagerLocal
Changes the inventory status of the specified resource and optionally its descendants to the provided inventory status if the user is authorized to do so.

Specified by:
setResourceStatus in interface ResourceManagerLocal
Parameters:
user - user doing the resource status changing
resource - the Resource to change
newStatus - the new status to change it to
setDescendents - if true, all descendent resources will also have their status set
Returns:
an updated copy of the resource

getResourceById

public org.rhq.core.domain.resource.Resource getResourceById(org.rhq.core.domain.auth.Subject user,
                                                             int resourceId)
Specified by:
getResourceById in interface ResourceManagerLocal

getResourceByParentAndKey

@Nullable
public org.rhq.core.domain.resource.Resource getResourceByParentAndKey(org.rhq.core.domain.auth.Subject user,
                                                                                org.rhq.core.domain.resource.Resource parent,
                                                                                String key,
                                                                                String plugin,
                                                                                String typeName)
Specified by:
getResourceByParentAndKey in interface ResourceManagerLocal
Returns:
the resource, or null if no such resource exists

findResourcesByParentAndType

public List<org.rhq.core.domain.resource.composite.ResourceWithAvailability> findResourcesByParentAndType(org.rhq.core.domain.auth.Subject user,
                                                                                                          org.rhq.core.domain.resource.Resource parent,
                                                                                                          org.rhq.core.domain.resource.ResourceType type)
Specified by:
findResourcesByParentAndType in interface ResourceManagerLocal

getParentResource

@Nullable
public org.rhq.core.domain.resource.Resource getParentResource(int resourceId)
Description copied from interface: ResourceManagerLocal
Returns the parent of the Resource with the specified id, or null if the Resource does not have a parent (i.e. is a platform).

Specified by:
getParentResource in interface ResourceManagerLocal
Parameters:
resourceId - the id of a Resource in inventory
Returns:
the parent of the Resource with the specified id, or null if the Resource does not have a parent

getResourceIdLineage

public List<Integer> getResourceIdLineage(int resourceId)
Specified by:
getResourceIdLineage in interface ResourceManagerLocal

getResourceLineage

public List<org.rhq.core.domain.resource.Resource> getResourceLineage(int resourceId)
Description copied from interface: ResourceManagerLocal
Returns the lineage of the Resource with the specified id. The lineage is represented as a List of Resources, with the first item being the root of the Resource's ancestry (or the Resource itself if it is a root Resource (i.e. a platform)) and the last item being the Resource itself. Since the lineage includes the Resource itself, the returned List will always contain at least one item.

Specified by:
getResourceLineage in interface ResourceManagerLocal
Parameters:
resourceId - the id of a Resource in inventory
Returns:
the lineage of the Resource with the specified id

getResourceLineageAndSiblings

public List<org.rhq.core.domain.resource.composite.ResourceLineageComposite> getResourceLineageAndSiblings(org.rhq.core.domain.auth.Subject subject,
                                                                                                           int resourceId)
Description copied from interface: ResourceManagerLocal
Returns the lineage of a resource plus all the siblings of the resources in the lineage. This is useful for prepopulating all the resources visible in an expanded tree. Composites are returned that indicate whether the resource is viewable or should be locked in the tree.

Specified by:
getResourceLineageAndSiblings in interface ResourceManagerLocal
resourceId - id of resource
Returns:
resource lineage and siblings

getResourceLineage

public List<org.rhq.core.domain.resource.composite.ResourceLineageComposite> getResourceLineage(org.rhq.core.domain.auth.Subject subject,
                                                                                                int resourceId)
Description copied from interface: ResourceManagerLocal
Returns the direct lineage of a resource up to the top most resource in the hierarchy. Composites are returned that indicate whether the resource is viewable or not by the user.

Specified by:
getResourceLineage in interface ResourceManagerLocal
resourceId - id of resource
Returns:
resource lineage

getResourcesAncestry

public Map<Integer,String> getResourcesAncestry(org.rhq.core.domain.auth.Subject subject,
                                                Integer[] resourceIds,
                                                org.rhq.core.domain.resource.ResourceAncestryFormat format)
Description copied from interface: ResourceManagerRemote
Resource.ancestry is an encoded value that holds the resource's parental ancestry. It is not suitable for display. This method can be used to get decoded and formatted ancestry values for a set of resources. A typical usage would a criteria resource fetch, and then a subsequent call to this method for ancestry display, potentially for resource disambiguation purposes.

Specified by:
getResourcesAncestry in interface ResourceManagerLocal
Specified by:
getResourcesAncestry in interface ResourceManagerRemote
Returns:
A Map of ResourceIds to FormattedAncestryStrings, one entry for each unique, valid, resourceId passed in.

getRootResourceForResource

@NotNull
public org.rhq.core.domain.resource.Resource getRootResourceForResource(int resourceId)
Description copied from interface: ResourceManagerLocal
Looks up the root of a subtree in the inventory. This will generally find the platform on which a resource is running.

Specified by:
getRootResourceForResource in interface ResourceManagerLocal
Parameters:
resourceId - the resource to find the root parent of
Returns:
the root of the supplied resource's tree

findResourceByParentAndInventoryStatus

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findResourceByParentAndInventoryStatus(org.rhq.core.domain.auth.Subject user,
                                                                                                                       org.rhq.core.domain.resource.Resource parent,
                                                                                                                       org.rhq.core.domain.resource.InventoryStatus inventoryStatus,
                                                                                                                       org.rhq.core.domain.util.PageControl pageControl)
Specified by:
findResourceByParentAndInventoryStatus in interface ResourceManagerLocal

findChildResources

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findChildResources(org.rhq.core.domain.auth.Subject user,
                                                                                                   org.rhq.core.domain.resource.Resource parent,
                                                                                                   org.rhq.core.domain.util.PageControl pageControl)

findChildrenResourceIds

public List<Integer> findChildrenResourceIds(int parentResourceId,
                                             org.rhq.core.domain.resource.InventoryStatus status)
Specified by:
findChildrenResourceIds in interface ResourceManagerLocal

findChildResourcesByCategoryAndInventoryStatus

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findChildResourcesByCategoryAndInventoryStatus(org.rhq.core.domain.auth.Subject user,
                                                                                                                               org.rhq.core.domain.resource.Resource parent,
                                                                                                                               @Nullable
                                                                                                                               org.rhq.core.domain.resource.ResourceCategory category,
                                                                                                                               org.rhq.core.domain.resource.InventoryStatus status,
                                                                                                                               org.rhq.core.domain.util.PageControl pageControl)
Specified by:
findChildResourcesByCategoryAndInventoryStatus in interface ResourceManagerLocal

findResourcesByCategory

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findResourcesByCategory(org.rhq.core.domain.auth.Subject user,
                                                                                                        org.rhq.core.domain.resource.ResourceCategory category,
                                                                                                        org.rhq.core.domain.resource.InventoryStatus inventoryStatus,
                                                                                                        org.rhq.core.domain.util.PageControl pageControl)
Specified by:
findResourcesByCategory in interface ResourceManagerLocal
See Also:
ResourceManagerRemote#findResourcesByCategory(Subject, ResourceCategory, InventoryStatus, PageControl)

findResourceComposites

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.composite.ResourceComposite> findResourceComposites(org.rhq.core.domain.auth.Subject user,
                                                                                                                          org.rhq.core.domain.resource.ResourceCategory category,
                                                                                                                          String typeName,
                                                                                                                          String pluginName,
                                                                                                                          org.rhq.core.domain.resource.Resource parentResource,
                                                                                                                          String searchString,
                                                                                                                          boolean attachParentResource,
                                                                                                                          org.rhq.core.domain.util.PageControl pageControl)
This finder query can be used to find resources with various combinations of attributes in their composite form. Except for the user parameter, the other parameters can be left null so that the query will not filter by that attribute.

Specified by:
findResourceComposites in interface ResourceManagerLocal
Parameters:
user -
category - Limit the search to a given ResourceCategory
typeName - Limit the search to to ResourceType(s) with the given name
pluginName - Limit the search to the plugin with the given name
parentResource - Limit the search to children of a given parent resource
searchString -
pageControl -
Returns:
See Also:
ResourceManagerRemote#findResourceComposites(Subject, ResourceCategory, String, int, String, PageControl)

findResourceCompositeForParentAndTypeAndCategory

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.composite.ResourceComposite> findResourceCompositeForParentAndTypeAndCategory(org.rhq.core.domain.auth.Subject user,
                                                                                                                                                    org.rhq.core.domain.resource.ResourceCategory category,
                                                                                                                                                    int resourceTypeId,
                                                                                                                                                    org.rhq.core.domain.resource.Resource parentResource,
                                                                                                                                                    org.rhq.core.domain.util.PageControl pageControl)
Get a Resource Composite for Resources limited by the given parameters

Specified by:
findResourceCompositeForParentAndTypeAndCategory in interface ResourceManagerLocal
Parameters:
user - User executing the query
category - Category this query should be limited to
resourceTypeId - the PK of the desired resource type or -1 if no limit
parentResource - the desired parent resource or null if no limit
pageControl -
Returns:

findResourcesByType

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findResourcesByType(org.rhq.core.domain.auth.Subject user,
                                                                                                    org.rhq.core.domain.resource.ResourceType resourceType,
                                                                                                    org.rhq.core.domain.util.PageControl pageControl)

getResourceCountSummary

public int[] getResourceCountSummary(org.rhq.core.domain.auth.Subject user,
                                     org.rhq.core.domain.resource.InventoryStatus status)
Description copied from interface: ResourceManagerLocal
Get a summary of counts, by category, of the user's viewable resources having the provided inventory status.

Specified by:
getResourceCountSummary in interface ResourceManagerLocal
Returns:
A 3 element int array with counts for platform, service, service as a[0], a[1], a[2], respectively.

getResourceCountByCategory

public int getResourceCountByCategory(org.rhq.core.domain.auth.Subject user,
                                      org.rhq.core.domain.resource.ResourceCategory category,
                                      org.rhq.core.domain.resource.InventoryStatus status)
Specified by:
getResourceCountByCategory in interface ResourceManagerLocal

getResourceCountByTypeAndIds

public int getResourceCountByTypeAndIds(org.rhq.core.domain.auth.Subject user,
                                        org.rhq.core.domain.resource.ResourceType type,
                                        int[] resourceIds)
Specified by:
getResourceCountByTypeAndIds in interface ResourceManagerLocal

findResourcesMarkedForAsyncDeletion

public List<Integer> findResourcesMarkedForAsyncDeletion(org.rhq.core.domain.auth.Subject user)
Specified by:
findResourcesMarkedForAsyncDeletion in interface ResourceManagerLocal

findRecentlyAddedPlatforms

public List<org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite> findRecentlyAddedPlatforms(org.rhq.core.domain.auth.Subject user,
                                                                                                              long ctime,
                                                                                                              int maxItems)
Description copied from interface: ResourceManagerLocal
Gets a list of platforms that were recently added (committed) to inventory.

Specified by:
findRecentlyAddedPlatforms in interface ResourceManagerLocal
ctime - the oldest time (epoch mills) that a platform had to have been added for it to be returned
maxItems - the maximum number of items to return within the timeframe
Returns:
list of all platforms that were added since or at ctime

findRecentlyAddedServers

public List<org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite> findRecentlyAddedServers(org.rhq.core.domain.auth.Subject user,
                                                                                                            long ctime,
                                                                                                            int platformId)
Description copied from interface: ResourceManagerLocal
Gets a list of servers that are children of the given platform that were recently added (committed) to inventory.

Specified by:
findRecentlyAddedServers in interface ResourceManagerLocal
ctime - the oldest time (epoch mills) that a server had to have been added for it to be returned
Returns:
list of all servers (that are children of the given platforms) that were added since or at ctime

getResourceAutoGroup

public org.rhq.core.domain.resource.group.composite.AutoGroupComposite getResourceAutoGroup(org.rhq.core.domain.auth.Subject user,
                                                                                            int resourceId)
Specified by:
getResourceAutoGroup in interface ResourceManagerLocal

findResourcesAutoGroups

public List<org.rhq.core.domain.resource.group.composite.AutoGroupComposite> findResourcesAutoGroups(org.rhq.core.domain.auth.Subject subject,
                                                                                                     int[] resourceIds)
Specified by:
findResourcesAutoGroups in interface ResourceManagerLocal

findChildrenAutoGroups

@NotNull
public List<org.rhq.core.domain.resource.group.composite.AutoGroupComposite> findChildrenAutoGroups(org.rhq.core.domain.auth.Subject user,
                                                                                                            int parentResourceId,
                                                                                                            int[] resourceTypeIds)
Specified by:
findChildrenAutoGroups in interface ResourceManagerLocal

findChildrenAutoGroups

public List<org.rhq.core.domain.resource.group.composite.AutoGroupComposite> findChildrenAutoGroups(org.rhq.core.domain.auth.Subject user,
                                                                                                    int parentResourceId)
Specified by:
findChildrenAutoGroups in interface ResourceManagerLocal

findExplicitResourcesByResourceGroup

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findExplicitResourcesByResourceGroup(org.rhq.core.domain.auth.Subject user,
                                                                                                                     org.rhq.core.domain.resource.group.ResourceGroup group,
                                                                                                                     org.rhq.core.domain.util.PageControl pageControl)
Specified by:
findExplicitResourcesByResourceGroup in interface ResourceManagerLocal

findExplicitResourceIdsByResourceGroup

public List<Integer> findExplicitResourceIdsByResourceGroup(int resourceGroupId)
Specified by:
findExplicitResourceIdsByResourceGroup in interface ResourceManagerLocal

findImplicitResourceIdsByResourceGroup

public List<Integer> findImplicitResourceIdsByResourceGroup(int resourceGroupId)
Specified by:
findImplicitResourceIdsByResourceGroup in interface ResourceManagerLocal

findFlyWeights

public List<org.rhq.core.domain.resource.composite.ResourceIdFlyWeight> findFlyWeights(int[] resourceIds)
Specified by:
findFlyWeights in interface ResourceManagerLocal

findImplicitResourcesByResourceGroup

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findImplicitResourcesByResourceGroup(org.rhq.core.domain.auth.Subject user,
                                                                                                                     org.rhq.core.domain.resource.group.ResourceGroup group,
                                                                                                                     org.rhq.core.domain.util.PageControl pageControl)
Specified by:
findImplicitResourcesByResourceGroup in interface ResourceManagerLocal

findExplicitResourceWithAvailabilityByResourceGroup

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.composite.ResourceWithAvailability> findExplicitResourceWithAvailabilityByResourceGroup(org.rhq.core.domain.auth.Subject subject,
                                                                                                                                                              org.rhq.core.domain.resource.group.ResourceGroup group,
                                                                                                                                                              org.rhq.core.domain.util.PageControl pageControl)
Specified by:
findExplicitResourceWithAvailabilityByResourceGroup in interface ResourceManagerLocal

findImplicitResourceWithAvailabilityByResourceGroup

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.composite.ResourceWithAvailability> findImplicitResourceWithAvailabilityByResourceGroup(org.rhq.core.domain.auth.Subject subject,
                                                                                                                                                              org.rhq.core.domain.resource.group.ResourceGroup group,
                                                                                                                                                              org.rhq.core.domain.util.PageControl pageControl)
Specified by:
findImplicitResourceWithAvailabilityByResourceGroup in interface ResourceManagerLocal

findResourceHealth

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.composite.ResourceHealthComposite> findResourceHealth(org.rhq.core.domain.auth.Subject user,
                                                                                                                            int[] resourceIds,
                                                                                                                            org.rhq.core.domain.util.PageControl pc)
Description copied from interface: ResourceManagerLocal
Gets the "health" of a set of resources, where the health composite gives you the resource's availability status and the number of alerts it has emitted. Note that even though this takes a subject - it is assumed the caller is authorized to see the given resources and no authz checks will be made. This method takes a subject in case, in the future, we decide this implementation needs to perform authz checks.

This method is here to support the favorites portlet in the dashboard, where the favorites are stored as user preferences - and they can't make it into the preferences unless the user had access to see those resources in the first place, hence, no additional authorizations need to be made here.

Specified by:
findResourceHealth in interface ResourceManagerLocal
Returns:
the health information on the resources

findAvailableResourcesForResourceGroup

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findAvailableResourcesForResourceGroup(org.rhq.core.domain.auth.Subject user,
                                                                                                                       int groupId,
                                                                                                                       org.rhq.core.domain.resource.ResourceType type,
                                                                                                                       org.rhq.core.domain.resource.ResourceCategory category,
                                                                                                                       String nameFilter,
                                                                                                                       int[] excludeIds,
                                                                                                                       org.rhq.core.domain.util.PageControl pageControl)
Specified by:
findAvailableResourcesForResourceGroup in interface ResourceManagerLocal

findAvailableResourcesForRepo

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findAvailableResourcesForRepo(org.rhq.core.domain.auth.Subject user,
                                                                                                              int repoId,
                                                                                                              String search,
                                                                                                              org.rhq.core.domain.resource.ResourceCategory category,
                                                                                                              org.rhq.core.domain.util.PageControl pageControl)
Specified by:
findAvailableResourcesForRepo in interface ResourceManagerLocal

findAvailableResourcesForDashboardPortlet

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findAvailableResourcesForDashboardPortlet(org.rhq.core.domain.auth.Subject user,
                                                                                                                          Integer typeId,
                                                                                                                          org.rhq.core.domain.resource.ResourceCategory category,
                                                                                                                          int[] excludeIds,
                                                                                                                          org.rhq.core.domain.util.PageControl pageControl)
Specified by:
findAvailableResourcesForDashboardPortlet in interface ResourceManagerLocal

findResourceByIds

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findResourceByIds(org.rhq.core.domain.auth.Subject subject,
                                                                                                  int[] resourceIds,
                                                                                                  boolean attachParentResource,
                                                                                                  org.rhq.core.domain.util.PageControl pageControl)
Specified by:
findResourceByIds in interface ResourceManagerLocal

getResourceTree

public org.rhq.core.domain.resource.Resource getResourceTree(int rootResourceId,
                                                             boolean recursive)
Specified by:
getResourceTree in interface ResourceManagerLocal

findResourceErrors

@NotNull
public List<org.rhq.core.domain.resource.ResourceError> findResourceErrors(org.rhq.core.domain.auth.Subject user,
                                                                                   int resourceId,
                                                                                   org.rhq.core.domain.resource.ResourceErrorType errorType)
Description copied from interface: ResourceManagerLocal
Returns the errors of the given type that have occurred for the given resource.

Specified by:
findResourceErrors in interface ResourceManagerLocal
Parameters:
user - the user asking to see the errors
resourceId - the resource whose errors are to be returned
errorType - the type of errors to return
Returns:
the list of resource errors

findResourceErrors

@NotNull
public List<org.rhq.core.domain.resource.ResourceError> findResourceErrors(org.rhq.core.domain.auth.Subject user,
                                                                                   int resourceId)
Description copied from interface: ResourceManagerLocal
Returns all the errors that have occurred for the given resource.

Specified by:
findResourceErrors in interface ResourceManagerLocal
Parameters:
user - the user asking to see the errors
resourceId - the resource whose errors are to be returned
Returns:
the list of resource errors

addResourceError

public void addResourceError(org.rhq.core.domain.resource.ResourceError resourceError)
Description copied from interface: ResourceManagerLocal
Indicates an error occurred on a resource. The given error will be associated with the resource found in the error.

Specified by:
addResourceError in interface ResourceManagerLocal
Parameters:
resourceError - encapsulates all information about the error

clearResourceConfigErrorByType

public int clearResourceConfigErrorByType(org.rhq.core.domain.auth.Subject subject,
                                          int resourceId,
                                          org.rhq.core.domain.resource.ResourceErrorType resourceErrorType)
Description copied from interface: ResourceManagerLocal
Clears errors of the given type.

Specified by:
clearResourceConfigErrorByType in interface ResourceManagerLocal
Parameters:
subject - the user that is making the request
resourceId - id of the resource
resourceErrorType - type of error to clear
Returns:
the number of errors that were cleared

clearResourceConfigError

public void clearResourceConfigError(int resourceId)
Description copied from interface: ResourceManagerLocal
Clears errors of type ResourceErrorType.INVALID_PLUGIN_CONFIGURATION

Specified by:
clearResourceConfigError in interface ResourceManagerLocal
Parameters:
resourceId - id of the resource

deleteResourceError

public void deleteResourceError(org.rhq.core.domain.auth.Subject user,
                                int resourceErrorId)
Description copied from interface: ResourceManagerLocal
Deletes the given resource error, effectively removing it from its resource's list of errors. Requires the specified user to possess the MODIFY_RESOURCE permission for the Resource with which the error is associated.

Specified by:
deleteResourceError in interface ResourceManagerLocal
Parameters:
user - the user deleting the resource error
resourceErrorId - identifies the resource error to delete

getResourceStatuses

public Map<Integer,org.rhq.core.domain.resource.InventoryStatus> getResourceStatuses(int rootResourceId,
                                                                                     boolean descendents)
Specified by:
getResourceStatuses in interface ResourceManagerLocal

getPlatform

public org.rhq.core.domain.resource.Resource getPlatform(org.rhq.core.domain.resource.Agent agent)
Description copied from interface: ResourceManagerLocal
Returns the platform Resource associated with the specified Agent.

Specified by:
getPlatform in interface ResourceManagerLocal
Parameters:
agent - an Agent
Returns:
the platform Resource associated with the specified Agent or null if the platform for the agent is not known yet.

getAvailabilitySummary

public org.rhq.core.domain.resource.composite.ResourceAvailabilitySummary getAvailabilitySummary(org.rhq.core.domain.auth.Subject user,
                                                                                                 int resourceId)
Specified by:
getAvailabilitySummary in interface ResourceManagerLocal

findResourcesByAgent

public List<org.rhq.core.domain.resource.flyweight.ResourceFlyweight> findResourcesByAgent(org.rhq.core.domain.auth.Subject user,
                                                                                           int agentId,
                                                                                           org.rhq.core.domain.util.PageControl unlimitedInstance)
Description copied from interface: ResourceManagerLocal
Load the entire list of resources under an agent. Tries to do so in as few queries as possible while prefetching the information necessary to create a tree view of the platform inventory. This includes resource type and subcategory information as well as current availability and structure. This method also returns placeholder "locked" ResourceFlyweight objects for resources that a user should not have visibility to in order to keep the tree a directed graph.

Specified by:
findResourcesByAgent in interface ResourceManagerLocal
Parameters:
user - user accessing the tree
agentId - the agent id of the platform to return inventory for
unlimitedInstance - the filter for the resources
Returns:
the list of all resources on a platform

findResourcesByCompatibleGroup

public List<org.rhq.core.domain.resource.flyweight.ResourceFlyweight> findResourcesByCompatibleGroup(org.rhq.core.domain.auth.Subject user,
                                                                                                     int compatibleGroupId,
                                                                                                     org.rhq.core.domain.util.PageControl pageControl)
Specified by:
findResourcesByCompatibleGroup in interface ResourceManagerLocal

getResource

public org.rhq.core.domain.resource.Resource getResource(org.rhq.core.domain.auth.Subject subject,
                                                         int resourceId)
Description copied from interface: ResourceManagerLocal
#see {@link ResourceManagerRemote#getResource(Subject, int)

Specified by:
getResource in interface ResourceManagerLocal
Specified by:
getResource in interface ResourceManagerRemote
Parameters:
subject - The logged in user's subject.
resourceId - the id of a Resource in inventory.
Returns:
the resource

getLiveResourceAvailability

public org.rhq.core.domain.measurement.ResourceAvailability getLiveResourceAvailability(org.rhq.core.domain.auth.Subject subject,
                                                                                        int resourceId)
Description copied from interface: ResourceManagerLocal
#see {@link ResourceManagerRemote#getLiveResourceAvailability(Subject, int)

Specified by:
getLiveResourceAvailability in interface ResourceManagerLocal
Specified by:
getLiveResourceAvailability in interface ResourceManagerRemote
Parameters:
subject - The logged in user's subject.
resourceId - the id of a Resource in inventory.
Returns:
the resource availability - note that if the encapsulated availability type is null, the resource availability is UNKNOWN.

findResourceLineage

public List<org.rhq.core.domain.resource.Resource> findResourceLineage(org.rhq.core.domain.auth.Subject subject,
                                                                       int resourceId)
Description copied from interface: ResourceManagerLocal
#see {@link ResourceManagerRemote#findResourceLineage(Subject, int)

Specified by:
findResourceLineage in interface ResourceManagerLocal
Specified by:
findResourceLineage in interface ResourceManagerRemote
Parameters:
subject - The logged in user's subject.
resourceId - the id of a Resource in inventory
Returns:
the lineage of the Resource with the specified id

findResourceInstallCounts

public List<org.rhq.core.domain.resource.composite.ResourceInstallCount> findResourceInstallCounts(org.rhq.core.domain.auth.Subject subject,
                                                                                                   boolean groupByVersions)
Specified by:
findResourceInstallCounts in interface ResourceManagerLocal

findResourceComplianceCounts

public List<org.rhq.core.domain.resource.composite.ResourceInstallCount> findResourceComplianceCounts(org.rhq.core.domain.auth.Subject subject)
Specified by:
findResourceComplianceCounts in interface ResourceManagerLocal

findResourceCompositesByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.composite.ResourceComposite> findResourceCompositesByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                                                    org.rhq.core.domain.criteria.ResourceCriteria criteria)
Specified by:
findResourceCompositesByCriteria in interface ResourceManagerLocal

findResourcesByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findResourcesByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                        org.rhq.core.domain.criteria.ResourceCriteria criteria)
Specified by:
findResourcesByCriteria in interface ResourceManagerLocal
Specified by:
findResourcesByCriteria in interface ResourceManagerRemote

getPlaformOfResource

public org.rhq.core.domain.resource.Resource getPlaformOfResource(org.rhq.core.domain.auth.Subject subject,
                                                                  int resourceId)
Specified by:
getPlaformOfResource in interface ResourceManagerLocal

getParentResource

public org.rhq.core.domain.resource.Resource getParentResource(org.rhq.core.domain.auth.Subject subject,
                                                               int resourceId)
Specified by:
getParentResource in interface ResourceManagerLocal
Specified by:
getParentResource in interface ResourceManagerRemote

findChildResources

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findChildResources(org.rhq.core.domain.auth.Subject subject,
                                                                                                   int parentResourceId,
                                                                                                   org.rhq.core.domain.util.PageControl pageControl)
Specified by:
findChildResources in interface ResourceManagerLocal
Specified by:
findChildResources in interface ResourceManagerRemote

disambiguate

public <T> List<org.rhq.core.domain.resource.composite.DisambiguationReport<T>> disambiguate(List<T> results,
                                                                                             org.rhq.core.util.IntExtractor<? super T> extractor,
                                                                                             DisambiguationUpdateStrategy updateStrategy)
Specified by:
disambiguate in interface ResourceManagerLocal
Returns:
the disambiguation result or null on error
See Also:
Disambiguator#disambiguate(List, boolean, IntExtractor, javax.persistence.EntityManager)

updateAncestry

public void updateAncestry(org.rhq.core.domain.auth.Subject subject,
                           int resourceId)
Description copied from interface: ResourceManagerLocal
Update the ancestry for the specified resource and its child lineage.
 The ancestry is recursively defined as:
 
     resourceAncestry=parentResourceResourceTypeId_:_parentResourceId_:_parentResourceName_::_parentResourceAncestry
     
     * note that platform resources have no parent and therefore have a null ancestry
 
 

Specified by:
updateAncestry in interface ResourceManagerLocal

findIdsByTypeIds

public List<Integer> findIdsByTypeIds(List<Integer> resourceTypeIds)
Specified by:
findIdsByTypeIds in interface ResourceManagerLocal

getResourceCount

public Integer getResourceCount(List<Integer> resourceTypeIds)
Specified by:
getResourceCount in interface ResourceManagerLocal


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.