code: protected void initVisibilities(Element root, CmsXmlContentDefinition contentDefinition) {
  
          m_visibilityConfigurations = new HashMap<String, VisibilityConfiguration>();
          String mainHandlerClassName = root.attributeValue(APPINFO_ATTR_CLASS);
          // using self as the default visibility handler implementation
          I_CmsXmlContentVisibilityHandler mainHandler = this;
          if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(mainHandlerClassName)) {
              try {
                  // in case there is a main handler configured, try to instanciate it
                  Class<?> handlerClass = Class.forName(mainHandlerClassName);
                  mainHandler = (I_CmsXmlContentVisibilityHandler)handlerClass.newInstance();
              } catch (Exception e) {
                  LOG.error(e.getLocalizedMessage(), e);
              }
          }
          List<Element> elements = new ArrayList<Element>(CmsXmlGenericWrapper.elements(root, APPINFO_VISIBILITY));
          for (Element element : elements) {
              try {
                  String elementName = element.attributeValue(APPINFO_ATTR_ELEMENT);
                  String handlerClassName = element.attributeValue(APPINFO_ATTR_CLASS);
                  String params = element.attributeValue(APPINFO_ATTR_PARAMS);
                  I_CmsXmlContentVisibilityHandler handler = null;
                  if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(handlerClassName)) {
  
                      Class<?> handlerClass = Class.forName(handlerClassName);
                      handler = (I_CmsXmlContentVisibilityHandler)handlerClass.newInstance();
                  } else {
                      handler = mainHandler;
                  }
                  m_visibilityConfigurations.put(elementName, new VisibilityConfiguration(handler, params));
  
              } catch (Exception e) {
                  LOG.error(e.getLocalizedMessage(), e);
              }
          }
      }
docs: Initializes the content visibility settings.<p>
  
  @param root the visibilities appinfo element
  @param contentDefinition the content definition