When developing systems based on COTS, components need to be adapted in most of the occasions to work under certain conditions which were not initially predicted by their developers. Thus, it is very important to provide systems with the skill to dynamically alter their behaviour while running, depending on the changing conditions of the environment. In this work we describe a context-dependent, dynamic mapping between the interfaces of the components being adapted, overcoming some of the limitations of the static mappings presented in previous works. This is achieved by means of contextual environments, which define flexible adaptation policies. We also present a case study, illustrating the proposal, and discuss the improvements these mappings represent in comparison with previous works, as well as some open issues. Key words: Adaptation, dynamic, flexible, component, contextual environment, mapping, behaviour, interoperability.