|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.server.resource.ResourceManagerBean
public class ResourceManagerBean
A manager that provides methods for creating, updating, deleting, and querying Resources.
| 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. |
|
|
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 |
|---|
public ResourceManagerBean()
| Method Detail |
|---|
public void createResource(org.rhq.core.domain.auth.Subject user,
org.rhq.core.domain.resource.Resource resource,
int parentId)
throws ResourceAlreadyExistsException
ResourceManagerLocal
createResource 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 parent
ResourceAlreadyExistsException - if an equivalent resource already exists
public org.rhq.core.domain.resource.Resource updateResource(org.rhq.core.domain.auth.Subject user,
org.rhq.core.domain.resource.Resource resource)
ResourceManagerLocal
updateResource in interface ResourceManagerLocalupdateResource in interface ResourceManagerRemoteuser - the user updating the Resourceresource - the Resource to be updated
public List<Integer> uninventoryResources(org.rhq.core.domain.auth.Subject user,
int[] resourceIds)
ResourceManagerLocal
uninventoryResources in interface ResourceManagerLocaluninventoryResources in interface ResourceManagerRemoteuser - the user performing the uninventory actionresourceIds - the ID of the resource to be deleted
resourceIds and
their childrens' IDs
public List<Integer> uninventoryResource(org.rhq.core.domain.auth.Subject user,
int resourceId)
ResourceManagerLocal
uninventoryResource in interface ResourceManagerLocaluser - the user deleting the resourceresourceId - the ID of the resource to be deleted
resourceId and
its children's IDs
public List<Integer> getResourceDescendantsByTypeAndName(org.rhq.core.domain.auth.Subject user,
int resourceId,
Integer resourceTypeId,
String name)
getResourceDescendantsByTypeAndName in interface ResourceManagerLocal
public 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 deleted
public boolean bulkNativeQueryDeleteInNewTransaction(org.rhq.core.domain.auth.Subject subject,
String nativeQueryString,
List<Integer> resourceIds)
bulkNativeQueryDeleteInNewTransaction in interface ResourceManagerLocal
public boolean bulkNamedQueryDeleteInNewTransaction(org.rhq.core.domain.auth.Subject subject,
String namedQuery,
List<Integer> resourceIds)
bulkNamedQueryDeleteInNewTransaction in interface ResourceManagerLocal
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)
ResourceManagerLocal
setResourceStatus 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 set
public 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 ResourceManagerLocal
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)
findResourcesByParentAndType in interface ResourceManagerLocal@Nullable public org.rhq.core.domain.resource.Resource getParentResource(int resourceId)
ResourceManagerLocal
getParentResource in interface ResourceManagerLocalresourceId - the id of a Resource in inventory
public List<Integer> getResourceIdLineage(int resourceId)
getResourceIdLineage in interface ResourceManagerLocalpublic List<org.rhq.core.domain.resource.Resource> getResourceLineage(int resourceId)
ResourceManagerLocal
getResourceLineage in interface ResourceManagerLocalresourceId - the id of a Resource in inventory
public List<org.rhq.core.domain.resource.composite.ResourceLineageComposite> getResourceLineageAndSiblings(org.rhq.core.domain.auth.Subject subject,
int resourceId)
ResourceManagerLocal
getResourceLineageAndSiblings in interface ResourceManagerLocalresourceId - id of resource
public List<org.rhq.core.domain.resource.composite.ResourceLineageComposite> getResourceLineage(org.rhq.core.domain.auth.Subject subject,
int resourceId)
ResourceManagerLocal
getResourceLineage in interface ResourceManagerLocalresourceId - id of resource
public Map<Integer,String> getResourcesAncestry(org.rhq.core.domain.auth.Subject subject,
Integer[] resourceIds,
org.rhq.core.domain.resource.ResourceAncestryFormat format)
ResourceManagerRemote
getResourcesAncestry in interface ResourceManagerLocalgetResourcesAncestry in interface ResourceManagerRemote@NotNull public org.rhq.core.domain.resource.Resource getRootResourceForResource(int resourceId)
ResourceManagerLocal
getRootResourceForResource in interface ResourceManagerLocalresourceId - the resource to find the root parent of
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)
findResourceByParentAndInventoryStatus in interface ResourceManagerLocal
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)
public List<Integer> findChildrenResourceIds(int parentResourceId,
org.rhq.core.domain.resource.InventoryStatus status)
findChildrenResourceIds in interface ResourceManagerLocal
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)
findChildResourcesByCategoryAndInventoryStatus in interface ResourceManagerLocal
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)
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)
ResourceManagerLocal
getResourceCountSummary in interface ResourceManagerLocal
public 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 ResourceManagerLocal
public 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 ResourceManagerLocal
public List<org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite> findRecentlyAddedPlatforms(org.rhq.core.domain.auth.Subject user,
long ctime,
int maxItems)
ResourceManagerLocal
findRecentlyAddedPlatforms 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 timeframe
ctime
public List<org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite> findRecentlyAddedServers(org.rhq.core.domain.auth.Subject user,
long ctime,
int platformId)
ResourceManagerLocal
findRecentlyAddedServers in interface ResourceManagerLocalctime - the oldest time (epoch mills) that a server had to have been added for it to be returned
ctime
public org.rhq.core.domain.resource.group.composite.AutoGroupComposite getResourceAutoGroup(org.rhq.core.domain.auth.Subject user,
int resourceId)
getResourceAutoGroup in interface ResourceManagerLocal
public 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 ResourceManagerLocal
public List<org.rhq.core.domain.resource.group.composite.AutoGroupComposite> findChildrenAutoGroups(org.rhq.core.domain.auth.Subject user,
int parentResourceId)
findChildrenAutoGroups in interface ResourceManagerLocal
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)
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 ResourceManagerLocal
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)
findImplicitResourcesByResourceGroup in interface ResourceManagerLocal
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)
findExplicitResourceWithAvailabilityByResourceGroup in interface ResourceManagerLocal
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)
findImplicitResourceWithAvailabilityByResourceGroup in interface ResourceManagerLocal
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)
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 ResourceManagerLocal
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)
findAvailableResourcesForResourceGroup in interface ResourceManagerLocal
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)
findAvailableResourcesForRepo in interface ResourceManagerLocal
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)
findAvailableResourcesForDashboardPortlet in interface ResourceManagerLocal
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)
findResourceByIds in interface ResourceManagerLocal
public 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)
ResourceManagerLocal
findResourceErrors 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)
ResourceManagerLocal
findResourceErrors in interface ResourceManagerLocaluser - the user asking to see the errorsresourceId - the resource whose errors are to be returned
public void addResourceError(org.rhq.core.domain.resource.ResourceError resourceError)
ResourceManagerLocal
addResourceError in interface ResourceManagerLocalresourceError - encapsulates all information about the error
public int clearResourceConfigErrorByType(org.rhq.core.domain.auth.Subject subject,
int resourceId,
org.rhq.core.domain.resource.ResourceErrorType resourceErrorType)
ResourceManagerLocal
clearResourceConfigErrorByType in interface ResourceManagerLocalsubject - the user that is making the requestresourceId - id of the resourceresourceErrorType - type of error to clear
public void clearResourceConfigError(int resourceId)
ResourceManagerLocalResourceErrorType.INVALID_PLUGIN_CONFIGURATION
clearResourceConfigError in interface ResourceManagerLocalresourceId - id of the resource
public 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 delete
public 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)
ResourceManagerLocal
getPlatform in interface ResourceManagerLocalagent - an Agent
public org.rhq.core.domain.resource.composite.ResourceAvailabilitySummary getAvailabilitySummary(org.rhq.core.domain.auth.Subject user,
int resourceId)
getAvailabilitySummary in interface ResourceManagerLocal
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)
ResourceManagerLocal
findResourcesByAgent in interface ResourceManagerLocaluser - user accessing the treeagentId - the agent id of the platform to return inventory forunlimitedInstance - the filter for the resources
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)
findResourcesByCompatibleGroup in interface ResourceManagerLocal
public org.rhq.core.domain.resource.Resource getResource(org.rhq.core.domain.auth.Subject subject,
int resourceId)
ResourceManagerLocal
getResource 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)
ResourceManagerLocal
getLiveResourceAvailability 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.
public List<org.rhq.core.domain.resource.Resource> findResourceLineage(org.rhq.core.domain.auth.Subject subject,
int resourceId)
ResourceManagerLocal
findResourceLineage in interface ResourceManagerLocalfindResourceLineage in interface ResourceManagerRemotesubject - The logged in user's subject.resourceId - the id of a Resource in inventory
public 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 ResourceManagerLocal
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)
findResourceCompositesByCriteria in interface ResourceManagerLocal
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)
findResourcesByCriteria in interface ResourceManagerLocalfindResourcesByCriteria in interface ResourceManagerRemote
public org.rhq.core.domain.resource.Resource getPlaformOfResource(org.rhq.core.domain.auth.Subject subject,
int resourceId)
getPlaformOfResource in interface ResourceManagerLocal
public org.rhq.core.domain.resource.Resource getParentResource(org.rhq.core.domain.auth.Subject subject,
int resourceId)
getParentResource in interface ResourceManagerLocalgetParentResource in interface ResourceManagerRemote
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)
findChildResources in interface ResourceManagerLocalfindChildResources in interface ResourceManagerRemote
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)
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 ResourceManagerLocal
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||