docs: @SuppressWarnings("unchecked")
      public boolean postValidateTopic(final SpecTopic specTopic, final ContentSpec contentSpec) {
          // Check if the app should be shutdown
          if (isShuttingDown.get()) {
              shutdown.set(true);
              return false;
          }
  
          boolean valid = true;
  
          // New Topics
          if (specTopic.isTopicANewTopic()) {
              // Check that the type entered exists
              TagWrapper type = null;
              try {
                  type = tagProvider.getTagByName(specTopic.getType());
              } catch (NotFoundException e) {
  
              }
  
              if (type == null || !type.containedInCategory(serverEntities.getTypeCategoryId())) {
                  log.error(String.format(ProcessorConstants.ERROR_TYPE_NONEXIST_MSG, specTopic.getLineNumber(), specTopic.getText()));
                  valid = false;
              } else if (specTopic.getTopicType() == TopicType.LEGAL_NOTICE && !type.getId().equals(serverEntities.getLegalNoticeTagId())) {
                  log.error(format(ProcessorConstants.ERROR_INVALID_TYPE_MSG, specTopic.getLineNumber(), specTopic.getText()));
                  valid = false;
              } else if (specTopic.getTopicType() == TopicType.REVISION_HISTORY && !type.getId().equals(
                      serverEntities.getRevisionHistoryTagId())) {
                  log.error(format(ProcessorConstants.ERROR_INVALID_TYPE_MSG, specTopic.getLineNumber(), specTopic.getText()));
                  valid = false;
              } else if (specTopic.getTopicType() == TopicType.AUTHOR_GROUP && !type.getId().equals(serverEntities.getAuthorGroupTagId())) {
                  log.error(format(ProcessorConstants.ERROR_INVALID_TYPE_MSG, specTopic.getLineNumber(), specTopic.getText()));
                  valid = false;
              } else if (specTopic.getTopicType() == TopicType.ABSTRACT && !type.getId().equals(serverEntities.getAbstractTagId())) {
                  log.error(format(ProcessorConstants.ERROR_INVALID_TYPE_MSG, specTopic.getLineNumber(), specTopic.getText()));
                  valid = false;
              }
  
              // Validate the tags
              if (!validateTopicTags(specTopic, specTopic.getTags(false))) {
                  valid = false;
              }
  
              // Check Assigned Writer exists
              if (!postValidateAssignedWriter(specTopic)) {
                  valid = false;
              }
          }
          // Existing Topics
          else if (specTopic.isTopicAnExistingTopic()) {
              // Calculate the revision for the topic
              final Integer revision;
              if (specTopic.getRevision() == null && processingOptions.getMaxRevision() != null) {
                  revision = processingOptions.getMaxRevision();
              } else {
                  revision = specTopic.getRevision();
              }
  
              // Check that the id actually exists
              BaseTopicWrapper<?> topic = null;
              try {
                  if (processingOptions.isTranslation()) {
                      topic = EntityUtilities.getTranslatedTopicByTopicId(factory, Integer.parseInt(specTopic.getId()), revision,
                              processingOptions.getTranslationLocale() == null ? defaultLocale : processingOptions.getTranslationLocale());
                  } else {
                      topic = topicProvider.getTopic(Integer.parseInt(specTopic.getId()), revision);
                  }
              } catch (NotFoundException e) {
                  log.debug("Could not find topic for id " + specTopic.getDBId());
              }
  
              // Check that the topic actually exists
              if (topic == null) {
                  log.error(String.format(ProcessorConstants.ERROR_TOPIC_NONEXIST_MSG, specTopic.getLineNumber(), specTopic.getText()));
                  valid = false;
              } else {
                  specTopic.setTopic(topic);
  
                  // Check to see if the topic contains the "Internal-Only" tag
                  if (serverEntities.getInternalOnlyTagId() != null && topic.hasTag(serverEntities.getInternalOnlyTagId())) {
                      log.warn(String.format(ProcessorConstants.WARN_INTERNAL_TOPIC_MSG, specTopic.getLineNumber(), specTopic.getText()));
                  }
  
                  if (!postValidateExistingTopic(specTopic, topic, contentSpec)) {
                      valid = false;
                  }
              }
              // Cloned Topics
          } else if (specTopic.isTopicAClonedTopic()) {
              // Get the original topic from the database
              int topicId = Integer.parseInt(specTopic.getId().substring(1));
              TopicWrapper topic = null;
              try {
                  topic = topicProvider.getTopic(topicId, specTopic.getRevision());
              } catch (NotFoundException e) {
                  log.debug("Could not find topic for id " + topicId);
              }
  
              // Check that the original topic was found
              if (topic == null) {
                  log.error(String.format(ProcessorConstants.ERROR_TOPIC_NONEXIST_MSG, specTopic.getLineNumber(), specTopic.getText()));
                  valid = false;
              } else {
                  if (!postValidateExistingTopic(specTopic, topic, contentSpec)) {
                      valid = false;
                  }
  
                  // Check Assigned Writer exists
                  if (!postValidateAssignedWriter(specTopic)) {
                      valid = false;
                  }
              }
          }
  
          return valid;
      }