org.rhq.enterprise.server.inventory
Class InventoryManagerBean

java.lang.Object
  extended by org.rhq.enterprise.server.inventory.InventoryManagerBean
All Implemented Interfaces:
InventoryManagerLocal

public class InventoryManagerBean
extends Object
implements InventoryManagerLocal

This API could not be added directly ResourceTypeManagerBean because it would create a circular dependency with ResourceManagerBean, resulting in a deployment failure.


Constructor Summary
InventoryManagerBean()
           
 
Method Summary
 List<org.rhq.core.domain.resource.ResourceType> getDeletedTypes()
           
 boolean isReadyForPermanentRemoval(org.rhq.core.domain.resource.ResourceType resourceType)
          Determines whether or not a resource type is ready to be permanently removed from the database.
 int markTypesDeleted(List<Integer> resourceTypeIds)
          Marks the specified resource types, including all of their child types, for deletion by setting the deleted flag on each one.
 void purgeDeletedResourceType(org.rhq.core.domain.resource.ResourceType resourceType)
          Permanently removes the resource type from the database along with all associated meta data such as metric definitions, operation definitions, and resource configuration definitions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InventoryManagerBean

public InventoryManagerBean()
Method Detail

markTypesDeleted

public int markTypesDeleted(List<Integer> resourceTypeIds)
Description copied from interface: InventoryManagerLocal
Marks the specified resource types, including all of their child types, for deletion by setting the deleted flag on each one. All resources of the affected types are removed from inventory as well. Marking a resource type for deletion will effectively result in the resource type and all of its associated meta data being removed from the system. That meta data includes metric definitions, operation definitions, resource configuration definitions, plugin configuration definitions, event definitions, etc. Note that this method only markes the resource types and their resources for deletion. The actual deletion is carried out by asynchronously by a scheduled job.

Specified by:
markTypesDeleted in interface InventoryManagerLocal
Parameters:
resourceTypeIds - The ids of the resource types to delete
Returns:
The number of types marked for deletion.

getDeletedTypes

public List<org.rhq.core.domain.resource.ResourceType> getDeletedTypes()
Specified by:
getDeletedTypes in interface InventoryManagerLocal
Returns:
A list of all resource types that are marked for deletion

isReadyForPermanentRemoval

public boolean isReadyForPermanentRemoval(org.rhq.core.domain.resource.ResourceType resourceType)
Description copied from interface: InventoryManagerLocal
Determines whether or not a resource type is ready to be permanently removed from the database. A resource type is ready to be removed if 1) its deleted flag has been set and 2) if all of its resources have already been removed from the database.

Specified by:
isReadyForPermanentRemoval in interface InventoryManagerLocal
Parameters:
resourceType - The resource type to check
Returns:
true if the resource type is ready to be permanently deleted.

purgeDeletedResourceType

public void purgeDeletedResourceType(org.rhq.core.domain.resource.ResourceType resourceType)
Description copied from interface: InventoryManagerLocal
Permanently removes the resource type from the database along with all associated meta data such as metric definitions, operation definitions, and resource configuration definitions. This method is intended to be called by the scheduled job PurgeResourceTypesJob.

Specified by:
purgeDeletedResourceType in interface InventoryManagerLocal
Parameters:
resourceType - The resource type to delete


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