org.rhq.core.pluginapi.content
Interface ContentFacet


public interface ContentFacet

Components that implement this facet expose the ability to detect and manage packaged content.


Method Summary
 DeployPackagesResponse deployPackages(Set<ResourcePackageDetails> packages, ContentServices contentServices)
          Requests that the content for the given packages be deployed to the resource.
 Set<ResourcePackageDetails> discoverDeployedPackages(PackageType type)
          Asks that the component run a discovery and return information on all currently installed packages of the specified type.
 List<DeployPackageStep> generateInstallationSteps(ResourcePackageDetails packageDetails)
          Returns a list of installation steps that will take place when installing the specified package.
 RemovePackagesResponse removePackages(Set<ResourcePackageDetails> packages)
          Requests that the given installed packages be deleted from the resource.
 InputStream retrievePackageBits(ResourcePackageDetails packageDetails)
          Asks that a stream of data containing the installed package contents be returned.
 

Method Detail

generateInstallationSteps

List<DeployPackageStep> generateInstallationSteps(ResourcePackageDetails packageDetails)
Returns a list of installation steps that will take place when installing the specified package. When the request to install the package is actually placed, the response from that call should contain a reference to the steps specified here, along with the result (success/failure) of each step. If they cannot be determined, this method will return null.

Parameters:
packageDetails - describes the package to be installed
Returns:
steps that will be taken and reported on when deploying this package; null if they cannot be determined

deployPackages

DeployPackagesResponse deployPackages(Set<ResourcePackageDetails> packages,
                                      ContentServices contentServices)
Requests that the content for the given packages be deployed to the resource. After the facet completes its work, the facet should update each installed package object with the new status and any error message that is appropriate (in the case where the installation failed). This method should not throw exceptions - any errors that occur should be stored in the ResourcePackageDetails object.

Parameters:
packages - the packages to install
contentServices - a proxy object that allows the facet implementation to be able to request things from the plugin container (such as being able to pull down a package's content from an external source).
Returns:
Contains a reference to each package to be installed. Each reference should describe the results of attempting to install the package (success/failure).

removePackages

RemovePackagesResponse removePackages(Set<ResourcePackageDetails> packages)
Requests that the given installed packages be deleted from the resource. After the facet completes its work, the facet should update each installed package object with the new status and any error message that is appropriate (in the case where the installation failed). This method should not throw exceptions - any errors that occur should be stored in the ResourcePackageDetails object.

Parameters:
packages - the packages to remove
Returns:
Contains a reference to each package that was requested to be removed. Each reference should describe the results of attempting to remove the package (success/failure).

discoverDeployedPackages

Set<ResourcePackageDetails> discoverDeployedPackages(PackageType type)
Asks that the component run a discovery and return information on all currently installed packages of the specified type.

Parameters:
type - the type of packaged content that should be discovered
Returns:
information on all discovered content of the given package type

retrievePackageBits

InputStream retrievePackageBits(ResourcePackageDetails packageDetails)
Asks that a stream of data containing the installed package contents be returned.

Parameters:
packageDetails - the package whose contents should be streamed back to the caller
Returns:
stream containing the full content of the package


Copyright © 2008-2009 RHQ Project Advisory Board (Red Hat, Inc.). All Rights Reserved.