Package org.apache.ws.notification.topics.expression

Examples of org.apache.ws.notification.topics.expression.TopicExpression


    * @see NotificationProducerPortType#getCurrentMessage(org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.GetCurrentMessageDocument)
    */
   public GetCurrentMessageResponseDocument getCurrentMessage( GetCurrentMessageDocument requestDoc )
   {
      GetCurrentMessageDocument.GetCurrentMessage request   = requestDoc.getGetCurrentMessage(  );
      TopicExpression                             topicExpr = getTopicExpression( request.getTopic(  ) );
      Topic[]                                     topics    = evaluateTopicExpression( topicExpr );
      if ( topics.length == 0 )
      {
         throw new InvalidTopicExpressionFaultException( NAMESPACE_SET,
                                                         "Given TopicExpression did not match any Topics supported by this NotificationProducer - the WS-BaseN spec mandates that it match exactly one." );
View Full Code Here


    * @see NotificationProducerPortType#subscribe(org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.SubscribeDocument)
    */
   public SubscribeResponseDocument subscribe( SubscribeDocument requestDoc )
   {
      SubscribeDocument.Subscribe request   = requestDoc.getSubscribe(  );
      TopicExpression             topicExpr = getTopicExpression( request.getTopicExpression(  ) );
      Topic[]                     topics    = evaluateTopicExpression( topicExpr );
      if ( topics.length == 0 )
      {
         throw new InvalidTopicExpressionFaultException( NAMESPACE_SET,
                                                         "Given TopicExpression did not match any Topics supported by this NotificationProducer - the WS-BaseN spec mandates that it match at least one." );
View Full Code Here

      return NAMESPACE_SET;
   }

   private TopicExpression getTopicExpression( TopicExpressionType topicExpressionType )
   {
      TopicExpression topicExpr = null;
      try
      {
         topicExpr = new XmlBeansTopicExpression( topicExpressionType );
      }
      catch ( InvalidTopicExpressionException ite )
View Full Code Here

     * @see NotificationProducerPortType#subscribe(org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.SubscribeDocument)
     */
    public SubscribeResponseDocument subscribe( SubscribeDocument requestDoc )
    {
        SubscribeDocument.Subscribe request = requestDoc.getSubscribe();
        TopicExpression topicExpr = new XmlBeansTopicExpression( request.getTopicExpression() );
        Topic[] topics = evaluateTopicExpression( topicExpr );
        if ( topics.length == 0 )
        {
            throw new InvalidTopicExpressionFaultException( NAMESPACE_SET,
                    "Given TopicExpression did not match any Topics supported by this NotificationProducer - the WS-BaseN spec mandates that it match at least one." );
View Full Code Here

     */
    public GetCurrentMessageResponseDocument getCurrentMessage( GetCurrentMessageDocument requestDoc )
    {
        GetCurrentMessageDocument.GetCurrentMessage request = requestDoc.getGetCurrentMessage();
        TopicExpressionType topicExprXmlBean = request.getTopic();
        TopicExpression topicExpr = new XmlBeansTopicExpression( topicExprXmlBean );
        Topic[] topics = evaluateTopicExpression( topicExpr );
        if ( topics.length == 0 )
        {
            throw new InvalidTopicExpressionFaultException( NAMESPACE_SET,
                    "Given TopicExpression did not match any Topics supported by this NotificationProducer - the WS-BaseN spec mandates that it match exactly one." );
View Full Code Here

    * @see NotificationProducerPortType#getCurrentMessage(org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.GetCurrentMessageDocument)
    */
   public GetCurrentMessageResponseDocument getCurrentMessage( GetCurrentMessageDocument requestDoc )
   {
      GetCurrentMessageDocument.GetCurrentMessage request    = requestDoc.getGetCurrentMessage(  );
      TopicExpression                             topicExpr  = toTopicExpression( request.getTopic(  ) );
      Object                                      currentMsg = null;
      try
      {
         currentMsg = m_producerResource.getCurrentMessage( topicExpr );
      }
View Full Code Here

    * @see NotificationProducerPortType#subscribe(org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.SubscribeDocument)
    */
   public SubscribeResponseDocument subscribe( SubscribeDocument requestDoc )
   {
      SubscribeDocument.Subscribe request                = requestDoc.getSubscribe(  );
      TopicExpression             topicExpr = null;
      topicExpr = toTopicExpression( request.getTopicExpression(  ) );

      Calendar initialTerminationTime = null;
      if ( request.isSetInitialTerminationTime(  ) )
      {
View Full Code Here

   public TopicSetImpl( Set topicExprs )
   throws TopicExpressionException
   {
      for ( Iterator iterator = topicExprs.iterator(  ); iterator.hasNext(  ); )
      {
         TopicExpression topicExpr = (TopicExpression) iterator.next(  );
         addTopicExpression( topicExpr );
      }
   }
View Full Code Here

      {
         throw new IllegalStateException( "The Dialect attribute is required by the WS-BaseNotification TopicExpressionType." );
      }

      String          dialect   = topicExprType.getDialect(  );
      TopicExpression topicExpr;
      if ( dialect.equals( TopicsConstants.TOPIC_EXPR_DIALECT_SIMPLE ) )
      {
         topicExpr = new SimpleTopicExpression( XmlBeanUtils.getValueAsQName( topicExprType ) );
      }
      else if ( dialect.equals( TopicsConstants.TOPIC_EXPR_DIALECT_CONCRETE ) )
View Full Code Here

                                                              + "xmlns:" + NSPREFIX1 + "='" + NSURI1 + "' xmlns:"
                                                              + NSPREFIX2 + "='" + NSURI2
                                                              + "' Dialect='http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Full'>"
                                                              + expr + "</wsnt:TopicExpression>" ) )
         .getTopicExpression(  );
      TopicExpression     topicExpr =
         TopicsTypeReader.newInstance( TopicsConstants.NSURI_WSTOP_SCHEMA ).toTopicExpression( topicExprType );
      return m_evaluator.evaluate( m_topicNsRegistry, topicExpr );
   }
View Full Code Here

TOP

Related Classes of org.apache.ws.notification.topics.expression.TopicExpression

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.