if (subResourceDefinitions == null) {
subResourceDefinitions = new HashSet<SubResourceDefinition>();
ViewDefinition definition = getDefinition(viewName);
if (definition != null) {
for (Resource.Type type : definition.getViewResourceTypes()) {
subResourceDefinitions.add(new SubResourceDefinition(type));
}
}
subResourceDefinitionsMap.put(viewName, subResourceDefinitions);
}
return subResourceDefinitions;