Interface IContextNatureProvider


public interface IContextNatureProvider
Interface for contribution of Project nature recognition logic.
Author:
POLARION SOFTWARE
  • Method Details

    • getProjectIdForLocation

      String getProjectIdForLocation(ILocation loc)
      This method is used during decision, how the IContextId for given location will look like - whether it's a project one or group one.

      Call to locationsMoved(List) will update this information.

      Parameters:
      loc -
      Returns:
      The project Id for locations, which are roots of projects, null otherwise.
    • determineContextNature

      ContextNature determineContextNature(IContext ctx)
      Determines the nature for given context. The nature logic/consistency is maintained by the ContextService, which is able to recognize ContextNature.ROOT_NATURE ContextNature.REPOSITORY_NATURE. Contexts below these are travesrsed and passed to this function. If null is returned, than child contexts are examined. If there is any child (even deep one) with ContextNature.PROJECT_NATURE then the context receives ContextNature.PROJECT_GROUP_NATURE, otherwise it's not considered context any more. If ContextNature.IGNORE_NATURE is returned, than the context and it's children are ignored (are not considered being contexts any more).
      Parameters:
      ctx -
      Returns:
      Either null, ContextNature.PROJECT_NATURE or ContextNature.IGNORE_NATURE.
    • setContextService

      void setContextService(IContextService contextService)
      Used to init with context service, which might be needed to implementation of IContextObjectMapper. This method should be called by the ContextService itself
      Parameters:
      contextService -
    • locationsMoved

      void locationsMoved(List locationPairs)
      Notification, that location, which maps-to (and possibly contains) some contexts was moved.

      Called by the service, so that the provider can update it's internal state, before the procession of the new locations will start.

      Parameters:
      locationPairs - List of ILocation[] { oldLoc, newLoc } of all locations, which map to a context and were moved
    • getHistoricalLocations

      Collection<ILocation> getHistoricalLocations(String projectId)
      Since:
      3.5.3