throws TopicExpressionResolutionException,
InvalidTopicExpressionException
{
Topic[] results;
validateTopicPath( topicPath );
TopicNamespace topicNs = getTopicNamespace( topicNsRegistry, topicPath );
if ( ( topicPath.getLocalPart( ).indexOf( "/" ) != -1 )
|| ( topicPath.getLocalPart( ).indexOf( "*" ) != -1 )
|| ( topicPath.getLocalPart( ).indexOf( "|" ) != -1 )
|| ( topicPath.getLocalPart( ).indexOf( "." ) != -1 ) )
{
throw new InvalidTopicExpressionException( "Topic path '" + topicPath
+ "' contains one or more illegal characters ('/', '*', '|' or '.')." );
}
String name = topicPath.getLocalPart( );
Topic topic = topicNs.getTopic( name );
if ( topic != null )
{
results = new Topic[]
{
topic