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