Package org.xwiki.extension
Class AbstractRatingExtension
- java.lang.Object
-
- org.xwiki.extension.AbstractExtension
-
- org.xwiki.extension.AbstractRemoteExtension
-
- org.xwiki.extension.AbstractRatingExtension
-
- All Implemented Interfaces:
Comparable<Extension>
,Extension
,MutableExtension
,Rating
,RatingExtension
,RemoteExtension
public abstract class AbstractRatingExtension extends AbstractRemoteExtension implements RatingExtension
Base class forRatingExtension
implementations.- Since:
- 7.2M1
- Version:
- $Id: d1a34e9ba413e6e78789ec296c684339d615eab6 $
-
-
Field Summary
Fields Modifier and Type Field Description protected ExtensionRating
rating
-
Fields inherited from class org.xwiki.extension.AbstractRemoteExtension
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.rating.RatingExtension
FIELD_AVERAGE_VOTE, FIELD_RATING, FIELD_TOTAL_VOTES
-
Fields inherited from interface org.xwiki.extension.RemoteExtension
FIELD_RECOMMENDED
-
-
Constructor Summary
Constructors Constructor Description AbstractRatingExtension(ExtensionRepository repository, Extension extension)
Create new extension descriptor by copying provided one.AbstractRatingExtension(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.ExtensionRating
getRating()
void
setRating(ExtensionRating rating)
-
Methods inherited from class org.xwiki.extension.AbstractRemoteExtension
isRecommended, setRecommended
-
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
-
Methods inherited from interface org.xwiki.extension.RemoteExtension
isRecommended
-
-
-
-
Field Detail
-
rating
protected ExtensionRating rating
- See Also:
getRating()
-
-
Constructor Detail
-
AbstractRatingExtension
public AbstractRatingExtension(ExtensionRepository repository, ExtensionId id, String type)
- Parameters:
repository
- the repository where this extension comes fromid
- the extension identifiertype
- the extension type
-
AbstractRatingExtension
public AbstractRatingExtension(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
-
getRating
public ExtensionRating getRating()
-
setRating
public void setRating(ExtensionRating rating)
- Parameters:
rating
- an extension's rating
-
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 classAbstractRemoteExtension
- Type Parameters:
T
- type of the field value- Parameters:
fieldName
- the field name;- Returns:
- the field value or null if none could be found
-
-