Cargo
  1. Cargo
  2. CARGO-446

ConfigurationFactory and ConfigurationCapabilityFactory APIs should take a ContainerType as parameter

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.8
    • Fix Version/s: 0.9
    • Component/s: Generic
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      We need to allow the possibility to register a given configuration/configuration capability only for a given container. A container is uniquely identified by 2 parameters: id and type.

      Right now the APIs only takes the container id, which means that all current implementations must support all container types which is not right.

      Here's what the new API will look like:

      public interface ConfigurationFactory
      {
          void registerConfiguration(String containerId, ContainerType containerType,
              ConfigurationType configurationType, Class configurationClass);
      
          Class getConfigurationClass(String containerId, ContainerType containerType,
              ConfigurationType configurationType);
      
          boolean isConfigurationRegistered(String containerId, ContainerType containerType,
              ConfigurationType configurationType);
      
          Configuration createConfiguration(String containerId, ContainerType containerType,
              ConfigurationType configurationType);
      
          Configuration createConfiguration(String containerId, ContainerType containerType,
              ConfigurationType configurationType, String home);
      }
      

      And

      public interface ConfigurationCapabilityFactory
      {
          void registerConfigurationCapability(String containerId, ContainerType containerType,
              ConfigurationType configurationType, Class configurationCapabilityClass);
      
          ConfigurationCapability createConfigurationCapability(String containerId,
              ContainerType containerType, ConfigurationType configurationType);
      }
      

        Activity

        Hide
        Vincent Massol added a comment -

        Done

        Show
        Vincent Massol added a comment - Done

          People

          • Assignee:
            Vincent Massol
            Reporter:
            Vincent Massol
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: