|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.core.pc.inventory.InventoryFile
public class InventoryFile
Provides methods to read and write inventory data to a file.
| Constructor Summary | |
|---|---|
InventoryFile(File inventoryFile)
Constructor for InventoryFile that will read and write inventory data to the given file. |
|
| Method Summary | |
|---|---|
File |
getInventoryFile()
|
org.rhq.core.domain.resource.Resource |
getPlatform()
Returns the platform resource found in the inventory file. |
Map<String,ResourceContainer> |
getResourceContainers()
Returns the map of resource containers (keyed on their UUIDs) found in the inventory
file. |
void |
loadInventory()
Reads in the inventory found in the file. |
void |
storeInventory(org.rhq.core.domain.resource.Resource platformResource,
Map<String,ResourceContainer> containers)
Given a platform and map of resource containers (keyed on UUID strings), this persists that inventory to the inventory file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InventoryFile(File inventoryFile)
InventoryFile that will read and write inventory data to the given file.
inventoryFile - the path to the inventory.dat file| Method Detail |
|---|
public File getInventoryFile()
public org.rhq.core.domain.resource.Resource getPlatform()
This will return null if the file has not yet been loaded, initially
written to or if an error occurred that did not allow the inventory file
to be fully loaded successfully.
public Map<String,ResourceContainer> getResourceContainers()
resource containers (keyed on their UUIDs) found in the inventory
file.
This will return null if the file has not yet been loaded, initially
written to or if an error occurred that did not allow the inventory file
to be fully loaded successfully.
public void loadInventory()
throws PluginContainerException
getPlatform() and
getResourceContainers() will return non-null objects as found in the file.
PluginContainerException - if some error occurred that did not allow this method to fully load the
inventory
public void storeInventory(org.rhq.core.domain.resource.Resource platformResource,
Map<String,ResourceContainer> containers)
throws IOException
inventory file. This object's platform and
resource containers will be set to those passed to this method.
platformResource - containers -
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||