Package org.apache.ws.muws.v1_0.capability.impl

Examples of org.apache.ws.muws.v1_0.capability.impl.RelationshipsCapabilityImpl


               aSituation.setSuccessDisposition( Boolean.TRUE );
            }

            LangStringImpl lstring = new LangStringImpl( lStringC );
            aSituation.setMessage( lstring );
            XmlBeansManagementEvent event = new XmlBeansManagementEvent( aSituation );

            // set resource Reporter and source  ResourceId
            ResourcePropertySet propSet      = m_notificationProducerResource.getResourcePropertySet(  );
            ResourceProperty    resourceId   = propSet.get( ApplicationPropertyQNames.RESOURCEID );
            String              Id           = null;
            Iterator            propElemIter = resourceId.iterator(  );
            while ( propElemIter.hasNext(  ) )
            {
               XmlObject propElem = (XmlObject) propElemIter.next(  );
               if ( propElem instanceof XmlAnyUriImpl )
               {
                  XmlAnyUriImpl aUri = (XmlAnyUriImpl) propElem;
                  Id = aUri.getStringValue(  );
                  event.setReporterResourceId( Id );
                  event.setSourceResourceId( Id );
               }
               else
               {
                  throw new Exception( " ResourceId property should be instanceof  XmlAnyUriImpl" );
               }
            }

            //set custom CorrelationId
            Object[]              corId = new Object[1];
            CorrelationIdDocument id = CorrelationIdDocument.Factory.newInstance(  );
            id.setCorrelationId( m_correlationId );
            corId[0] = id;
            event.setAny( corId );

            // Topic publish event to the subscribers
  
            operationalStatus.publish( event );
View Full Code Here


               aSituation.setSuccessDisposition( Boolean.TRUE );
            }

            LangStringImpl lstring = new LangStringImpl( lStringC );
            aSituation.setMessage( lstring );
            XmlBeansManagementEvent event = new XmlBeansManagementEvent( aSituation );

            // set resource Reporter and source  ResourceId
            ResourcePropertySet propSet      = m_notificationProducerResource.getResourcePropertySet(  );
            ResourceProperty    resourceId   = propSet.get( ApplicationPropertyQNames.RESOURCEID );
            String              Id           = null;
            Iterator            propElemIter = resourceId.iterator(  );
            while ( propElemIter.hasNext(  ) )
            {
               XmlObject propElem = (XmlObject) propElemIter.next(  );
               if ( propElem instanceof XmlAnyUriImpl )
               {
                  XmlAnyUriImpl aUri = (XmlAnyUriImpl) propElem;
                  Id = aUri.getStringValue(  );
                  event.setReporterResourceId( Id );
                  event.setSourceResourceId( Id );
               }
               else
               {
                  throw new Exception( " ResourceId property should be instanceof  XmlAnyUriImpl" );
               }
            }

            //set custom CorrelationId
            Object[]              corId = new Object[1];
            CorrelationIdDocument id = CorrelationIdDocument.Factory.newInstance(  );
            id.setCorrelationId( m_correlationId );
            corId[0] = id;
            event.setAny( corId );

            // Topic publish event to the subscribers
  
            operationalStatus.publish( event );
View Full Code Here

            stateTransitionType.setTransitionIdentifier("urn:NONE");
            stateTransitionType.setTime(currentTime);
            notif.setCurrentTime(currentTime);

            Situation situation = new SituationImpl(new CategoryImpl(MuwsConstants.SITUATION_OTHER));
            XmlBeansManagementEvent xme = new XmlBeansManagementEvent(situation);
            ManagementEventDocument mgmtEvent = (ManagementEventDocument) ((XmlObjectWrapper) xme).getXmlObject();
            org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManagementEventType managementEvent = mgmtEvent.getManagementEvent();
            XmlBeanUtils.addChildElement(managementEvent, notifDocument);

            topic.publish(mgmtEvent);
View Full Code Here

           //if its there then build a notif and publish

            try
            {
                Situation situation = new SituationImpl( new CategoryImpl( MuwsConstants.SITUATION_CREATE ) );
                XmlBeansManagementEvent xme = new XmlBeansManagementEvent( situation );
                RelationshipCreatedNotificationDocument relationshipCreatedDoc = RelationshipCreatedNotificationDocument.Factory.newInstance();
                org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipCreatedNotificationDocument.RelationshipCreatedNotification relationshipCreatedNotification = relationshipCreatedDoc.addNewRelationshipCreatedNotification();
                relationshipCreatedNotification.setRelationship(((RelationshipDocumentImpl)o).getRelationship());
                xme.setAny(new Object[]{relationshipCreatedDoc});
                //publish!
                createdTopic.publish(xme.getXmlObject());
            }
            catch (Exception e)
            {
                LOG.debug("Unable to throw RelationshipCreated notification. Cause:" + e.getLocalizedMessage(), e);
            }
