Class ImportsManagerExtension


  • public class ImportsManagerExtension
    extends Object
    Extension for ObjectModel to manage imports for all classifiers in the model. Created: 2 nov. 2009
    Author:
    Florian Desbois - desbois@codelutin.com, Tony Chemit - chemit@codelutin.com
    • Field Detail

      • OBJECTMODEL_EXTENSION

        public static final String OBJECTMODEL_EXTENSION
        Extension static used to identify ImportsManagerExtension in ObjectModel
        See Also:
        Constant Field Values
      • managers

        protected Map<String,​ImportsManager> managers
        Map of ImportsManager with key equals to the classifier qualified name associated to the ImportsManager.
    • Constructor Detail

      • ImportsManagerExtension

        public ImportsManagerExtension()
    • Method Detail

      • getManager

        public ImportsManager getManager​(ObjectModelClassifier classifier)
        Get the ImportsManager associated to the classifier. Note: if not exist, it will be created.
        Parameters:
        classifier - reference for the ImportsManager
        Returns:
        the importsManager associated to the classifier (never null)
      • getManager

        public ImportsManager getManager​(String fqn)
        Get the ImportsManager associated to the given fqn. Note: if not exist, it will be created.
        Parameters:
        fqn - reference for the ImportsManager
        Returns:
        the importsManager associated to the classifier (never null)
        Since:
        2.3.2
      • getImports

        public List<String> getImports​(ObjectModelClassifier classifier)
        Get imports for a classifier. The ImportsManager must be defined in the model.
        Parameters:
        classifier - reference for the imports
        Returns:
        a List of String which contains all imports for the classifier
      • getImports

        public List<String> getImports​(String fqn,
                                       String packageName)
        Get imports for a classifier. The ImportsManager must be defined in the model.
        Parameters:
        fqn - reference for the imports
        packageName - package name of the fqn
        Returns:
        a List of String which contains all imports for the classifier
        Since:
        2.3.2