public class ResourceManagerBean extends Object implements ResourceManagerLocal, ResourceManagerRemote
Resources.| Constructor and Description |
|---|
ResourceManagerBean() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
List<Integer> |
disableResources(org.rhq.core.domain.auth.Subject subject,
int[] resourceIds)
Set these resources to
AvailabilityType.DISABLED. |
<T> List<org.rhq.core.domain.resource.composite.DisambiguationReport<T>> |
disambiguate(List<T> results,
org.rhq.core.util.IntExtractor<? super T> extractor,
DisambiguationUpdateStrategy updateStrategy) |
List<Integer> |
enableResources(org.rhq.core.domain.auth.Subject subject,
int[] resourceIds)
Set these resources enabled.
|
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.Resource> |
findResourcesByCriteriaBounded(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.ResourceCriteria criteria,
int maxResources,
int maxResourcesByType)
This method exists to support the GUI resource tree, by not returning an unlimited number of resources
but instead bounding the returned size.
|
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)
Returns a summary object that provides information about a resource's
past availability history.
|
Map<org.rhq.core.domain.resource.Agent,org.rhq.core.domain.discovery.AvailabilityReport> |
getDisableResourcesReportInNewTransaction(org.rhq.core.domain.auth.Subject subject,
int[] resourceIds,
List<Integer> disableResourceIds) |
Map<org.rhq.core.domain.resource.Agent,org.rhq.core.domain.discovery.AvailabilityReport> |
getEnableResourcesReportInNewTransaction(org.rhq.core.domain.auth.Subject subject,
int[] resourceIds,
List<Integer> enableResourceIds) |
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 uninventory 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> |
uninventoryResourceInNewTransaction(int resourceId)
Internal use only.
|
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).
|
public void createResource(org.rhq.core.domain.auth.Subject user,
org.rhq.core.domain.resource.Resource resource,
int parentId)
throws ResourceAlreadyExistsException
ResourceManagerLocalcreateResource in interface ResourceManagerLocaluser - the user creating the resourceresource - the resource to be createdparentId - set to -1 to imply that this is a root resource, which has no parentResourceAlreadyExistsException - if an equivalent resource already existspublic org.rhq.core.domain.resource.Resource updateResource(org.rhq.core.domain.auth.Subject user,
org.rhq.core.domain.resource.Resource resource)
ResourceManagerLocalupdateResource in interface ResourceManagerLocalupdateResource in interface ResourceManagerRemoteuser - the user updating the Resourceresource - the Resource to be updatedpublic List<Integer> uninventoryResources(org.rhq.core.domain.auth.Subject user, int[] resourceIds)
ResourceManagerLocaluninventoryResources in interface ResourceManagerLocaluninventoryResources in interface ResourceManagerRemoteuser - the user performing the uninventory actionresourceIds - the ID of the resource to be deletedresourceIds and
their childrens' IDspublic List<Integer> uninventoryResource(org.rhq.core.domain.auth.Subject user, int resourceId)
ResourceManagerLocaluninventoryResource in interface ResourceManagerLocaluser - the user deleting the resourceresourceId - the ID of the resource to be deletedresourceId and
its children's IDspublic List<Integer> uninventoryResourceInNewTransaction(int resourceId)
ResourceManagerLocaluninventoryResourceInNewTransaction in interface ResourceManagerLocalpublic List<Integer> getResourceDescendantsByTypeAndName(org.rhq.core.domain.auth.Subject user, int resourceId, Integer resourceTypeId, String name)
getResourceDescendantsByTypeAndName in interface ResourceManagerLocalpublic void uninventoryResourceAsyncWork(org.rhq.core.domain.auth.Subject user,
int resourceId)
ResourceManagerLocalResourceManagerLocal.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.uninventoryResourceAsyncWork in interface ResourceManagerLocaluser - the user deleting the resourceresourceId - the ID of the resource to be deletedpublic boolean bulkNativeQueryDeleteInNewTransaction(org.rhq.core.domain.auth.Subject subject,
String nativeQueryString,
List<Integer> resourceIds)
bulkNativeQueryDeleteInNewTransaction in interface ResourceManagerLocalpublic boolean bulkNamedQueryDeleteInNewTransaction(org.rhq.core.domain.auth.Subject subject,
String namedQuery,
List<Integer> resourceIds)
bulkNamedQueryDeleteInNewTransaction in interface ResourceManagerLocalpublic 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)
ResourceManagerLocalsetResourceStatus in interface ResourceManagerLocaluser - user doing the resource status changingresource - the Resource to changenewStatus - the new status to change it tosetDescendents - if true, all descendent resources will also have their status setpublic org.rhq.core.domain.resource.Resource getResourceById(org.rhq.core.domain.auth.Subject user,
int resourceId)
getResourceById in interface ResourceManagerLocal@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)
getResourceByParentAndKey in interface ResourceManagerLocalpublic 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)
findResourcesByParentAndType in interface ResourceManagerLocal@Nullable public org.rhq.core.domain.resource.Resource getParentResource(int resourceId)
ResourceManagerLocalgetParentResource in interface ResourceManagerLocalresourceId - the id of a Resource in inventorypublic List<Integer> getResourceIdLineage(int resourceId)
getResourceIdLineage in interface ResourceManagerLocalpublic List<org.rhq.core.domain.resource.Resource> getResourceLineage(int resourceId)
ResourceManagerLocalgetResourceLineage in interface ResourceManagerLocalresourceId - the id of a Resource in inventorypublic List<org.rhq.core.domain.resource.composite.ResourceLineageComposite> getResourceLineageAndSiblings(org.rhq.core.domain.auth.Subject subject, int resourceId)
ResourceManagerLocalgetResourceLineageAndSiblings in interface ResourceManagerLocalresourceId - id of resourcepublic List<org.rhq.core.domain.resource.composite.ResourceLineageComposite> getResourceLineage(org.rhq.core.domain.auth.Subject subject, int resourceId)
ResourceManagerLocalgetResourceLineage in interface ResourceManagerLocalresourceId - id of resourcepublic Map<Integer,String> getResourcesAncestry(org.rhq.core.domain.auth.Subject subject, Integer[] resourceIds, org.rhq.core.domain.resource.ResourceAncestryFormat format)
ResourceManagerRemotegetResourcesAncestry in interface ResourceManagerLocalgetResourcesAncestry in interface ResourceManagerRemote@NotNull public org.rhq.core.domain.resource.Resource getRootResourceForResource(int resourceId)
ResourceManagerLocalgetRootResourceForResource in interface ResourceManagerLocalresourceId - the resource to find the root parent ofpublic 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)
findResourceByParentAndInventoryStatus in interface ResourceManagerLocalpublic 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)
public List<Integer> findChildrenResourceIds(int parentResourceId, org.rhq.core.domain.resource.InventoryStatus status)
findChildrenResourceIds in interface ResourceManagerLocalpublic 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)
findChildResourcesByCategoryAndInventoryStatus in interface ResourceManagerLocalpublic 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)
findResourcesByCategory in interface ResourceManagerLocalResourceManagerRemote#findResourcesByCategory(Subject, ResourceCategory, InventoryStatus, PageControl)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)
findResourceComposites in interface ResourceManagerLocaluser - category - Limit the search to a given ResourceCategorytypeName - Limit the search to to ResourceType(s) with the given namepluginName - Limit the search to the plugin with the given nameparentResource - Limit the search to children of a given parent resourcesearchString - pageControl - ResourceManagerRemote#findResourceComposites(Subject, ResourceCategory, String, int, String, PageControl)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)
findResourceCompositeForParentAndTypeAndCategory in interface ResourceManagerLocaluser - User executing the querycategory - Category this query should be limited toresourceTypeId - the PK of the desired resource type or -1 if no limitparentResource - the desired parent resource or null if no limitpageControl - 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)
public int[] getResourceCountSummary(org.rhq.core.domain.auth.Subject user,
org.rhq.core.domain.resource.InventoryStatus status)
ResourceManagerLocalgetResourceCountSummary in interface ResourceManagerLocalpublic int getResourceCountByCategory(org.rhq.core.domain.auth.Subject user,
org.rhq.core.domain.resource.ResourceCategory category,
org.rhq.core.domain.resource.InventoryStatus status)
getResourceCountByCategory in interface ResourceManagerLocalpublic int getResourceCountByTypeAndIds(org.rhq.core.domain.auth.Subject user,
org.rhq.core.domain.resource.ResourceType type,
int[] resourceIds)
getResourceCountByTypeAndIds in interface ResourceManagerLocalpublic List<Integer> findResourcesMarkedForAsyncDeletion(org.rhq.core.domain.auth.Subject user)
findResourcesMarkedForAsyncDeletion in interface ResourceManagerLocalpublic List<org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite> findRecentlyAddedPlatforms(org.rhq.core.domain.auth.Subject user, long ctime, int maxItems)
ResourceManagerLocalfindRecentlyAddedPlatforms in interface ResourceManagerLocalctime - the oldest time (epoch mills) that a platform had to have been added for it to be returnedmaxItems - the maximum number of items to return within the timeframectimepublic List<org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite> findRecentlyAddedServers(org.rhq.core.domain.auth.Subject user, long ctime, int platformId)
ResourceManagerLocalfindRecentlyAddedServers in interface ResourceManagerLocalctime - the oldest time (epoch mills) that a server had to have been added for it to be returned
ctimepublic org.rhq.core.domain.resource.group.composite.AutoGroupComposite getResourceAutoGroup(org.rhq.core.domain.auth.Subject user,
int resourceId)
getResourceAutoGroup in interface ResourceManagerLocalpublic List<org.rhq.core.domain.resource.group.composite.AutoGroupComposite> findResourcesAutoGroups(org.rhq.core.domain.auth.Subject subject, int[] resourceIds)
findResourcesAutoGroups in interface ResourceManagerLocal@NotNull public List<org.rhq.core.domain.resource.group.composite.AutoGroupComposite> findChildrenAutoGroups(org.rhq.core.domain.auth.Subject user, int parentResourceId, int[] resourceTypeIds)
findChildrenAutoGroups in interface ResourceManagerLocalpublic List<org.rhq.core.domain.resource.group.composite.AutoGroupComposite> findChildrenAutoGroups(org.rhq.core.domain.auth.Subject user, int parentResourceId)
findChildrenAutoGroups in interface ResourceManagerLocalpublic 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)
findExplicitResourcesByResourceGroup in interface ResourceManagerLocalpublic List<Integer> findExplicitResourceIdsByResourceGroup(int resourceGroupId)
findExplicitResourceIdsByResourceGroup in interface ResourceManagerLocalpublic List<Integer> findImplicitResourceIdsByResourceGroup(int resourceGroupId)
findImplicitResourceIdsByResourceGroup in interface ResourceManagerLocalpublic List<org.rhq.core.domain.resource.composite.ResourceIdFlyWeight> findFlyWeights(int[] resourceIds)
findFlyWeights in interface ResourceManagerLocalpublic 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)
findImplicitResourcesByResourceGroup in interface ResourceManagerLocalpublic 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)
findExplicitResourceWithAvailabilityByResourceGroup in interface ResourceManagerLocalpublic 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)
findImplicitResourceWithAvailabilityByResourceGroup in interface ResourceManagerLocalpublic 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)
ResourceManagerLocalThis 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.
findResourceHealth in interface ResourceManagerLocalpublic 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)
findAvailableResourcesForResourceGroup in interface ResourceManagerLocalpublic 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)
findAvailableResourcesForRepo in interface ResourceManagerLocalpublic 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)
findAvailableResourcesForDashboardPortlet in interface ResourceManagerLocalpublic 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)
findResourceByIds in interface ResourceManagerLocalpublic org.rhq.core.domain.resource.Resource getResourceTree(int rootResourceId,
boolean recursive)
getResourceTree in interface ResourceManagerLocal@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)
ResourceManagerLocalfindResourceErrors in interface ResourceManagerLocaluser - the user asking to see the errorsresourceId - the resource whose errors are to be returnederrorType - the type of errors to return@NotNull public List<org.rhq.core.domain.resource.ResourceError> findResourceErrors(org.rhq.core.domain.auth.Subject user, int resourceId)
ResourceManagerLocalfindResourceErrors in interface ResourceManagerLocaluser - the user asking to see the errorsresourceId - the resource whose errors are to be returnedpublic void addResourceError(org.rhq.core.domain.resource.ResourceError resourceError)
ResourceManagerLocaladdResourceError in interface ResourceManagerLocalresourceError - encapsulates all information about the errorpublic int clearResourceConfigErrorByType(org.rhq.core.domain.auth.Subject subject,
int resourceId,
org.rhq.core.domain.resource.ResourceErrorType resourceErrorType)
ResourceManagerLocalclearResourceConfigErrorByType in interface ResourceManagerLocalsubject - the user that is making the requestresourceId - id of the resourceresourceErrorType - type of error to clearpublic void clearResourceConfigError(int resourceId)
ResourceManagerLocalResourceErrorType.INVALID_PLUGIN_CONFIGURATIONclearResourceConfigError in interface ResourceManagerLocalresourceId - id of the resourcepublic void deleteResourceError(org.rhq.core.domain.auth.Subject user,
int resourceErrorId)
ResourceManagerLocalMODIFY_RESOURCE
permission for the Resource with which the error is associated.deleteResourceError in interface ResourceManagerLocaluser - the user deleting the resource errorresourceErrorId - identifies the resource error to deletepublic Map<Integer,org.rhq.core.domain.resource.InventoryStatus> getResourceStatuses(int rootResourceId, boolean descendents)
getResourceStatuses in interface ResourceManagerLocalpublic org.rhq.core.domain.resource.Resource getPlatform(org.rhq.core.domain.resource.Agent agent)
ResourceManagerLocalgetPlatform in interface ResourceManagerLocalagent - an Agentpublic org.rhq.core.domain.resource.composite.ResourceAvailabilitySummary getAvailabilitySummary(org.rhq.core.domain.auth.Subject user,
int resourceId)
ResourceManagerRemotegetAvailabilitySummary in interface ResourceManagerLocalgetAvailabilitySummary in interface ResourceManagerRemotepublic 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)
ResourceManagerLocalfindResourcesByAgent in interface ResourceManagerLocaluser - user accessing the treeagentId - the agent id of the platform to return inventory forunlimitedInstance - the filter for the resourcespublic 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)
findResourcesByCompatibleGroup in interface ResourceManagerLocalpublic org.rhq.core.domain.resource.Resource getResource(org.rhq.core.domain.auth.Subject subject,
int resourceId)
ResourceManagerLocalgetResource in interface ResourceManagerLocalgetResource in interface ResourceManagerRemotesubject - The logged in user's subject.resourceId - the id of a Resource in inventory.public org.rhq.core.domain.measurement.ResourceAvailability getLiveResourceAvailability(org.rhq.core.domain.auth.Subject subject,
int resourceId)
ResourceManagerLocalgetLiveResourceAvailability in interface ResourceManagerLocalgetLiveResourceAvailability in interface ResourceManagerRemotesubject - The logged in user's subject.resourceId - the id of a Resource in inventory.null,
the resource availability is UNKNOWN. As of RHQ 4.4 this does not return null but rather
AvailabilityType.UNKNOWN.public List<org.rhq.core.domain.resource.Resource> findResourceLineage(org.rhq.core.domain.auth.Subject subject, int resourceId)
ResourceManagerLocalfindResourceLineage in interface ResourceManagerLocalfindResourceLineage in interface ResourceManagerRemotesubject - The logged in user's subject.resourceId - the id of a Resource in inventorypublic List<org.rhq.core.domain.resource.composite.ResourceInstallCount> findResourceInstallCounts(org.rhq.core.domain.auth.Subject subject, boolean groupByVersions)
findResourceInstallCounts in interface ResourceManagerLocalpublic List<org.rhq.core.domain.resource.composite.ResourceInstallCount> findResourceComplianceCounts(org.rhq.core.domain.auth.Subject subject)
findResourceComplianceCounts in interface ResourceManagerLocalpublic 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)
findResourceCompositesByCriteria in interface ResourceManagerLocalpublic 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)
findResourcesByCriteria in interface ResourceManagerLocalfindResourcesByCriteria in interface ResourceManagerRemotepublic List<org.rhq.core.domain.resource.Resource> findResourcesByCriteriaBounded(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.ResourceCriteria criteria, int maxResources, int maxResourcesByType)
ResourceManagerLocalfindResourcesByCriteriaBounded in interface ResourceManagerLocalmaxResources - Will not return more than this number of resources. If the original fetch exceeds maxResources
then maxResourcesByType will be enforced. If, after trimming by type, maxResources is still exceeded, then the least
significant resources (the tail, assuming a sorted set) will be removed to enforce the limit. If <=0 the default
will be used.maxResourcesByType - If maxResources is exceeded by the initial result set then members of each type will be
trimmed down to meet this limit. If <=0 the default will be used.public org.rhq.core.domain.resource.Resource getPlaformOfResource(org.rhq.core.domain.auth.Subject subject,
int resourceId)
getPlaformOfResource in interface ResourceManagerLocalpublic org.rhq.core.domain.resource.Resource getParentResource(org.rhq.core.domain.auth.Subject subject,
int resourceId)
getParentResource in interface ResourceManagerLocalgetParentResource in interface ResourceManagerRemotepublic 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)
findChildResources in interface ResourceManagerLocalfindChildResources in interface ResourceManagerRemotepublic <T> List<org.rhq.core.domain.resource.composite.DisambiguationReport<T>> disambiguate(List<T> results, org.rhq.core.util.IntExtractor<? super T> extractor, DisambiguationUpdateStrategy updateStrategy)
disambiguate in interface ResourceManagerLocalDisambiguator#disambiguate(List, boolean, IntExtractor, javax.persistence.EntityManager)public void updateAncestry(org.rhq.core.domain.auth.Subject subject,
int resourceId)
ResourceManagerLocal
The ancestry is recursively defined as:
resourceAncestry=parentResourceResourceTypeId_:_parentResourceId_:_parentResourceName_::_parentResourceAncestry
* note that platform resources have no parent and therefore have a null ancestry
updateAncestry in interface ResourceManagerLocalpublic List<Integer> findIdsByTypeIds(List<Integer> resourceTypeIds)
findIdsByTypeIds in interface ResourceManagerLocalpublic Integer getResourceCount(List<Integer> resourceTypeIds)
getResourceCount in interface ResourceManagerLocalpublic List<Integer> disableResources(org.rhq.core.domain.auth.Subject subject, int[] resourceIds)
ResourceManagerRemoteAvailabilityType.DISABLED. While disabled resource availability reported
from the agent is ignored. This is typically used for resources undergoing scheduled maintenance or
whose avail state should be disregarded fo some period.
Permission.DELETE permission on all of the provided resources.
disableResources in interface ResourceManagerLocaldisableResources in interface ResourceManagerRemotesubject - The logged in user's subject.resourceIds - The resources to uninventory.ResourceManagerRemote.enableResources(Subject, int[])public Map<org.rhq.core.domain.resource.Agent,org.rhq.core.domain.discovery.AvailabilityReport> getDisableResourcesReportInNewTransaction(org.rhq.core.domain.auth.Subject subject, int[] resourceIds, List<Integer> disableResourceIds)
getDisableResourcesReportInNewTransaction in interface ResourceManagerLocalpublic List<Integer> enableResources(org.rhq.core.domain.auth.Subject subject, int[] resourceIds)
ResourceManagerRemotePermission.DELETE permission on all of the provided resources.enableResources in interface ResourceManagerLocalenableResources in interface ResourceManagerRemotesubject - The logged in user's subject.resourceIds - The resources to uninventory.ResourceManagerRemote.disableResources(Subject, int[])public Map<org.rhq.core.domain.resource.Agent,org.rhq.core.domain.discovery.AvailabilityReport> getEnableResourcesReportInNewTransaction(org.rhq.core.domain.auth.Subject subject, int[] resourceIds, List<Integer> enableResourceIds)
getEnableResourcesReportInNewTransaction in interface ResourceManagerLocalCopyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.