View Javadoc
1   package com.atlassian.activeobjects.config;
2   
3   import com.atlassian.activeobjects.external.ActiveObjectsUpgradeTask;
4   import com.atlassian.activeobjects.internal.DataSourceType;
5   import com.atlassian.activeobjects.internal.Prefix;
6   import net.java.ao.RawEntity;
7   import net.java.ao.SchemaConfiguration;
8   import net.java.ao.schema.NameConverters;
9   
10  import java.util.List;
11  import java.util.Set;
12  
13  /**
14   * This represents the configuration of active objects for a given module descriptor.
15   */
16  public interface ActiveObjectsConfiguration {
17      String AO_TABLE_PREFIX = "AO";
18  
19      /**
20       * The plugin key for which this configuration is defined.
21       *
22       * @return a {@link PluginKey}, cannot be {@code null}
23       */
24      PluginKey getPluginKey();
25  
26      /**
27       * The datasource type that this active objects is meant to use.
28       *
29       * @return a valid DataSourceType
30       */
31      DataSourceType getDataSourceType();
32  
33      /**
34       * The prefix to use for table names in the database
35       *
36       * @return the prefix to use for table names in the database.
37       */
38      Prefix getTableNamePrefix();
39  
40      /**
41       * Gets the name converters to use with Active Objects
42       *
43       * @return the name converters
44       */
45      NameConverters getNameConverters();
46  
47      /**
48       * Gets the schema configuration to use with Active Objects
49       *
50       * @return a schema configuration
51       */
52      SchemaConfiguration getSchemaConfiguration();
53  
54      /**
55       * The set of 'configured' entities for the active objects configuration.
56       *
57       * @return a set of entity classes, empty of no entities have been defined.
58       */
59      Set<Class<? extends RawEntity<?>>> getEntities();
60  
61      /**
62       * Gets the upgrade tasks associated with Active Objects
63       *
64       * @return the upgrade tasks
65       */
66      List<ActiveObjectsUpgradeTask> getUpgradeTasks();
67  }