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, Path candidatePath)performs feature pack installation as a new candidate server.voidaddFeaturePackWithLayers(String featurePackCoord, Set<String> layers, org.jboss.galleon.config.ConfigId configName, Path candidateFolder)performs feature pack installation as a new candidate server.FeaturePackTemplategetFeaturePackRecipe(String featurePackCoord)find a template matching feature pack coordinatesList<License>getRequiredLicenses(String featurePackCoord)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, Path candidatePath) throws org.jboss.galleon.ProvisioningException, OperationException
performs feature pack installation as a new candidate server. 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.The candidate server is created in a temp directory. To apply the changes and complete the installation,
ApplyCandidateAction.applyUpdate(ApplyCandidateAction.Type)should be used.- Parameters:
featurePackCoord- - mavengroupId:artifactIdcoordinates of the feature pack to installdefaultConfigNames- - set ofConfigIdof the default configurations to includecandidatePath- - folder where the candidate server should be created- 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, Path candidateFolder) throws org.jboss.galleon.ProvisioningException, OperationException
performs feature pack installation as a new candidate server. 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.The candidate server is created in a temp directory. To apply the changes and complete the installation,
ApplyCandidateAction.applyUpdate(ApplyCandidateAction.Type)should be used.- Parameters:
featurePackCoord- - mavengroupId:artifactIdcoordinates of the feature pack to installlayers- - set of layer names to be provisionedconfigName- -ConfigIdof the configuration file to generate if supportedcandidateFolder- - folder where the candidate server should be created- 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
-
getFeaturePackRecipe
public FeaturePackTemplate getFeaturePackRecipe(String featurePackCoord) throws org.jboss.galleon.ProvisioningException, OperationException
find a template matching feature pack coordinates- Parameters:
featurePackCoord- - coordinates of the feature pack ingroupId:artifactIdformat- Returns:
- - template matching the feature pack or null if none found.
- Throws:
org.jboss.galleon.ProvisioningExceptionOperationException
-
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
-
-