Package org.xwiki.extension
Class AbstractRemoteExtension
- java.lang.Object
-
- org.xwiki.extension.AbstractExtension
-
- org.xwiki.extension.AbstractRemoteExtension
-
- All Implemented Interfaces:
Comparable<Extension>
,Extension
,MutableExtension
,RemoteExtension
- Direct Known Subclasses:
AbstractRatingExtension
public abstract class AbstractRemoteExtension extends AbstractExtension implements RemoteExtension
Base class forRatingExtension
implementations.- Since:
- 8.3RC1
- Version:
- $Id: bd6c79b156d3c8edce4c1c4a53b64fbc70b15fa7 $
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
recommended
-
Fields inherited from class org.xwiki.extension.AbstractExtension
allowedNamespaces, authors, category, components, dependencies, description, features, featuresMap, file, id, issueManagement, licenses, managedDependencies, name, properties, propertiesLock, repositories, repository, scm, summary, type, website
-
Fields inherited from interface org.xwiki.extension.Extension
FIELD_ALLOWEDNAMESPACE, FIELD_ALLOWEDNAMESPACES, FIELD_AUTHOR, FIELD_AUTHORS, FIELD_CATEGORY, FIELD_COMPONENT, FIELD_COMPONENTS, FIELD_DEPENDENCIES, FIELD_DESCRIPTION, FIELD_EXTENSIONFEATURE, FIELD_EXTENSIONFEATURES, FIELD_FEATURE, FIELD_FEATURES, FIELD_ID, FIELD_ISSUEMANAGEMENT, FIELD_LICENSE, FIELD_LICENSES, FIELD_MANAGEDDEPENDENCIES, FIELD_NAME, FIELD_NAMESPACES, FIELD_PROPERTIES, FIELD_REPOSITORIES, FIELD_REPOSITORY, FIELD_SCM, FIELD_SUMMARY, FIELD_TYPE, FIELD_VERSION, FIELD_WEBSITE, IKEYPREFIX
-
Fields inherited from interface org.xwiki.extension.RemoteExtension
FIELD_RECOMMENDED
-
-
Constructor Summary
Constructors Constructor Description AbstractRemoteExtension(ExtensionRepository repository, Extension extension)
Create new extension descriptor by copying provided one.AbstractRemoteExtension(ExtensionRepository repository, ExtensionId id, String type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
get(String fieldName)
Get an extension field by name.boolean
isRecommended()
Indicate if the extension is recommended by the repository where it come from.void
setRecommended(boolean recommended)
-
Methods inherited from class org.xwiki.extension.AbstractExtension
addAllowedNamespace, addAuthor, addComponent, addDependency, addExtensionFeature, addFeature, addLicense, addManagedDependency, addRepository, compareTo, equals, getAllowedNamespaces, getAuthors, getCategory, getComponents, getDependencies, getDescription, getExtensionFeature, getExtensionFeatures, getFeatures, getFile, getId, getIssueManagement, getLicenses, getManagedDependencies, getName, getProperties, getProperty, getProperty, getRepositories, getRepository, getScm, getSummary, getType, getWebSite, hashCode, putProperty, removeProperty, set, setAllowedNamespaces, setAuthors, setCategory, setComponents, setDependencies, setDescription, setExtensionFeatures, setFeatures, setFile, setId, setIssueManagement, setLicenses, setManagedDependencies, setName, setProperties, setRepositories, setRepository, setScm, setSummary, setType, setWebsite, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface org.xwiki.extension.Extension
getAllowedNamespaces, getAuthors, getCategory, getComponents, getDependencies, getDescription, getExtensionFeature, getExtensionFeatures, getFeatures, getFile, getId, getIssueManagement, getLicenses, getManagedDependencies, getName, getProperties, getProperty, getProperty, getRepositories, getRepository, getScm, getSummary, getType, getWebSite
-
-
-
-
Field Detail
-
recommended
protected boolean recommended
- See Also:
isRecommended()
-
-
Constructor Detail
-
AbstractRemoteExtension
public AbstractRemoteExtension(ExtensionRepository repository, ExtensionId id, String type)
- Parameters:
repository
- the repository where this extension comes fromid
- the extension identifiertype
- the extension type
-
AbstractRemoteExtension
public AbstractRemoteExtension(ExtensionRepository repository, Extension extension)
Create new extension descriptor by copying provided one.- Parameters:
repository
- the repository where this extension comes fromextension
- the extension to copy
-
-
Method Detail
-
isRecommended
public boolean isRecommended()
Description copied from interface:RemoteExtension
Indicate if the extension is recommended by the repository where it come from.What "recommended" exactly means depend on the repository giving this information.
For example on http://extensions.xwiki.org the meaning is the extension is known to be of good quality and still officially supported by its author.
- Specified by:
isRecommended
in interfaceRemoteExtension
- Returns:
- true if the extension is recommended
-
setRecommended
public void setRecommended(boolean recommended)
- Parameters:
recommended
- true if the extension is recommended- See Also:
isRecommended()
-
get
public <T> T get(String fieldName)
Description copied from class:AbstractExtension
Get an extension field by name. Fallback on properties.- Specified by:
get
in interfaceExtension
- Overrides:
get
in classAbstractExtension
- Type Parameters:
T
- type of the field value- Parameters:
fieldName
- the field name;- Returns:
- the field value or null if none could be found
-
-