Coverage Report - org.kuali.maven.plugins.dnsme.mojo.BaseDNSMEMojo
 
Classes in this File Line Coverage Branch Coverage Complexity
BaseDNSMEMojo
0%
0/16
N/A
1
 
 1  
 package org.kuali.maven.plugins.dnsme.mojo;
 2  
 
 3  
 import org.apache.maven.plugin.AbstractMojo;
 4  
 import org.apache.maven.plugin.MojoExecutionException;
 5  
 import org.apache.maven.plugin.MojoFailureException;
 6  
 import org.kuali.maven.plugins.dnsme.DNSMEClient;
 7  
 import org.kuali.maven.plugins.dnsme.beans.Account;
 8  
 
 9  
 /**
 10  
  *
 11  
  */
 12  0
 public abstract class BaseDNSMEMojo extends AbstractMojo {
 13  
     /**
 14  
      * The url for the DNSME Rest API
 15  
      *
 16  
      * @parameter expression="${dnsme.restApiUrl}" default-value="http://api.dnsmadeeasy.com/V1.2"
 17  
      * @required
 18  
      */
 19  
     String restApiUrl;
 20  
 
 21  
     /**
 22  
      * The REST api key for a DNSME account
 23  
      *
 24  
      * @parameter expression="${dnsme.apiKey}"
 25  
      * @required
 26  
      */
 27  
     String apiKey;
 28  
 
 29  
     /**
 30  
      * The REST secret key for a DNSME account
 31  
      *
 32  
      * @parameter expression="${dnsme.secretKey}"
 33  
      * @required
 34  
      */
 35  
     String secretKey;
 36  
 
 37  
     @Override
 38  
     public void execute() throws MojoExecutionException, MojoFailureException {
 39  0
         Account account = new Account();
 40  0
         account.setApiKey(apiKey);
 41  0
         account.setSecretKey(secretKey);
 42  0
         DNSMEClient client = DNSMEClient.getInstance(account, restApiUrl);
 43  0
         performTasks(client);
 44  0
     }
 45  
 
 46  
     protected abstract void performTasks(DNSMEClient client) throws MojoExecutionException, MojoFailureException;
 47  
 
 48  
     public String getRestApiUrl() {
 49  0
         return restApiUrl;
 50  
     }
 51  
 
 52  
     public void setRestApiUrl(String restApiUrl) {
 53  0
         this.restApiUrl = restApiUrl;
 54  0
     }
 55  
 
 56  
     public String getApiKey() {
 57  0
         return apiKey;
 58  
     }
 59  
 
 60  
     public void setApiKey(String apiKey) {
 61  0
         this.apiKey = apiKey;
 62  0
     }
 63  
 
 64  
     public String getSecretKey() {
 65  0
         return secretKey;
 66  
     }
 67  
 
 68  
     public void setSecretKey(String secretKey) {
 69  0
         this.secretKey = secretKey;
 70  0
     }
 71  
 }