Package org.wildfly.prospero.actions
Class FeaturesAddAction
- java.lang.Object
-
- org.wildfly.prospero.actions.FeaturesAddAction
-
public class FeaturesAddAction extends Object
Installs a feature pack onto an existing server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFeaturesAddAction.ConfigurationNotFoundExceptionstatic classFeaturesAddAction.FeaturePackAlreadyInstalledExceptionstatic classFeaturesAddAction.LayerNotFoundExceptionThrown if a requested layer cannot be found in a feature packstatic classFeaturesAddAction.ModelNotDefinedExceptionThrown if either the user requested model is not supported by the feature packs, or if it is impossible to determine default model.
-
Constructor Summary
Constructors Constructor Description FeaturesAddAction(MavenOptions mavenOptions, Path installDir, List<org.wildfly.channel.Repository> repositories, Console console)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFeaturePack(String featurePackCoord, Set<org.jboss.galleon.config.ConfigId> defaultConfigNames)performs feature pack installation.voidaddFeaturePackWithLayers(String featurePackCoord, Set<String> layers, org.jboss.galleon.config.ConfigId configName)performs feature pack installation.booleanisFeaturePackAvailable(String featurePackCoord)check if a feature pack withfeaturePackCoordcan be resolved in available channels.
-
-
-
Constructor Detail
-
FeaturesAddAction
public FeaturesAddAction(MavenOptions mavenOptions, Path installDir, List<org.wildfly.channel.Repository> repositories, Console console) throws MetadataException, org.jboss.galleon.ProvisioningException
- Throws:
MetadataExceptionorg.jboss.galleon.ProvisioningException
-
-
Method Detail
-
addFeaturePack
public void addFeaturePack(String featurePackCoord, Set<org.jboss.galleon.config.ConfigId> defaultConfigNames) throws org.jboss.galleon.ProvisioningException, OperationException
performs feature pack installation. The added feature pack can be customized by specifying layers and configuration model name. In order to install a feature pack, a server is re-provisioned and changes are applied to existing server.- Parameters:
featurePackCoord- - mavengroupId:artifactIdcoordinates of the feature pack to installdefaultConfigNames- - set ofConfigIdof the default configurations to include- Throws:
org.jboss.galleon.ProvisioningException- - if unable to provision the serverFeaturesAddAction.ModelNotDefinedException- - if requested model is not provided by the feature packFeaturesAddAction.LayerNotFoundException- - if one of the requested layers is not provided by the feature packFeaturesAddAction.FeaturePackAlreadyInstalledException- - if the requested feature pack configuration wouldn't change the server stateInvalidUpdateCandidateException- - if the folder atupdateDiris not a valid updateMetadataException- - if unable to read or write the installation of update metadataOperationException
-
addFeaturePackWithLayers
public void addFeaturePackWithLayers(String featurePackCoord, Set<String> layers, org.jboss.galleon.config.ConfigId configName) throws org.jboss.galleon.ProvisioningException, OperationException
performs feature pack installation. The added feature pack can be customized by specifying layers and configuration model name. In order to install a feature pack, a server is re-provisioned and changes are applied to existing server.- Parameters:
featurePackCoord- - mavengroupId:artifactIdcoordinates of the feature pack to installlayers- - set of layer names to be provisionedconfigName- -ConfigIdof the configuration file to generate if supported- Throws:
org.jboss.galleon.ProvisioningException- - if unable to provision the serverFeaturesAddAction.ModelNotDefinedException- - if requested model is not provided by the feature packFeaturesAddAction.LayerNotFoundException- - if one of the requested layers is not provided by the feature packFeaturesAddAction.FeaturePackAlreadyInstalledException- - if the requested feature pack configuration wouldn't change the server stateInvalidUpdateCandidateException- - if the folder atupdateDiris not a valid updateMetadataException- - if unable to read or write the installation of update metadataOperationException
-
isFeaturePackAvailable
public boolean isFeaturePackAvailable(String featurePackCoord) throws OperationException, org.jboss.galleon.ProvisioningException
check if a feature pack withfeaturePackCoordcan be resolved in available channels.- Parameters:
featurePackCoord- - mavengroupId:artifactIdcoordinates of the feature pack to install- Returns:
- true if the feature pack is available, false otherwise
- Throws:
OperationException- - if unable to read the metadataorg.jboss.galleon.ProvisioningException- - if unable to read the metadata
-
-