Package org.zaproxy.zap.control
Class BaseZapAddOnXmlData
- java.lang.Object
-
- org.zaproxy.zap.control.BaseZapAddOnXmlData
-
- Direct Known Subclasses:
ZapAddOnXmlFile
,ZapVersionsAddOnEntry
public abstract class BaseZapAddOnXmlData extends java.lang.Object
Base class that reads commonZapAddOn
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BaseZapAddOnXmlData.AddOnDep
static class
BaseZapAddOnXmlData.Dependencies
static class
BaseZapAddOnXmlData.ExtensionWithDeps
-
Constructor Summary
Constructors Constructor Description BaseZapAddOnXmlData(java.io.InputStream inputStream)
Constructs aBaseZapAddOnXmlData
with the giveninputStream
as the source of theZapAddOn
XML data.BaseZapAddOnXmlData(org.apache.commons.configuration.HierarchicalConfiguration zapAddOnXml)
Constructs aBaseZapAddOnXmlData
with the givenzapAddOnXml
HierarchicalConfiguration
as the source of theZapAddOn
XML data.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.zaproxy.zap.control.AddOnClassnames
getAddOnClassnames()
java.lang.String
getAuthor()
java.lang.String
getChanges()
BaseZapAddOnXmlData.Dependencies
getDependencies()
java.lang.String
getDescription()
java.util.List<java.lang.String>
getExtensions()
java.util.List<BaseZapAddOnXmlData.ExtensionWithDeps>
getExtensionsWithDeps()
java.lang.String
getName()
java.lang.String
getNotBeforeVersion()
java.lang.String
getNotFromVersion()
int
getPackageVersion()
Deprecated.(2.7.0) UsegetVersion()
instead.java.lang.String
getRepo()
Gets the URL to the browsable repo.Version
getSemVer()
java.lang.String
getStatus()
Returns the status of the add-on, "alpha", "beta" or "release".protected java.util.List<java.lang.String>
getStrings(org.apache.commons.configuration.HierarchicalConfiguration zapAddOnXml, java.lang.String element, java.lang.String elementName)
java.lang.String
getUrl()
Version
getVersion()
protected void
readAdditionalData(org.apache.commons.configuration.HierarchicalConfiguration zapAddOnData)
Reads additional data from theZapAddOn
XML.
-
-
-
Constructor Detail
-
BaseZapAddOnXmlData
public BaseZapAddOnXmlData(java.io.InputStream inputStream) throws java.io.IOException
Constructs aBaseZapAddOnXmlData
with the giveninputStream
as the source of theZapAddOn
XML data.- Parameters:
inputStream
- the source of theZapAddOn
XML data.- Throws:
java.lang.NullPointerException
- if the given input stream isnull
.java.io.IOException
- if an error occurs while reading the data
-
BaseZapAddOnXmlData
public BaseZapAddOnXmlData(org.apache.commons.configuration.HierarchicalConfiguration zapAddOnXml)
Constructs aBaseZapAddOnXmlData
with the givenzapAddOnXml
HierarchicalConfiguration
as the source of theZapAddOn
XML data.- Parameters:
zapAddOnXml
- the source of theZapAddOn
XML data.
-
-
Method Detail
-
readAdditionalData
protected void readAdditionalData(org.apache.commons.configuration.HierarchicalConfiguration zapAddOnData)
Reads additional data from theZapAddOn
XML.Called after reading the common data.
- Parameters:
zapAddOnData
- the source of theZapAddOn
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) UsegetVersion()
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()
-
getDependencies
public BaseZapAddOnXmlData.Dependencies getDependencies()
-
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()
-
getExtensionsWithDeps
public java.util.List<BaseZapAddOnXmlData.ExtensionWithDeps> getExtensionsWithDeps()
-
getStrings
protected java.util.List<java.lang.String> getStrings(org.apache.commons.configuration.HierarchicalConfiguration zapAddOnXml, java.lang.String element, java.lang.String elementName)
-
-