public class DiscoveryBossBean extends Object implements DiscoveryBossLocal, DiscoveryBossRemote
| Constructor and Description |
|---|
DiscoveryBossBean() |
| Modifier and Type | Method and Description |
|---|---|
org.rhq.core.domain.discovery.MergeResourceResponse |
addResource(org.rhq.core.domain.resource.Resource resource,
int creatorSubjectId)
Adds the specified resource to inventory, *auto-committing it*.
|
org.rhq.core.domain.discovery.PlatformSyncInfo |
getPlatformSyncInfo(org.rhq.core.domain.resource.Agent knownAgent)
Just get the top level server info for the agent's platform.
|
List<org.rhq.core.domain.resource.Resource> |
getQueuedPlatformChildServers(org.rhq.core.domain.auth.Subject user,
org.rhq.core.domain.resource.InventoryStatus status,
org.rhq.core.domain.resource.Resource platform)
Given a platform resource, this returns all of its child server resources that have been auto-discovered and have
the given status.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> |
getQueuedPlatforms(org.rhq.core.domain.auth.Subject user,
EnumSet<org.rhq.core.domain.resource.InventoryStatus> statuses,
org.rhq.core.domain.util.PageControl pc)
This returns all platform resources that either have the given status themselves or one or more of their child
servers have that status.
|
Map<org.rhq.core.domain.resource.Resource,List<org.rhq.core.domain.resource.Resource>> |
getQueuedPlatformsAndServers(org.rhq.core.domain.auth.Subject user,
EnumSet<org.rhq.core.domain.resource.InventoryStatus> statuses,
org.rhq.core.domain.util.PageControl pc)
Like the above method, but can find ignored, committed or both
|
Map<org.rhq.core.domain.resource.Resource,List<org.rhq.core.domain.resource.Resource>> |
getQueuedPlatformsAndServers(org.rhq.core.domain.auth.Subject user,
org.rhq.core.domain.util.PageControl pc)
Returns a map of platforms (the keys) and their servers (the values) that are in the auto-discovery queue but not
yet imported into inventory.
|
Collection<org.rhq.core.domain.discovery.ResourceSyncInfo> |
getResourceSyncInfo(int resourceId) |
void |
ignoreResources(org.rhq.core.domain.auth.Subject subject,
int[] resourceIds)
Analogous to the GUI feature Ignore Resources in the auto discovery queue.
|
void |
importResources(org.rhq.core.domain.auth.Subject subject,
int[] resourceIds)
Analogous to the GUI feature Import Resources in the auto discovery queue.
|
org.rhq.core.domain.resource.ImportResourceResponse |
manuallyAddResource(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.resource.ImportResourceRequest importResourceRequest)
Manually Add the resource to inventory using the type and plugin configuration (i.e.
|
org.rhq.core.domain.resource.Resource |
manuallyAddResource(org.rhq.core.domain.auth.Subject subject,
int resourceTypeId,
int parentResourceId,
org.rhq.core.domain.configuration.Configuration pluginConfiguration)
Manually Add the resource of the specified type to inventory using the specified plugin configuration (i.e.
|
org.rhq.core.domain.discovery.MergeInventoryReportResults |
mergeInventoryReport(InventoryReport report)
When agents send up results from their discovery components (which notifies the server about newly discovered
resources), this method will eventually be called in order to process those inventory reports.
|
void |
mergeResourceInNewTransaction(List<org.rhq.core.domain.resource.Resource> resourceBatch,
org.rhq.core.domain.resource.Agent agent,
Map<org.rhq.core.domain.resource.Resource,Set<org.rhq.enterprise.server.discovery.DiscoveryBossBean.PostMergeAction>> postMergeActions)
Exists for transactional boundary reasons only.
|
void |
unignoreAndImportResources(org.rhq.core.domain.auth.Subject subject,
int[] resourceIds)
This is used to specifically unignore previously ignored resources.
|
void |
unignoreResources(org.rhq.core.domain.auth.Subject subject,
int[] resourceIds)
Analogous to the GUI feature Unignore Resources in the auto discovery queue.
|
void |
updateAgentInventoryStatus(List<org.rhq.core.domain.resource.Resource> platforms,
List<org.rhq.core.domain.resource.Resource> servers)
Synchronize the agent's inventory status for platforms, and then the servers,
omitting servers under synced platforms since they will have been handled
already.
|
void |
updateAgentInventoryStatus(String platformsCsvList,
String serversCsvList) |
void |
updateInventoryStatus(org.rhq.core.domain.auth.Subject user,
List<org.rhq.core.domain.resource.Resource> platforms,
List<org.rhq.core.domain.resource.Resource> servers,
org.rhq.core.domain.resource.InventoryStatus status)
This method is used to change the inventory status of a set of platforms and servers (e.g.
|
void |
updateInventoryStatusInNewTransaction(org.rhq.core.domain.auth.Subject user,
List<org.rhq.core.domain.resource.Resource> platforms,
List<org.rhq.core.domain.resource.Resource> servers,
org.rhq.core.domain.resource.InventoryStatus status)
Updates statuses according to the inventory rules.
|
boolean |
updateResourceVersion(int resourceId,
String version)
Updates the version of the specified Resource in inventory, if it is indeed in inventory.
|
Set<ResourceUpgradeResponse> |
upgradeResources(Set<ResourceUpgradeRequest> upgradeRequests)
Upgrades the data of the resources according to the provided reports.
|
public org.rhq.core.domain.discovery.MergeInventoryReportResults mergeInventoryReport(InventoryReport report) throws InvalidInventoryReportException
DiscoveryBossLocalmergeInventoryReport in interface DiscoveryBossLocalreport - the inventory report to be mergedInvalidInventoryReportException - if the inventory report is invalidpublic org.rhq.core.domain.discovery.PlatformSyncInfo getPlatformSyncInfo(org.rhq.core.domain.resource.Agent knownAgent)
DiscoveryBossLocalgetPlatformSyncInfo in interface DiscoveryBossLocalknownAgent - the agent for the platform we want to sync withpublic Collection<org.rhq.core.domain.discovery.ResourceSyncInfo> getResourceSyncInfo(int resourceId)
getResourceSyncInfo in interface DiscoveryBossLocalresourceId - the root resourceId on which we want to syncpublic Map<org.rhq.core.domain.resource.Resource,List<org.rhq.core.domain.resource.Resource>> getQueuedPlatformsAndServers(org.rhq.core.domain.auth.Subject user, org.rhq.core.domain.util.PageControl pc)
DiscoveryBossLocalgetQueuedPlatformsAndServers in interface DiscoveryBossLocaluser - the user that wants to see the datapc - used to define the size of the returned map - will determine how many platforms are returnedpublic Map<org.rhq.core.domain.resource.Resource,List<org.rhq.core.domain.resource.Resource>> getQueuedPlatformsAndServers(org.rhq.core.domain.auth.Subject user, EnumSet<org.rhq.core.domain.resource.InventoryStatus> statuses, org.rhq.core.domain.util.PageControl pc)
DiscoveryBossLocalgetQueuedPlatformsAndServers in interface DiscoveryBossLocaluser - the subjectstatuses - the inventory status'pc - page controlpublic org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> getQueuedPlatforms(org.rhq.core.domain.auth.Subject user,
EnumSet<org.rhq.core.domain.resource.InventoryStatus> statuses,
org.rhq.core.domain.util.PageControl pc)
DiscoveryBossLocalgetQueuedPlatforms in interface DiscoveryBossLocaluser - the user that wants to see the datastatuses - the statuses that platform or its child servers must havepc - pagination controlsDiscoveryBossLocal.getQueuedPlatformChildServers(org.rhq.core.domain.auth.Subject, org.rhq.core.domain.resource.InventoryStatus, org.rhq.core.domain.resource.Resource)public List<org.rhq.core.domain.resource.Resource> getQueuedPlatformChildServers(org.rhq.core.domain.auth.Subject user, org.rhq.core.domain.resource.InventoryStatus status, org.rhq.core.domain.resource.Resource platform)
DiscoveryBossLocalgetQueuedPlatformChildServers in interface DiscoveryBossLocaluser - the user that wants to see the datastatus - the status that platform or its child servers must haveplatform - the resource whose auto-discovered child servers must have the given statuspublic void updateInventoryStatus(org.rhq.core.domain.auth.Subject user,
List<org.rhq.core.domain.resource.Resource> platforms,
List<org.rhq.core.domain.resource.Resource> servers,
org.rhq.core.domain.resource.InventoryStatus status)
DiscoveryBossLocalupdateInventoryStatus in interface DiscoveryBossLocaluser - the user that wants to change the statusplatforms - identifies the platforms that are to be updatedservers - identifies the servers that are to be updatedstatus - the new status the given resources will havepublic void updateAgentInventoryStatus(List<org.rhq.core.domain.resource.Resource> platforms, List<org.rhq.core.domain.resource.Resource> servers)
platforms - the platforms in inventoryservers - the servers in inventorypublic void updateAgentInventoryStatus(String platformsCsvList, String serversCsvList)
updateAgentInventoryStatus in interface DiscoveryBossLocalpublic void updateInventoryStatusInNewTransaction(org.rhq.core.domain.auth.Subject user,
List<org.rhq.core.domain.resource.Resource> platforms,
List<org.rhq.core.domain.resource.Resource> servers,
org.rhq.core.domain.resource.InventoryStatus status)
updateInventoryStatus(Subject, List, List, InventoryStatus) for the "public"
version.updateInventoryStatusInNewTransaction in interface DiscoveryBossLocaluser - the user that wants to change the statusplatforms - identifies the platforms that are to be updatedservers - identifies the servers that are to be updatedstatus - the new status the given resources will havepublic org.rhq.core.domain.resource.Resource manuallyAddResource(org.rhq.core.domain.auth.Subject subject,
int resourceTypeId,
int parentResourceId,
org.rhq.core.domain.configuration.Configuration pluginConfiguration)
throws Exception
DiscoveryBossRemotemanuallyAddResource in interface DiscoveryBossRemotesubject - the user making the requestresourceTypeId - the type of resource to be manually discoveredparentResourceId - the id of the resource that will be the parent of the manually discovered resourcepluginConfiguration - the properties that should be used to connect to the underlying managed resourceException - if connecting to the underlying managed resource failed due to invalid plugin configuration or
if the manual discovery fails for any reason.public org.rhq.core.domain.resource.ImportResourceResponse manuallyAddResource(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.resource.ImportResourceRequest importResourceRequest)
throws InvalidPluginConfigurationClientException,
PluginContainerException
DiscoveryBossLocalimportResourceRequest. This will not only create a new resource, but it will also
ensure the resource component is activated (and thus connects to the managed resource).manuallyAddResource in interface DiscoveryBossLocalsubject - the user making the requestimportResourceRequest - the requestInvalidPluginConfigurationClientException - if connecting to the underlying managed resource failed due to
an invalid plugin configurationPluginContainerException - if the manual discovery fails for any other reasonpublic org.rhq.core.domain.discovery.MergeResourceResponse addResource(org.rhq.core.domain.resource.Resource resource,
int creatorSubjectId)
DiscoveryBossLocaladdResource in interface DiscoveryBossLocalresource - the resource to be mergedcreatorSubjectId - the user who should be the owner of the new Resourcepublic boolean updateResourceVersion(int resourceId,
String version)
DiscoveryBossLocalversion, then
this method does nothing and returns true.updateResourceVersion in interface DiscoveryBossLocalresourceId - the id of the Resource to be updatedversion - the new versiontrue if the Resource was in inventory and its version is now that of version.
false if the Resource was not in inventorypublic Set<ResourceUpgradeResponse> upgradeResources(Set<ResourceUpgradeRequest> upgradeRequests)
DiscoveryBossLocalupgradeResources in interface DiscoveryBossLocalupgradeRequests - contains the information about the upgrade of individual resources.public void mergeResourceInNewTransaction(List<org.rhq.core.domain.resource.Resource> resourceBatch, org.rhq.core.domain.resource.Agent agent, Map<org.rhq.core.domain.resource.Resource,Set<org.rhq.enterprise.server.discovery.DiscoveryBossBean.PostMergeAction>> postMergeActions) throws InvalidInventoryReportException
DiscoveryBossLocalExists for transactional boundary reasons only.
Merge In the provided batch of resources. The list of resources must provide a parent before its child.mergeResourceInNewTransaction in interface DiscoveryBossLocalresourceBatch - a batch of resourcesagent - the agent managing the resourcespostMergeActions - a series of actions to perform on newly committed resources.InvalidInventoryReportExceptionpublic void importResources(org.rhq.core.domain.auth.Subject subject,
int[] resourceIds)
DiscoveryBossRemoteResourceManagerRemote.findResourcesByCriteria(org.rhq.core.domain.auth.Subject, org.rhq.core.domain.criteria.ResourceCriteria).importResources in interface DiscoveryBossRemotepublic void ignoreResources(org.rhq.core.domain.auth.Subject subject,
int[] resourceIds)
DiscoveryBossRemoteResourceManagerRemote.findResourcesByCriteria(org.rhq.core.domain.auth.Subject, org.rhq.core.domain.criteria.ResourceCriteria).ignoreResources in interface DiscoveryBossRemotepublic void unignoreResources(org.rhq.core.domain.auth.Subject subject,
int[] resourceIds)
DiscoveryBossRemoteResourceManagerRemote.findResourcesByCriteria(org.rhq.core.domain.auth.Subject, org.rhq.core.domain.criteria.ResourceCriteria).unignoreResources in interface DiscoveryBossRemotepublic void unignoreAndImportResources(org.rhq.core.domain.auth.Subject subject,
int[] resourceIds)
DiscoveryBossRemoteResourceManagerRemote.findResourcesByCriteria(org.rhq.core.domain.auth.Subject, org.rhq.core.domain.criteria.ResourceCriteria).unignoreAndImportResources in interface DiscoveryBossRemoteCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.