Class BaseZapAddOnXmlData

  • Direct Known Subclasses:
    ZapAddOnXmlFile, ZapVersionsAddOnEntry

    public abstract class BaseZapAddOnXmlData
    extends java.lang.Object
    Base class that reads common ZapAddOn XML data.

    Reads:

    • name;
    • status (since 2.6.0);
    • version;
    • semver (since 2.7.0, deprecated in favour of using version);
    • description;
    • author;
    • url;
    • repo (URL of browsable repository);
    • changes;
    • not-before-version;
    • not-from-version;
    • dependencies:
      • javaversion;
      • addon:
        • id;
        • version;
        • not-before-version (since 2.7.0, deprecated in favour of using version);
        • not-from-version (since 2.7.0, deprecated in favour of using version);
        • semver (since 2.7.0, deprecated in favour of using version).
    • extensions
      • extension
      • extension v=1:
        • classname;
        • dependencies:
          • javaversion;
          • addon:
            • id;
            • version;
            • not-before-version (since 2.7.0, deprecated in favour of using version);
            • not-from-version (since 2.7.0, deprecated in favour of using version);
            • semver (since 2.7.0, deprecated in favour of using version).
    Since:
    2.4.0
    • Constructor Detail

      • BaseZapAddOnXmlData

        public BaseZapAddOnXmlData​(java.io.InputStream inputStream)
                            throws java.io.IOException
        Constructs a BaseZapAddOnXmlData with the given inputStream as the source of the ZapAddOn XML data.
        Parameters:
        inputStream - the source of the ZapAddOn XML data.
        Throws:
        java.lang.NullPointerException - if the given input stream is null.
        java.io.IOException - if an error occurs while reading the data
      • BaseZapAddOnXmlData

        public BaseZapAddOnXmlData​(org.apache.commons.configuration.HierarchicalConfiguration zapAddOnXml)
        Constructs a BaseZapAddOnXmlData with the given zapAddOnXml HierarchicalConfiguration as the source of the ZapAddOn XML data.
        Parameters:
        zapAddOnXml - the source of the ZapAddOn XML data.
    • Method Detail

      • readAdditionalData

        protected void readAdditionalData​(org.apache.commons.configuration.HierarchicalConfiguration zapAddOnData)
        Reads additional data from the ZapAddOn XML.

        Called after reading the common data.

        Parameters:
        zapAddOnData - the source of the ZapAddOn XML data.
      • getName

        public java.lang.String getName()
      • getStatus

        public java.lang.String getStatus()
        Returns the status of the add-on, "alpha", "beta" or "release".
        Returns:
        the status of the add-on
        Since:
        2.6.0
      • getDescription

        public java.lang.String getDescription()
      • getAuthor

        public java.lang.String getAuthor()
      • getPackageVersion

        @Deprecated
        public int getPackageVersion()
        Deprecated.
        (2.7.0) Use getVersion() instead.
        Gets the package/file version of the add-on.
        Returns:
        the package/file version
      • getVersion

        public Version getVersion()
      • getSemVer

        public Version getSemVer()
      • getChanges

        public java.lang.String getChanges()
      • getRepo

        public java.lang.String getRepo()
        Gets the URL to the browsable repo.
        Returns:
        the URL to the repo, might be null.
        Since:
        2.9.0
      • getUrl

        public java.lang.String getUrl()
      • getAddOnClassnames

        public org.zaproxy.zap.control.AddOnClassnames getAddOnClassnames()
      • getNotBeforeVersion

        public java.lang.String getNotBeforeVersion()
      • getNotFromVersion

        public java.lang.String getNotFromVersion()
      • getExtensions

        public java.util.List<java.lang.String> getExtensions()
      • getStrings

        protected java.util.List<java.lang.String> getStrings​(org.apache.commons.configuration.HierarchicalConfiguration zapAddOnXml,
                                                              java.lang.String element,
                                                              java.lang.String elementName)