PolicyActivator activator;
if (policyType == PolicyType.THEME) {
activator = new ThemeActivator(referenceFactory);
} else if (policyType == PolicyType.LAYOUT) {
activator = new LayoutActivator(referenceFactory);
} else {
activator = variablePolicyActivator;
}
policyActivator.addActivator(policyType, activator);
}