Interface IModule

All Superinterfaces:
IndexAugmenter

public interface IModule extends IndexAugmenter
Contract that every Goobi viewer extension module must implement. Provides identity and version information, configuration access, UI contribution hooks (sidebar widgets, admin links, CMS menu entries), task-type registration, and lifecycle callbacks for record resets and user-content management.
  • Method Details

    • getId

      String getId()
      getId.
      Returns:
      the unique identifier of this module
    • getName

      String getName()
      getName.
      Returns:
      the display name of this module
    • getVersion

      String getVersion()
      getVersion.
      Returns:
      the version string of this module
    • getVersionJson

      String getVersionJson()
      Returns:
      JSON object with version data
    • isLoaded

      boolean isLoaded()
      isLoaded.
      Returns:
      true if this module has been successfully loaded and is active, false otherwise
    • getConfiguration

      AbstractConfiguration getConfiguration()
      Module configuration object.
      Returns:
      the configuration object for this module
    • getCmsMenuContributions

      Map<String,String> getCmsMenuContributions()
      URLs for the CMS menu.
      Returns:
      a map of display labels to URLs for this module's CMS menu contributions
    • getSidebarContributions

      List<String> getSidebarContributions()
      URLs to sidebar widgets.
      Returns:
      a list of sidebar widget URLs contributed by this module
    • getWidgetUsageContributions

      List<String> getWidgetUsageContributions()
      Contributions widget_usage.xhtml.
      Returns:
      List of HTML component URLs.
    • getAdminContributions

      List<String> getAdminContributions()
      URLs to widgets containing admin menu links.
      Returns:
      a list of admin widget URLs contributed by this module
    • getLoginNavigationContributions

      List<String> getLoginNavigationContributions()
      URLs to widgets containing navigation menu links.
      Returns:
      a list of login navigation widget URLs contributed by this module
    • getWidgets

      List<String> getWidgets(String type)
      Generic widget URLs than can be used from virtually anywhere. The URLs are configured in the config file.
      Parameters:
      type - widget type identifier from configuration
      Returns:
      a list of widget URLs of the given type contributed by this module
    • getTaskTypes

      List<ITaskType> getTaskTypes()
      Returns available quartz types.
      Returns:
      List
    • augmentResetRecord

      boolean augmentResetRecord()
      Any clean-up the module might want to do when resetting the currently loaded record.
      Returns:
      true if successful; false otherwise
    • deleteUserContributions

      int deleteUserContributions(User user)
      Removes content created by the given user.
      Parameters:
      user - User whose content to delete
      Returns:
      Number of deleted contributions
    • moveUserContributions

      int moveUserContributions(User fromUser, User toUser)
      Moves all content created by the given user to a different user.
      Parameters:
      fromUser - Source user
      toUser - Destination user
      Returns:
      Number of updated rows
    • getURLBuilder

      default Optional<IURLBuilder> getURLBuilder()
      getURLBuilder.
      Returns:
      the IURLBuilder for this module, if any. If this module should not alter url building, an empty optional should be returned