if(temp == null) {
if (idx == 0) {
String type = element.getKey();
if (type.equals(EXTENSION)) {
// Needs a specialized resource type
temp = new ExtensionResource(element.getValue(), extensionRegistry);
context.addResource(resourceAddress, temp);
} else if (type.equals(MANAGEMENT_CLIENT_CONTENT) && element.getValue().equals(ROLLOUT_PLANS)) {
// Needs a specialized resource type
temp = new ManagedDMRContentTypeResource(element, ROLLOUT_PLAN, null, contentRepository);
context.addResource(resourceAddress, temp);