|  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 |     | 
     | 
  |  15 |     | 
     | 
  |  16 |     | 
     | 
  |  17 |     | 
     | 
  |  18 |     | 
     | 
  |  19 |     | 
       String restApiUrl;  | 
  |  20 |     | 
     | 
  |  21 |     | 
         | 
  |  22 |     | 
     | 
  |  23 |     | 
     | 
  |  24 |     | 
     | 
  |  25 |     | 
     | 
  |  26 |     | 
     | 
  |  27 |     | 
       String apiKey;  | 
  |  28 |     | 
     | 
  |  29 |     | 
         | 
  |  30 |     | 
     | 
  |  31 |     | 
     | 
  |  32 |     | 
     | 
  |  33 |     | 
     | 
  |  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 |     | 
   }  |