docs: @Override
      protected Deque<XMLEvent> getAdditionalEvents(XMLEvent event) {
          if (event.isStartElement()) {
              final StartElement startElement = event.asStartElement();
  
              // All following logic requires an ID attribute, ignore any element without one
              final Attribute idAttribute =
                      startElement.getAttributeByName(IUserLayoutManager.ID_ATTR_NAME);
              if (idAttribute == null) {
                  return null;
              }
  
              // Create and return a transient (dynamically created) folder that includes a transient
              // channel
              // if we are processing the tart element of the root node
              // iff the subscribeId is present and describes a transient channel and not a regular
              // layout channel.
              final String subscribeId = this.userLayoutManager.getFocusedId();
              if (this.rootFolderId.equals(idAttribute.getValue())
                      && subscribeId != null
                      && !subscribeId.equals("")
                      && this.userLayoutManager.isTransientChannel(subscribeId)) {
  
                  IPortletDefinition chanDef = null;
                  try {
                      chanDef = this.userLayoutManager.getChannelDefinition(subscribeId);
                  } catch (Exception e) {
                      logger.error(
                              "Could not obtain IChannelDefinition for subscribe id: {}",
                              subscribeId,
                              e);
                  }
  
                  if (chanDef != null) {
                      final QName name = startElement.getName();
                      final String namespaceURI = name.getNamespaceURI();
                      final String prefix = name.getPrefix();
  
                      final Deque<XMLEvent> transientEventBuffer = new LinkedList<XMLEvent>();
  
                      final Collection<Attribute> transientFolderAttributes =
                              new LinkedList<Attribute>();
                      transientFolderAttributes.add(
                              EVENT_FACTORY.createAttribute(
                                      "ID", TransientUserLayoutManagerWrapper.TRANSIENT_FOLDER_ID));
                      transientFolderAttributes.add(
                              EVENT_FACTORY.createAttribute(
                                      "name", chanDef != null ? chanDef.getTitle() : "Temporary"));
                      transientFolderAttributes.add(EVENT_FACTORY.createAttribute("type", "regular"));
                      transientFolderAttributes.add(EVENT_FACTORY.createAttribute("hidden", "false"));
                      transientFolderAttributes.add(
                              EVENT_FACTORY.createAttribute("unremovable", "true"));
                      transientFolderAttributes.add(
                              EVENT_FACTORY.createAttribute("immutable", "true"));
                      transientFolderAttributes.add(
                              EVENT_FACTORY.createAttribute("unremovable", "true"));
                      transientFolderAttributes.add(
                              EVENT_FACTORY.createAttribute("dlm:addChildAllowed", "false"));
                      transientFolderAttributes.add(
                              EVENT_FACTORY.createAttribute("dlm:deleteAllowed", "false"));
                      transientFolderAttributes.add(
                              EVENT_FACTORY.createAttribute("dlm:editAllowed", "false"));
                      transientFolderAttributes.add(
                              EVENT_FACTORY.createAttribute("dlm:moveAllowed", "false"));
                      transientFolderAttributes.add(
                              EVENT_FACTORY.createAttribute("dlm:precedence", "100.0"));
                      transientFolderAttributes.add(
                              EVENT_FACTORY.createAttribute("transient", "true"));
  
                      final StartElement transientFolder =
                              EVENT_FACTORY.createStartElement(
                                      prefix,
                                      namespaceURI,
                                      IUserLayoutManager.FOLDER,
                                      transientFolderAttributes.iterator(),
                                      null);
                      transientEventBuffer.add(transientFolder);
  
                      // TODO Move IChannelDefinition/IPortletDefinition -> StAX events code somewhere
                      // reusable
                      final Collection<Attribute> channelAttrs = new LinkedList<Attribute>();
                      channelAttrs.add(EVENT_FACTORY.createAttribute("ID", subscribeId));
                      channelAttrs.add(
                              EVENT_FACTORY.createAttribute(
                                      "typeID", Integer.toString(chanDef.getType().getId())));
                      channelAttrs.add(EVENT_FACTORY.createAttribute("hidden", "false"));
                      channelAttrs.add(EVENT_FACTORY.createAttribute("unremovable", "true"));
                      channelAttrs.add(EVENT_FACTORY.createAttribute("dlm:deleteAllowed", "false"));
                      channelAttrs.add(EVENT_FACTORY.createAttribute("dlm:moveAllowed", "false"));
                      channelAttrs.add(EVENT_FACTORY.createAttribute("name", chanDef.getName()));
                      channelAttrs.add(
                              EVENT_FACTORY.createAttribute("description", chanDef.getDescription()));
                      channelAttrs.add(EVENT_FACTORY.createAttribute("title", chanDef.getTitle()));
                      channelAttrs.add(
                              EVENT_FACTORY.createAttribute(
                                      "chanID", chanDef.getPortletDefinitionId().getStringId()));
                      channelAttrs.add(EVENT_FACTORY.createAttribute("fname", chanDef.getFName()));
                      channelAttrs.add(
                              EVENT_FACTORY.createAttribute(
                                      "timeout", Integer.toString(chanDef.getTimeout())));
                      channelAttrs.add(EVENT_FACTORY.createAttribute("transient", "true"));
  
                      final StartElement startChannel =
                              EVENT_FACTORY.createStartElement(
                                      prefix,
                                      namespaceURI,
                                      IUserLayoutManager.CHANNEL,
                                      channelAttrs.iterator(),
                                      null);
                      transientEventBuffer.offer(startChannel);
  
                      // add channel parameter elements
                      for (final IPortletDefinitionParameter parm : chanDef.getParameters()) {
                          final Collection<Attribute> parameterAttrs = new LinkedList<Attribute>();
                          parameterAttrs.add(EVENT_FACTORY.createAttribute("name", parm.getName()));
                          parameterAttrs.add(EVENT_FACTORY.createAttribute("value", parm.getValue()));
  
                          final StartElement startParameter =
                                  EVENT_FACTORY.createStartElement(
                                          prefix,
                                          namespaceURI,
                                          IUserLayoutManager.PARAMETER,
                                          parameterAttrs.iterator(),
                                          null);
                          transientEventBuffer.offer(startParameter);
  
                          final EndElement endParameter =
                                  EVENT_FACTORY.createEndElement(
                                          prefix, namespaceURI, IUserLayoutManager.PARAMETER, null);
                          transientEventBuffer.offer(endParameter);
                      }
  
                      final EndElement endChannel =
                              EVENT_FACTORY.createEndElement(
                                      prefix, namespaceURI, IUserLayoutManager.CHANNEL, null);
                      transientEventBuffer.offer(endChannel);
  
                      final EndElement endFolder =
                              EVENT_FACTORY.createEndElement(
                                      prefix, namespaceURI, IUserLayoutManager.FOLDER, null);
                      transientEventBuffer.offer(endFolder);
  
                      return transientEventBuffer;
                  } else { // I don't think subscribeId could be null, but log warning if so.
                      logger.warn(
                              "Unable to resolve portlet definition for subscribe ID {}",
                              subscribeId);
                  }
              }
          }
  
          return null;
      }