Class AbstractWrappingExtension<E extends Extension>

    • Constructor Detail

      • AbstractWrappingExtension

        public AbstractWrappingExtension​(E extension)
        Parameters:
        extension - the wrapped extension
      • AbstractWrappingExtension

        protected AbstractWrappingExtension()
        A default constructor allowing to set the wrapped object later.
    • Method Detail

      • setOverwrite

        public void setOverwrite​(String key,
                                 Object value)
        Parameters:
        key - the key associated to the Extension field (usually found in Extension constants) to overwrite
        value - the value to overwrite
        Since:
        9.0RC1, 8.4.2
      • get

        public <T> T get​(String fieldName)
        Description copied from interface: Extension
        Get an extension field (name, summary, id, etc.) by name. Fallback on properties.
        Specified by:
        get in interface Extension
        Type Parameters:
        T - type of the field value
        Parameters:
        fieldName - the field name;
        Returns:
        the field value or null if none could be found
      • getId

        public ExtensionId getId()
        Specified by:
        getId in interface Extension
        Returns:
        the id/version combination which makes the extension unique
      • getFeatures

        @Deprecated
        public Collection<String> getFeatures()
        Deprecated.
        Description copied from interface: Extension
        Indicate in an extension a list of provided "functionalities". Then when resolving extensions dependencies they can be matched in this list.
        Specified by:
        getFeatures in interface Extension
        Returns:
        the extension ids also provided by this extension, an empty collection if there is none
      • getExtensionFeatures

        public Collection<ExtensionId> getExtensionFeatures()
        Description copied from interface: Extension
        Indicate in an extension a list of provided "functionalities". Then when resolving extensions dependencies they can be matched in this list.
        Specified by:
        getExtensionFeatures in interface Extension
        Returns:
        the ExtensionIds also provided by this extension, an empty collection if there is none
      • getType

        public String getType()
        Specified by:
        getType in interface Extension
        Returns:
        the type of the extension, null if the extension does not have any associated file
      • getName

        public String getName()
        Specified by:
        getName in interface Extension
        Returns:
        the display name of the extension
      • getSummary

        public String getSummary()
        Specified by:
        getSummary in interface Extension
        Returns:
        a short description of the extension
      • getWebSite

        public String getWebSite()
        Specified by:
        getWebSite in interface Extension
        Returns:
        an URL for the extension website
      • getManagedDependencies

        public Collection<ExtensionDependency> getManagedDependencies()
        Description copied from interface: Extension
        Managed dependencies are used to override transitive dependencies (usually the version of this transitive dependency).
        Specified by:
        getManagedDependencies in interface Extension
        Returns:
        the managed dependencies, empty list if there is none
      • getFile

        public ExtensionFile getFile()
        Description copied from interface: Extension
        Access the associated extension file content.
        Specified by:
        getFile in interface Extension
        Returns:
        the file of the extension
      • getScm

        public ExtensionScm getScm()
        Specified by:
        getScm in interface Extension
        Returns:
        informations related to extensions's source control management
      • getCategory

        public String getCategory()
        Specified by:
        getCategory in interface Extension
        Returns:
        the category of the extension
      • getProperties

        public Map<String,​Object> getProperties()
        Description copied from interface: Extension
        Extends Extension standard properties.

        Theses are generally provided by specific repositories. For example a maven repository will provide group and artifacts ids.

        Specified by:
        getProperties in interface Extension
        Returns:
        the properties
      • getProperty

        public <T> T getProperty​(String key)
        Specified by:
        getProperty in interface Extension
        Type Parameters:
        T - type of the property value
        Parameters:
        key - the property key
        Returns:
        the property value
      • getProperty

        public <T> T getProperty​(String key,
                                 T def)
        Description copied from interface: Extension
        Get a property.
        Specified by:
        getProperty in interface Extension
        Type Parameters:
        T - type of the property value
        Parameters:
        key - the property key
        def - the value to return if no property is associated to the provided key
        Returns:
        the property value or default of the property is not found
        See Also:
        Extension.getProperty(String)