public interface ResourceManagerLocal extends ResourceManagerRemote
Resources.| 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.
|
<T> List<org.rhq.core.domain.resource.composite.DisambiguationReport<T>> |
disambiguate(List<T> results,
org.rhq.core.util.IntExtractor<? super T> resourceIdExtractor,
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> |
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 subject,
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) |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> |
findGroupMemberCandidateResources(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.ResourceCriteria criteria,
int[] alreadySelectedResourceIds) |
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 status,
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) |
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.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 pageControl)
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) |
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) |
List<Integer> |
findResourcesMarkedForAsyncDeletion(org.rhq.core.domain.auth.Subject user) |
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.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 |
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.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,org.rhq.core.domain.resource.InventoryStatus> |
getResourceStatuses(int rootResourceId,
boolean descendants) |
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.
|
boolean |
handleMissingResourceInNewTransaction(int resourceId)
Internal use only.
|
int |
removeResourceErrorDuplicates()
INTERNAL.
|
int |
removeStaleAvailabilityResourceErrors()
INTERNAL.
|
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 setDescendants)
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.
|
void |
unlinkStorageNodesInNewTx(List<Integer> resourceIds) |
void |
updateAncestry(org.rhq.core.domain.auth.Subject subject,
int resourceId)
Update the ancestry for the specified resource and its child lineage.
|
disableResources, enableResources, findChildResources, findResourceLineage, findResourcesByCriteria, getAvailabilitySummary, getLiveResourceAvailability, getParentResource, getResource, getResourcesAncestry, uninventoryAllResourcesByAgent, uninventoryResources, uninventoryResourcesOfResourceType, updateResourcevoid createResource(org.rhq.core.domain.auth.Subject user,
org.rhq.core.domain.resource.Resource resource,
int parentId)
throws ResourceAlreadyExistsException
user - 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 existsList<Integer> uninventoryResource(org.rhq.core.domain.auth.Subject user, int resourceId)
user - the user deleting the resourceresourceId - the ID of the resource to be deletedresourceId and
its children's IDsboolean handleMissingResourceInNewTransaction(int resourceId)
resourceId - List<Integer> uninventoryResourceInNewTransaction(int resourceId)
resourceId - void uninventoryResourceAsyncWork(org.rhq.core.domain.auth.Subject user,
int resourceId)
uninventoryResource(Subject, int). If you call this
method, make sure you have a specific reason for it; check to see if calling
uninventoryResource(Subject, int) would not be more appropriate.user - the user deleting the resourceresourceId - the ID of the resource to be deletedboolean bulkNativeQueryDeleteInNewTransaction(org.rhq.core.domain.auth.Subject subject,
String nativeQueryString,
List<Integer> resourceIds)
boolean bulkNamedQueryDeleteInNewTransaction(org.rhq.core.domain.auth.Subject subject,
String namedQuery,
List<Integer> resourceIds)
List<Integer> getResourceDescendantsByTypeAndName(org.rhq.core.domain.auth.Subject user, int resourceId, Integer resourceTypeId, String name)
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 setDescendants)
user - user doing the resource status changingresource - the Resource to changenewStatus - the new status to change it tosetDescendants - if true, all descendent resources will also have their status set@NotNull
org.rhq.core.domain.resource.Resource getResourceById(org.rhq.core.domain.auth.Subject user,
int resourceId)
user - resourceId - ResourceNotFoundException - if not found. Note, this is an ApplicationException.@Nullable org.rhq.core.domain.resource.Resource getParentResource(int resourceId)
resourceId - the id of a Resource in inventory@NotNull List<org.rhq.core.domain.resource.Resource> getResourceLineage(int resourceId)
resourceId - the id of a Resource in inventoryList<org.rhq.core.domain.resource.composite.ResourceLineageComposite> getResourceLineage(org.rhq.core.domain.auth.Subject subject, int resourceId)
resourceId - id of resourceList<org.rhq.core.domain.resource.composite.ResourceLineageComposite> getResourceLineageAndSiblings(org.rhq.core.domain.auth.Subject subject, int resourceId)
resourceId - id of resource@NotNull org.rhq.core.domain.resource.Resource getRootResourceForResource(int resourceId)
resourceId - the resource to find the root parent of@Nullable
org.rhq.core.domain.resource.Resource getResourceByParentAndKey(org.rhq.core.domain.auth.Subject user,
@Nullable
org.rhq.core.domain.resource.Resource parent,
String key,
String plugin,
String typeName)
user - parent - key - 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 status,
org.rhq.core.domain.util.PageControl pageControl)
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)
List<Integer> findChildrenResourceIds(int parentResourceId, org.rhq.core.domain.resource.InventoryStatus status)
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)
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)
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)
int[] getResourceCountSummary(org.rhq.core.domain.auth.Subject user,
org.rhq.core.domain.resource.InventoryStatus status)
user - status - 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)
List<Integer> findResourcesMarkedForAsyncDeletion(org.rhq.core.domain.auth.Subject user)
List<org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite> findRecentlyAddedPlatforms(org.rhq.core.domain.auth.Subject user, long ctime, int maxItems)
user - ctime - 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 timeframectimeList<org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite> findRecentlyAddedServers(org.rhq.core.domain.auth.Subject user, long ctime, int platformId)
user - ctime - the oldest time (epoch mills) that a server had to have been added for it to be returned
ctimeList<Integer> findExplicitResourceIdsByResourceGroup(int resourceGroupId)
List<Integer> findImplicitResourceIdsByResourceGroup(int resourceGroupId)
List<org.rhq.core.domain.resource.composite.ResourceIdFlyWeight> findFlyWeights(int[] resourceIds)
org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findExplicitResourcesByResourceGroup(org.rhq.core.domain.auth.Subject subject,
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.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> findExplicitResourceWithAvailabilityByResourceGroup(org.rhq.core.domain.auth.Subject subject,
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)
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)
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> 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> findResourceByIds(org.rhq.core.domain.auth.Subject subject,
int[] resourceIds,
boolean attachParentResource,
org.rhq.core.domain.util.PageControl pageControl)
org.rhq.core.domain.resource.Resource getResourceTree(int rootResourceId,
boolean recursive)
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)
user - 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 - @NotNull List<org.rhq.core.domain.resource.ResourceError> findResourceErrors(org.rhq.core.domain.auth.Subject user, int resourceId, org.rhq.core.domain.resource.ResourceErrorType errorType)
user - the user asking to see the errorsresourceId - the resource whose errors are to be returnederrorType - the type of errors to return@NotNull List<org.rhq.core.domain.resource.ResourceError> findResourceErrors(org.rhq.core.domain.auth.Subject user, int resourceId)
user - the user asking to see the errorsresourceId - the resource whose errors are to be returnedvoid addResourceError(org.rhq.core.domain.resource.ResourceError resourceError)
resourceError - encapsulates all information about the errorvoid deleteResourceError(org.rhq.core.domain.auth.Subject user,
int resourceErrorId)
MODIFY_RESOURCE
permission for the Resource with which the error is associated.user - the user deleting the resource errorresourceErrorId - identifies the resource error to deleteList<org.rhq.core.domain.resource.group.composite.AutoGroupComposite> findChildrenAutoGroups(org.rhq.core.domain.auth.Subject user, int parentResourceId)
@NotNull List<org.rhq.core.domain.resource.group.composite.AutoGroupComposite> findChildrenAutoGroups(org.rhq.core.domain.auth.Subject user, int parentResourceId, int[] resourceTypeIds)
org.rhq.core.domain.resource.group.composite.AutoGroupComposite getResourceAutoGroup(org.rhq.core.domain.auth.Subject user,
int resourceId)
int removeResourceErrorDuplicates()
int removeStaleAvailabilityResourceErrors()
Map<Integer,org.rhq.core.domain.resource.InventoryStatus> getResourceStatuses(int rootResourceId, boolean descendants)
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)
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.
user - resourceIds - pc - List<org.rhq.core.domain.resource.group.composite.AutoGroupComposite> findResourcesAutoGroups(org.rhq.core.domain.auth.Subject subject, int[] resourceIds)
void clearResourceConfigError(int resourceId)
ResourceErrorType.INVALID_PLUGIN_CONFIGURATIONresourceId - id of the resourceint clearResourceConfigErrorByType(org.rhq.core.domain.auth.Subject subject,
int resourceId,
org.rhq.core.domain.resource.ResourceErrorType resourceErrorType)
subject - the user that is making the requestresourceId - id of the resourceresourceErrorType - type of error to clearorg.rhq.core.domain.resource.Resource getPlatform(org.rhq.core.domain.resource.Agent agent)
agent - an AgentList<org.rhq.core.domain.resource.flyweight.ResourceFlyweight> findResourcesByAgent(org.rhq.core.domain.auth.Subject user, int agentId, org.rhq.core.domain.util.PageControl pageControl)
user - user accessing the treeagentId - the agent id of the platform to return inventory forpageControl - the filter for the resourcesList<org.rhq.core.domain.resource.flyweight.ResourceFlyweight> findResourcesByCompatibleGroup(org.rhq.core.domain.auth.Subject user, int compatibleGroupId, org.rhq.core.domain.util.PageControl pageControl)
void updateAncestry(org.rhq.core.domain.auth.Subject subject,
int resourceId)
The ancestry is recursively defined as:
resourceAncestry=parentResourceResourceTypeId_:_parentResourceId_:_parentResourceName_::_parentResourceAncestry
* note that platform resources have no parent and therefore have a null ancestry
subject - resourceId - 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)
subject - criteria - maxResources - 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.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)
List<org.rhq.core.domain.resource.composite.ResourceInstallCount> findResourceComplianceCounts(org.rhq.core.domain.auth.Subject subject)
List<org.rhq.core.domain.resource.composite.ResourceInstallCount> findResourceInstallCounts(org.rhq.core.domain.auth.Subject subject, boolean groupByVersions)
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)
org.rhq.core.domain.resource.Resource getPlaformOfResource(org.rhq.core.domain.auth.Subject subject,
int resourceId)
<T> List<org.rhq.core.domain.resource.composite.DisambiguationReport<T>> disambiguate(List<T> results, org.rhq.core.util.IntExtractor<? super T> resourceIdExtractor, DisambiguationUpdateStrategy updateStrategy)
org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findGroupMemberCandidateResources(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.ResourceCriteria criteria,
int[] alreadySelectedResourceIds)
Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.