Interface ModuleCollisionHook


public interface ModuleCollisionHook
Hook used to determine if a module revision being installed or updated will cause a collision
Since:
3.10
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Specifies a module install operation is being performed.
    static final int
    Specifies a module update operation is being performed.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    filterCollisions(int operationType, Module target, Collection<Module> collisionCandidates)
    Filter bundle collisions hook method.
  • Field Details

    • INSTALLING

      static final int INSTALLING
      Specifies a module install operation is being performed.
      See Also:
    • UPDATING

      static final int UPDATING
      Specifies a module update operation is being performed.
      See Also:
  • Method Details

    • filterCollisions

      void filterCollisions(int operationType, Module target, Collection<Module> collisionCandidates)
      Filter bundle collisions hook method. This method is called during the install or update operation. The operation type will be installing or updating. Depending on the operation type the target module and the collision candidate collection are the following:
      • installing - The target is the module associated which is performing the install operation. The collision candidate collection contains the existing modules installed which have a current revision with the same symbolic name and version as the module being installed.
      • updating - The target is the module being updated. The collision candidate collection contains the existing modules installed which have a current revision with the same symbolic name and version as the content the target module is being updated to.
      This method can filter the collection of collision candidates by removing potential collisions. For the specified operation to succeed, the collection of collision candidates must be empty when this method returns.
      Parameters:
      operationType - The operation type. Must be the value of installing or updating.
      target - The target module used to determine what collision candidates to filter.
      collisionCandidates - The collection of collision candidates.