Package com.polarion.platform.context
Interface IContextNatureProvider
public interface IContextNatureProvider
Interface for contribution of Project nature recognition logic.
- Author:
- POLARION SOFTWARE
-
Method Summary
Modifier and TypeMethodDescriptionDetermines the nature for given context.getHistoricalLocations(String projectId) This method is used during decision, how theIContextIdfor given location will look like - whether it's a project one or group one.voidlocationsMoved(List locationPairs) Deprecated, for removal: This API element is subject to removal in a future version.voidsetContextService(IContextService contextService) Used to init with context service, which might be needed to implementation ofIContextObjectMapper.
-
Method Details
-
getProjectIdForLocation
This method is used during decision, how theIContextIdfor given location will look like - whether it's a project one or group one.- Parameters:
loc-- Returns:
- The project Id for locations, which are roots of projects,
nullotherwise.
-
determineContextNature
Determines the nature for given context. The nature logic/consistency is maintained by the ContextService, which is able to recognizeContextNature.ROOT_NATUREContextNature.REPOSITORY_NATURE. Contexts below these are travesrsed and passed to this function. Ifnullis returned, than child contexts are examined. If there is any child (even deep one) withContextNature.PROJECT_NATUREthen the context receivesContextNature.PROJECT_GROUP_NATURE, otherwise it's not considered context any more. IfContextNature.IGNORE_NATUREis returned, than the context and it's children are ignored (are not considered being contexts any more).- Parameters:
ctx-- Returns:
- Either
null,ContextNature.PROJECT_NATUREorContextNature.IGNORE_NATURE.
-
setContextService
Used to init with context service, which might be needed to implementation ofIContextObjectMapper. This method should be called by the ContextService itself- Parameters:
contextService-
-
locationsMoved
Deprecated, for removal: This API element is subject to removal in a future version.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
- Since:
- 3.5.3
-