Class FeaturesAddAction


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

    • 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 - - maven groupId:artifactId coordinates of the feature pack to install
        defaultConfigNames - - set of ConfigId of the default configurations to include
        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)
                                      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 - - 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
        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
      • 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