1   package com.atlassian.maven.plugins.amps;
2   
3   import com.atlassian.maven.plugins.amps.product.ProductHandler;
4   import com.atlassian.maven.plugins.amps.product.ProductHandlerFactory;
5   import org.apache.maven.plugin.MojoExecutionException;
6   
7   public abstract class AbstractProductHandlerAwareMojo extends AbstractProductAwareMojo
8   {
9       /**
10       * Create a ProductHandler
11       * @param productId the product nickname (not the instance id)
12       * @return a product handler for this nickname
13       * @throws MojoExecutionException
14       */
15      protected ProductHandler createProductHandler(String productId)
16      {
17          return ProductHandlerFactory.create(productId, getMavenContext(), getMavenGoals());
18      }
19  }