View Javadoc
1   package com.atlassian.activeobjects.spi;
2   
3   import static com.google.common.base.Preconditions.checkNotNull;
4   
5   public final class ActiveObjectsImportExportException extends ImportExportException {
6       private final PluginInformation pluginInformation;
7       private final String tableName;
8   
9       public ActiveObjectsImportExportException(String tableName, PluginInformation pluginInformation, String message) {
10          super(message);
11          this.pluginInformation = checkNotNull(pluginInformation);
12          this.tableName = tableName;
13      }
14  
15      public ActiveObjectsImportExportException(String tableName, PluginInformation pluginInformation, Throwable t) {
16          super(t);
17          this.pluginInformation = checkNotNull(pluginInformation);
18          this.tableName = tableName;
19      }
20  
21      public ActiveObjectsImportExportException(String tableName, PluginInformation pluginInformation, String message, Throwable t) {
22          super(message, t);
23          this.pluginInformation = checkNotNull(pluginInformation);
24          this.tableName = tableName;
25      }
26  
27      public PluginInformation getPluginInformation() {
28          return pluginInformation;
29      }
30  
31      public String getTableName() {
32          return tableName;
33      }
34  
35      @Override
36      public String getMessage() {
37          return "There was an error during import/export with " + pluginInformation
38                  + (tableName != null ? " (table " + tableName + ")" : "")
39                  + ":" + super.getMessage();
40      }
41  }