Checks to make sure that the assigned writer for the topic is valid.

@param topic The topic to check the assigned writer for.
@return True if the assigned writer exists in the database and is under the Assigned Writer category otherwise
false.
173855
private boolean postValidateAssignedWriter(final ITopicNode topic) {
        final String writer = topic.getAssignedWriter(true);
        if (!isNullOrEmpty(writer)) {
            // Check Assigned Writer exists
            TagWrapper tag = null;
            try {
                tag = tagProvider.getTagByName(writer);
            } catch (NotFoundException e) {

            }
            if (tag == null) {
                log.error(String.format(ProcessorConstants.ERROR_WRITER_NONEXIST_MSG, topic.getLineNumber(), topic.getText()));
                return false;
            }

            // Check that the writer tag is actually part of the Assigned Writer category
            if (!tag.containedInCategory(serverEntities.getWriterCategoryId())) {
                log.error(String.format(ProcessorConstants.ERROR_INVALID_WRITER_MSG, topic.getLineNumber(), topic.getText()));
                return false;
            }
        }

        return true;
    }
1194883
static public function CheckTopicName($topic_name)
    {
        if (!isset($topic_name[0]) || isset($topic_name[65535])) {
            throw new Exception('Topic name must be at 1~65535 bytes long');
        }

        self::ValidateUTF8($topic_name);

        if (false !== strpos($topic_name, chr(0))) {
            throw new Exception('null character is not allowed in topic');
        }
        if (false !== strpos($topic_name, '#')) {
            throw new Exception('# is not allowed in topic');
        }
        if (false !== strpos($topic_name, '+')) {
            throw new Exception('+ is not allowed in topic');
        }

        if ($topic_name[0] == '$') {
            Debug::Log(Debug::WARN, 'Publish to topics beginning with \'$\' may be ignored by server');
        }
    }
1079325
@Override
	public void check() throws JMSException
	{
		if (destinationType == null)
			throw new InvalidDescriptorException("Missing destination reference property : 'destinationType'");
		if (!destinationType.equals("queue") && !destinationType.equals("topic"))
			throw new InvalidDescriptorException("Destination reference property 'destinationType' should be one of : queue, topic");
		if (destinationName == null)
			throw new InvalidDescriptorException("Missing destination reference property : 'destinationName'");
	}
9183
private void _checkAndSubscribe(KafkaConsumer<?, ?> consumer, String topic) {
        synchronized (consumer) {
            Set<String> subscription = consumer.subscription();
            if (subscription == null || !subscription.contains(topic)) {
                consumer.subscribe(Arrays.asList(topic));
            }
        }
    }
1166863
public static void checkTopicName( String topicName ) throws JMSException
    {
        if (topicName == null)
            throw new FFMQException("Topic name is not set","INVALID_DESTINATION_NAME");      
        if (topicName.length() > FFMQConstants.MAX_TOPIC_NAME_SIZE)
            throw new FFMQException("Topic name '"+topicName+"' is too long ("+topicName.length()+" > "+FFMQConstants.MAX_TOPIC_NAME_SIZE+")","INVALID_DESTINATION_NAME");
        checkDestinationName(topicName);
    }
949745
def pause_topic(self, topic):
        
        nsq.assert_valid_topic_name(topic)
        return self._request('POST', '/topic/pause', fields={'topic': topic})
777681
void checkTopicPublishPermission(String topic) {
        SecurityManager sm = System.getSecurityManager();
        if (sm == null)
            return;

        sm.checkPermission(new TopicPermission(topic, PUBLISH));
    }
745265
def unpause_topic(self, topic):
        """"""
        nsq.assert_valid_topic_name(topic)
        return self._request('POST', '/topic/unpause', fields={'topic': topic})
1028255
function isAncestorTopic (topic, node) {
    var nodeTopic = getTopic(node);

    return topic === nodeTopic
      || startsWith(topic, nodeTopic + '.')
      || nodeTopic === '';
  }
1280276
public static boolean isTopicANormalTopic(final BaseTopicWrapper<?> topic, final ServerSettingsWrapper serverSettings) {
        return !(topic.hasTag(serverSettings.getEntities().getRevisionHistoryTagId()) || topic.hasTag(
                serverSettings.getEntities().getLegalNoticeTagId()) || topic.hasTag(
                serverSettings.getEntities().getAuthorGroupTagId()) || topic.hasTag(
                serverSettings.getEntities().getInfoTagId()) || topic.hasTag(serverSettings.getEntities().getAbstractTagId()));
    }
583917
public boolean send(String topic, String message) throws IOException {
        List<Session> sessions = topicSubscribers.get(topic);
        if (sessions != null) {
            for (Session session : sessions) {
                session.getBasicRemote().sendText(message);
            }
        }
        return sessions != null;
    }
356412
private final void checkTopicNotNull(String topic) 
    throws InvalidTopicSyntaxException
  {
    if (topic == null)
      throw new InvalidTopicSyntaxException(
        NLS.format(
          "INVALID_TOPIC_ERROR_CWSIH0005",
          new Object[] { topic }));
  }
6256
@Override
	public boolean write(Writer writer) throws IOException {

		writeBlock(writer, EmblPadding.PA_PADDING, accession);

		return true;
	}
887452
private boolean topicImplicity(final String topic, final String[] splitTopic) {

        try {
            return topicMatcher.matches(stripedTopic, this.splitTopic, nonWildCard, endsWithWildCard, rootWildCard, topic, splitTopic);
        } catch (InvalidTopicException e) {
            return false;
        }
    }
334779
@Then("^A kafka topic named '(.+?)' exists")
    public void kafkaTopicExist(String topic_name) throws KeeperException, InterruptedException {
        assert commonspec.getKafkaUtils().getZkUtils().pathExists("/" + topic_name) : "There is no topic with that name";
    }
66619
public static boolean isCategoryOnlyCriteria(final Criteria criteria) {

        return  isEmpty(criteria.getAliases()) &&      // we are not subscribing to alias topic (yet)
                isEmpty(criteria.getDeviceTypes()) &&  // we are not subscribing to device type topic (yet)
                !isEmpty(criteria.getCategories());    // BUT! categories are mapped to topics
    }
1216501
def add_topic(self, topic):
        
        if topic in self._topics:
            return Future().success(set(self._topics))

        self._topics.add(topic)
        return self.cluster.request_update()