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 for RatingExtension implementations.
Since:
8.3RC1
Version:
$Id: bd6c79b156d3c8edce4c1c4a53b64fbc70b15fa7 $
  • Field Details

  • Constructor Details

    • AbstractRemoteExtension

      public AbstractRemoteExtension(ExtensionRepository repository, ExtensionId id, String type)
      Parameters:
      repository - the repository where this extension comes from
      id - the extension identifier
      type - 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 from
      extension - the extension to copy
  • Method Details

    • 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 interface RemoteExtension
      Returns:
      true if the extension is recommended
    • setRecommended

      public void setRecommended(boolean recommended)
      Parameters:
      recommended - true if the extension is recommended
      See Also:
    • 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 interface Extension
      Overrides:
      get in class AbstractExtension
      Type Parameters:
      T - type of the field value
      Parameters:
      fieldName - the field name;
      Returns:
      the field value or null if none could be found