View Full Code Here

        {
            //if its there then build a notif and publish
            try
            {
                Situation situation = new SituationImpl( new CategoryImpl( MuwsConstants.SITUATION_DESTROY ) );
                XmlBeansManagementEvent xme = new XmlBeansManagementEvent( situation );
                RelationshipDeletedNotificationDocument relationshipDeletedDoc = RelationshipDeletedNotificationDocument.Factory.newInstance();
                org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipDeletedNotificationDocument.RelationshipDeletedNotification relationshipDeletedNotification = relationshipDeletedDoc.addNewRelationshipDeletedNotification();
                relationshipDeletedNotification.setRelationship(((RelationshipDocumentImpl)copiedRelationship).getRelationship());
                xme.setAny(new Object[]{relationshipDeletedDoc});
                //publish!
                deletedTopic.publish(xme.getXmlObject());
            }
            catch (Exception e)
            {
                LOG.debug("Unable to throw RelationshipDeleted notification. Cause:" + e.getLocalizedMessage(), e);
            }
View Full Code Here

     */
    private XmlObject buildManagementEvent(XmlObject event)
    {
        ManagementEventDocument me;
        Situation situation = new SituationImpl(new CategoryImpl(MuwsConstants.SITUATION_OTHER));
        XmlBeansManagementEvent xme = new XmlBeansManagementEvent(situation);
        me = (ManagementEventDocument) ((XmlObjectWrapper) xme).getXmlObject();
        org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManagementEventType managementEvent = me.getManagementEvent();
        XmlBeanUtils.addChildElement(managementEvent, event);
        return me;
    }
View Full Code Here

            me = (ManagementEventDocument) ((XmlObjectWrapper)m_propChangeManagementEvent).getXmlObject();
        }
        else
        {
            Situation situation = new SituationImpl(new CategoryImpl(MuwsConstants.SITUATION_OTHER));
            XmlBeansManagementEvent xme = new XmlBeansManagementEvent(situation);
            me = (ManagementEventDocument) ((XmlObjectWrapper)xme).getXmlObject();
        }

        org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManagementEventType managementEvent = me.getManagementEvent();
        XmlBeanUtils.addChildElement(managementEvent, ((XmlObjectWrapper)event).getXmlObject());
View Full Code Here

            /** TOPICS **/
            TopicSpace muwsTopicSpace = new TopicSpaceImpl(MuwsConstants.NSURI_MUWS_PART2_TOPICS);
            getTopicSpaceSet().addTopicSpace(muwsTopicSpace);

            //identity
            ManagementEventTopic identityCapability = new XmlBeansManagementEventTopicImpl(IdentityCapability.TOPIC_NAME);
            muwsTopicSpace.addTopic(identityCapability);
            //manageability
            ManagementEventTopic manageabilityCharacteristicsCapability = new XmlBeansManagementEventTopicImpl(ManageabilityCharacteristicsCapability.TOPIC_NAME);
            muwsTopicSpace.addTopic(manageabilityCharacteristicsCapability);

            //operational status
            ManagementEventTopic operationalCapability = new XmlBeansManagementEventTopicImpl(OperationalStatusCapability.TOPIC_NAME);
            muwsTopicSpace.addTopic(operationalCapability);

            //relationships
            ManagementEventTopic relationshipCapability = new XmlBeansManagementEventTopicImpl(RelationshipsCapability.TOPIC_NAME);
            muwsTopicSpace.addTopic(relationshipCapability);
            /** END TOPICS **/


            /** CAPABILITIES **/
 
View Full Code Here

            /** TOPICS **/
            TopicSpace muwsTopicSpace = new TopicSpaceImpl(MuwsConstants.NSURI_MUWS_PART2_TOPICS);
            getTopicSpaceSet().addTopicSpace(muwsTopicSpace);

            //identity
            ManagementEventTopic identityCapability = new XmlBeansManagementEventTopicImpl(IdentityCapability.TOPIC_NAME);
            muwsTopicSpace.addTopic(identityCapability);
            //manageability
            ManagementEventTopic manageabilityCharacteristicsCapability = new XmlBeansManagementEventTopicImpl(ManageabilityCharacteristicsCapability.TOPIC_NAME);
            muwsTopicSpace.addTopic(manageabilityCharacteristicsCapability);

            //operational status
            ManagementEventTopic operationalCapability = new XmlBeansManagementEventTopicImpl(OperationalStatusCapability.TOPIC_NAME);
            muwsTopicSpace.addTopic(operationalCapability);
            /** END TOPICS **/

            /** CAPABILITIES **/
            // init the {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd}ManageabilityCapability Resource Property
View Full Code Here

            /** TOPICS **/
            TopicSpace muwsTopicSpace = new TopicSpaceImpl(MuwsConstants.NSURI_MUWS_PART2_TOPICS);
            getTopicSpaceSet().addTopicSpace(muwsTopicSpace);

            //identity
            ManagementEventTopic identityCapability = new XmlBeansManagementEventTopicImpl(IdentityCapability.TOPIC_NAME);
            muwsTopicSpace.addTopic(identityCapability);
            //manageability
            ManagementEventTopic manageabilityCharacteristicsCapability = new XmlBeansManagementEventTopicImpl(ManageabilityCharacteristicsCapability.TOPIC_NAME);
            muwsTopicSpace.addTopic(manageabilityCharacteristicsCapability);
            //relationships
            ManagementEventTopic relationshipCapability = new XmlBeansManagementEventTopicImpl(RelationshipsCapability.TOPIC_NAME);
            muwsTopicSpace.addTopic(relationshipCapability);
            /** END TOPICS **/


            /** CAPABILITIES **/
 
View Full Code Here

TOP

Related Classes of org.apache.ws.muws.v1_0.capability.impl.RelationshipsCapabilityImpl

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.