Class PluginState

All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent

public class PluginState extends AbstractInitializableComponent
A class which will answer questions about a plugin state as of now (by querying the information Resources for the current published state).
  • Field Details

    • plugin

      @Nonnull private final IdPPlugin plugin
      The plug in in question.
    • myPluginInfo

      @NonnullAfterInit private PluginInfo myPluginInfo
      My Plugin Info.
    • myPluginVersion

      @Nonnull private final PluginVersion myPluginVersion
      The version of this plugin.
    • log

      @Nonnull private final org.slf4j.Logger log
      Class logger.
    • httpClient

      @NonnullAfterInit private org.apache.http.client.HttpClient httpClient
      The HttpClient to use.
    • updateOverrideURLs

      @Nonnull private final List<URL> updateOverrideURLs
      If overridden these are the urls to us for update (rather than what the plguin asks for.
  • Constructor Details

    • PluginState

      public PluginState(@Nonnull IdPPlugin description, List<URL> updateOverrides)
      Constructor.
      Parameters:
      description - what we are talking about.
      updateOverrides - override for update locations. An empty list signifies no overrride.
  • Method Details

    • getPluginInfo

      public PluginInfo getPluginInfo()
      get our PluginInfo.
      Returns:
      our PluginInfo.
    • populate

      private boolean populate(@Nonnull Resource propertyResource)
      (try to) populate the information about this plugin.
      Parameters:
      propertyResource - where to start looking
      Returns:
      whether it worked
    • setHttpClient

      public void setHttpClient(@Nonnull org.apache.http.client.HttpClient what)
      Set the client.
      Parameters:
      what - what to set.
    • doInitialize

      protected void doInitialize() throws ComponentInitializationException
      Overrides:
      doInitialize in class AbstractInitializableComponent
      Throws:
      ComponentInitializationException