Taxonomy-driven Adaptation of Multi-Layer Applications Using Templates