code: public Map<String, CmsDefaultSet<String>> getAllowedContextMap(CmsObject cms) {
  
          Map<String, CmsDefaultSet<String>> result = new HashMap<String, CmsDefaultSet<String>>();
          for (I_CmsResourceType resType : getResourceTypes()) {
              if (resType instanceof CmsResourceTypeXmlContent) {
                  String schema = null;
                  try {
                      schema = ((CmsResourceTypeXmlContent)resType).getSchema();
                      if (schema != null) {
                          CmsXmlContentDefinition contentDefinition = CmsXmlContentDefinition.unmarshal(cms, schema);
  
                          CmsDefaultSet<String> allowedContexts = contentDefinition.getContentHandler().getAllowedTemplates();
                          result.put(resType.getTypeName(), allowedContexts);
                      } else {
                          LOG.info(
                              "No schema for XML type " + resType.getTypeName() + " / " + resType.getClass().getName());
                      }
                  } catch (Exception e) {
                      LOG.error(
                          "Error in getAllowedContextMap, schema="
                              + schema
                              + ", type="
                              + resType.getTypeName()
                              + ", "
                              + e.getLocalizedMessage(),
                          e);
                  }
              }
          }
          return result;
      }
docs: Gets the map of forbidden contexts for resource types.<p>
  
  @param cms the current CMS context
  @return the map from resource types to the forbidden contexts