Package org.apache.ws.notification.topics

Examples of org.apache.ws.notification.topics.TopicNamespace


   public TopicNamespace toTopicNamespace( XmlObject xBean )
   {
      TopicSpaceType topicSpaceType = toTopicSpaceType( xBean );

      // TODO: validate the TopicSpaceType
      TopicNamespace topicNs =
         TopicsTypeFactory.newInstance(  ).createTopicNamespace( topicSpaceType.getTargetNamespace(  ) );
      topicNs.setName( topicSpaceType.getName(  ) );
      importTopics( topicSpaceType.getTopicArray(  ),
                    topicNs );
      return topicNs;
   }
View Full Code Here


   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
View Full Code Here

   throws TopicExpressionResolutionException,
          InvalidTopicExpressionException
   {
      validateTopicPath( topicPath );
      List           matchedTopics = new ArrayList(  );
      TopicNamespace topicNs = getTopicNamespace( topicNsRegistry, topicPath );
      if ( topicPath.getLocalPart(  ).indexOf( "///" ) != -1 )
      {
         throw new InvalidTopicExpressionException( "Topic path '" + topicPath
                                                    + "' contains an empty path component." );
      }
View Full Code Here

    */
   protected TopicNamespace getTopicNamespace( TopicNamespaceRegistry topicNsRegistry,
                                               QName                  topicPath )
   throws TopicExpressionResolutionException
   {
      TopicNamespace topicNs = topicNsRegistry.getTopicNamespace( topicPath.getNamespaceURI(  ) );
      if ( topicNs == null )
      {
         throw new TopicExpressionResolutionException( "Topic path '" + topicPath
                                                       + "' references an unknown TopicNamespace with target namespace '"
                                                       + topicPath.getNamespaceURI(  ) + "'." );
View Full Code Here

   throws TopicExpressionResolutionException,
          InvalidTopicExpressionException
   {
      validateTopicPath( topicPath );
      List           matchedTopics = new ArrayList(  );
      TopicNamespace topicNs = getTopicNamespace( topicNsRegistry, topicPath );
      if ( ( topicPath.getLocalPart(  ).indexOf( "//" ) != -1 )
           || ( topicPath.getLocalPart(  ).indexOf( "*" ) != -1 )
           || ( topicPath.getLocalPart(  ).indexOf( "|" ) != -1 )
           || ( topicPath.getLocalPart(  ).indexOf( "." ) != -1 ) )
      {
View Full Code Here

   {
      m_topicNsRegistry = new TopicNamespaceRegistry(  );

      XmlObject      topicNsXBean =
         XmlObject.Factory.parse( this.getClass(  ).getClassLoader(  ).getResourceAsStream( "org/apache/ws/notification/test-topicSpace.xml" ) );
      TopicNamespace topicNs =
         TopicsTypeReader.newInstance( TopicsConstants.NSURI_WSTOP_SCHEMA ).toTopicNamespace( topicNsXBean );
      m_topicNsRegistry.addTopicNamespace( topicNs );

      topicNsXBean =
         XmlObject.Factory.parse( this.getClass(  ).getClassLoader(  ).getResourceAsStream( "org/apache/ws/notification/test2-topicSpace.xml" ) );
View Full Code Here

TOP

Related Classes of org.apache.ws.notification.topics.TopicNamespace

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.