Class FeaturesAddAction

java.lang.Object
org.wildfly.prospero.actions.FeaturesAddAction

public class FeaturesAddAction extends Object
Installs a feature pack onto an existing server.
  • Constructor Details

  • Method Details

    • 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 - - maven groupId:artifactId coordinates of the feature pack to install
      defaultConfigNames - - set of ConfigId of the default configurations to include
      candidatePath - - folder where the candidate server should be created
      Throws:
      org.jboss.galleon.ProvisioningException - - if unable to provision the server
      FeaturesAddAction.ModelNotDefinedException - - if requested model is not provided by the feature pack
      FeaturesAddAction.LayerNotFoundException - - if one of the requested layers is not provided by the feature pack
      FeaturesAddAction.FeaturePackAlreadyInstalledException - - if the requested feature pack configuration wouldn't change the server state
      InvalidUpdateCandidateException - - if the folder at updateDir is not a valid update
      MetadataException - - if unable to read or write the installation of update metadata
      OperationException
    • 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 - - maven groupId:artifactId coordinates of the feature pack to install
      layers - - set of layer names to be provisioned
      configName - - ConfigId of the configuration file to generate if supported
      candidateFolder - - folder where the candidate server should be created
      Throws:
      org.jboss.galleon.ProvisioningException - - if unable to provision the server
      FeaturesAddAction.ModelNotDefinedException - - if requested model is not provided by the feature pack
      FeaturesAddAction.LayerNotFoundException - - if one of the requested layers is not provided by the feature pack
      FeaturesAddAction.FeaturePackAlreadyInstalledException - - if the requested feature pack configuration wouldn't change the server state
      InvalidUpdateCandidateException - - if the folder at updateDir is not a valid update
      MetadataException - - if unable to read or write the installation of update metadata
      OperationException
    • 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 in groupId:artifactId format
      Returns:
      - template matching the feature pack or null if none found.
      Throws:
      org.jboss.galleon.ProvisioningException
      OperationException
    • isFeaturePackAvailable

      public boolean isFeaturePackAvailable(String featurePackCoord) throws OperationException, org.jboss.galleon.ProvisioningException
      check if a feature pack with featurePackCoord can be resolved in available channels.
      Parameters:
      featurePackCoord - - maven groupId:artifactId coordinates of the feature pack to install
      Returns:
      true if the feature pack is available, false otherwise
      Throws:
      OperationException - - if unable to read the metadata
      org.jboss.galleon.ProvisioningException - - if unable to read the metadata
    • getRequiredLicenses

      public List<License> getRequiredLicenses(String featurePackCoord)