org.jboss.on.common.jbossas
Class AbstractJBossASContentFacetDelegate

java.lang.Object
  extended by org.jboss.on.common.jbossas.AbstractJBossASContentFacetDelegate
All Implemented Interfaces:
ContentFacet

public abstract class AbstractJBossASContentFacetDelegate
extends Object
implements ContentFacet

This is a base class for the ContentFacet implementation delegates for JBoss AS plugins. Much of the implementation is the same for both the AS 4 and AS5 and is implemented here. Subclasses (used in the server component implementations) specialize for the specific requirements of the different JBoss AS versions.

Author:
Lukas Krejci

Field Summary
static String PACKAGE_TYPE_LIBRARY
           
static String PACKAGE_TYPE_PATCH
           
 
Constructor Summary
protected AbstractJBossASContentFacetDelegate(JBPMWorkflowManager workflowManager)
           
 
Method Summary
 org.rhq.core.domain.content.transfer.DeployPackagesResponse deployPackages(Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> packages, ContentServices contentServices)
          This default implementation supports deploying a single patch.
 Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> discoverDeployedPackages(org.rhq.core.domain.content.PackageType type)
          The default implementation of this method merely throws an unsupported operation exception.
 List<org.rhq.core.domain.content.transfer.DeployPackageStep> generateInstallationSteps(org.rhq.core.domain.content.transfer.ResourcePackageDetails packageDetails)
           
protected  JBPMWorkflowManager getWorkflowManager()
           
 org.rhq.core.domain.content.transfer.RemovePackagesResponse removePackages(Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> packages)
          The default implementation of this method merely throws an unsupported operation exception.
 InputStream retrievePackageBits(org.rhq.core.domain.content.transfer.ResourcePackageDetails packageDetails)
          The default implementation of this method merely throws an unsupported operation exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PACKAGE_TYPE_PATCH

public static final String PACKAGE_TYPE_PATCH
See Also:
Constant Field Values

PACKAGE_TYPE_LIBRARY

public static final String PACKAGE_TYPE_LIBRARY
See Also:
Constant Field Values
Constructor Detail

AbstractJBossASContentFacetDelegate

protected AbstractJBossASContentFacetDelegate(JBPMWorkflowManager workflowManager)
Method Detail

deployPackages

public org.rhq.core.domain.content.transfer.DeployPackagesResponse deployPackages(Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> packages,
                                                                                  ContentServices contentServices)
This default implementation supports deploying a single patch. For that the packages set must contain a single package with the type name equal to PACKAGE_TYPE_PATCH.

Packages of type PACKAGE_TYPE_LIBRARY are unsupported, all other package types are silently ignored.

Specified by:
deployPackages in interface ContentFacet
Returns:
a package response describing th results of the deployment.
Throws:
UnsupportedOperationException - if the packages set contains a package of type PACKAGE_TYPE_LIBRARY

discoverDeployedPackages

public Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> discoverDeployedPackages(org.rhq.core.domain.content.PackageType type)
The default implementation of this method merely throws an unsupported operation exception.

Specified by:
discoverDeployedPackages in interface ContentFacet
Throws:
UnsupportedOperationException
See Also:
ContentFacet.discoverDeployedPackages(PackageType)

generateInstallationSteps

public List<org.rhq.core.domain.content.transfer.DeployPackageStep> generateInstallationSteps(org.rhq.core.domain.content.transfer.ResourcePackageDetails packageDetails)
Specified by:
generateInstallationSteps in interface ContentFacet

removePackages

public org.rhq.core.domain.content.transfer.RemovePackagesResponse removePackages(Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> packages)
The default implementation of this method merely throws an unsupported operation exception.

Specified by:
removePackages in interface ContentFacet
Throws:
UnsupportedOperationException
See Also:
ContentFacet.removePackages(Set)

retrievePackageBits

public InputStream retrievePackageBits(org.rhq.core.domain.content.transfer.ResourcePackageDetails packageDetails)
The default implementation of this method merely throws an unsupported operation exception.

Specified by:
retrievePackageBits in interface ContentFacet
Throws:
UnsupportedOperationException
See Also:
ContentFacet.retrievePackageBits(ResourcePackageDetails)

getWorkflowManager

protected JBPMWorkflowManager getWorkflowManager()
Returns:
the workflow manager


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