Interface ProjectSettingsManager


  • public interface ProjectSettingsManager
    Allows to specify related projects and build configurations for an abstract service. Also responsible for persistance of the service and build configuration
    Author:
    kir
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clearProjectSettings​(java.lang.String projectInternalId)
      Clears settings of the project with the given internal id
      ProjectSettings getSettings​(java.lang.String projectId, java.lang.String serviceName)
      Create (or return existing) object which allows to manage settings for a particular service
      void readFrom​(org.jdom.Element rootElement, java.lang.String projectId)
      Read project settings from the element rootElement
      void registerSettingsFactory​(java.lang.String serviceName, ProjectSettingsFactory factory)
      Register a custom factory which allows to create instances of ProjectSettings objects
      ProjectSettingsFactory unregisterSettingsFactory​(java.lang.String serviceName)
      Unregister ProjectSettingsFactory if it was registered for given serviceName
      void writeTo​(org.jdom.Element target, java.lang.String projectId)
      Save project settings for all related services to the jdom node
    • Method Detail

      • registerSettingsFactory

        void registerSettingsFactory​(java.lang.String serviceName,
                                     ProjectSettingsFactory factory)
                              throws java.lang.IllegalArgumentException
        Register a custom factory which allows to create instances of ProjectSettings objects
        Parameters:
        serviceName - name of the service, for which this factory is registered; this name is used as a key to obtain service from this manager
        factory - factory for creating ProjectSettings objects
        Throws:
        java.lang.IllegalArgumentException - when there is already a factory for given serviceName
      • unregisterSettingsFactory

        @Nullable
        ProjectSettingsFactory unregisterSettingsFactory​(java.lang.String serviceName)
        Unregister ProjectSettingsFactory if it was registered for given serviceName
        Parameters:
        serviceName - name of the service for the factory to be unregistered
        Returns:
        unregistered factory or null if there is no factory for the serviceName
      • getSettings

        @NotNull
        ProjectSettings getSettings​(java.lang.String projectId,
                                    java.lang.String serviceName)
        Create (or return existing) object which allows to manage settings for a particular service
        Parameters:
        projectId - project internal identifier, for which settings should be created
        serviceName - name of the service
        Returns:
        see above
      • writeTo

        void writeTo​(org.jdom.Element target,
                     java.lang.String projectId)
        Save project settings for all related services to the jdom node
        Parameters:
        projectId - project identifier
        target - should save project settings under given node
      • readFrom

        void readFrom​(org.jdom.Element rootElement,
                      java.lang.String projectId)
        Read project settings from the element rootElement
        Parameters:
        rootElement - element, which contains settings for particular project
        projectId - project identifier, whose settings are read
      • clearProjectSettings

        void clearProjectSettings​(@NotNull
                                  java.lang.String projectInternalId)
        Clears settings of the project with the given internal id
        Parameters:
        projectInternalId - project internal id
        Since:
        9.0.2