org.rhq.enterprise.server.inventory
Interface InventoryManagerLocal

All Known Implementing Classes:
InventoryManagerBean

public interface InventoryManagerLocal

Provides methods for carrying resource type deletion.


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.
 

Method Detail

markTypesDeleted

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. 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.

Parameters:
resourceTypeIds - The ids of the resource types to delete
Returns:
The number of types marked for deletion.

getDeletedTypes

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

isReadyForPermanentRemoval

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. 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.

Parameters:
resourceType - The resource type to check
Returns:
true if the resource type is ready to be permanently deleted.

purgeDeletedResourceType

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. This method is intended to be called by the scheduled job PurgeResourceTypesJob.

Parameters:
resourceType - The resource type to delete


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