Package org.apache.ws.resource.properties

Examples of org.apache.ws.resource.properties.ResourcePropertySet


    {
        if (propElems.length == 1)
        {
            //get the request epr
            EndpointReferenceType weatherStationEpr = (EndpointReferenceType) propElems[0];
            ResourcePropertySet resourcePropertySet = ((PropertiesResource) this).getResourcePropertySet();
            ResourceProperty resourceProperty = resourcePropertySet.get(WeatherClientConfigPropertyQNames.RELATIONSHIP);

            //define a relationship
            RelationshipDocument relationshipDocument = RelationshipDocument.Factory.newInstance();
            RelationshipType relationshipType = InteropRequestUtils.createRelationshipType(relationshipDocument.addNewRelationship());
View Full Code Here


    {
        org.wsdmdemo.service.weatherStationDir.RemoveWeatherStationResponseDocument responseDocument = org.wsdmdemo.service.weatherStationDir.RemoveWeatherStationResponseDocument.Factory.newInstance();
        org.wsdmdemo.service.weatherStationDir.RemoveWeatherStationResponseDocument.RemoveWeatherStationResponse response = responseDocument.addNewRemoveWeatherStationResponse();

        //remove a relationship
        ResourcePropertySet resourcePropertySet = ((PropertiesResource) getResource()).getResourcePropertySet();
        ResourceProperty resourceProperty = resourcePropertySet.get(WeatherStationDirPropertyQNames.RELATIONSHIP);

        org.wsdmdemo.service.weatherStationDir.RemoveWeatherStationDocument.RemoveWeatherStation removeWeatherStation = requestDoc.getRemoveWeatherStation();
        String resourceId = removeWeatherStation.getResourceId();

        //iterate the relationships
View Full Code Here

    public org.wsdmdemo.service.weatherStationDir.AddWeatherStationResponseDocument AddWeatherStation(org.wsdmdemo.service.weatherStationDir.AddWeatherStationDocument requestDoc)
    {
        org.wsdmdemo.service.weatherStationDir.AddWeatherStationResponseDocument responseDocument = org.wsdmdemo.service.weatherStationDir.AddWeatherStationResponseDocument.Factory.newInstance();
        org.wsdmdemo.service.weatherStationDir.AddWeatherStationResponseDocument.AddWeatherStationResponse response = responseDocument.addNewAddWeatherStationResponse();

        ResourcePropertySet resourcePropertySet = ((PropertiesResource) getResource()).getResourcePropertySet();
        ResourceProperty resourceProperty = resourcePropertySet.get(WeatherStationDirPropertyQNames.RELATIONSHIP);

        //get the request epr
        org.wsdmdemo.service.weatherStationDir.AddWeatherStationDocument.AddWeatherStation addWeatherStation = requestDoc.getAddWeatherStation();
        org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType addedEpr = addWeatherStation.getEndpointReference();
View Full Code Here

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

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

        QueryRelationshipsByTypeResponseDocument.QueryRelationshipsByTypeResponse response = responseDoc.getQueryRelationshipsByTypeResponse();

        org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.QueryRelationshipsByTypeDocument.QueryRelationshipsByType queryRelationshipsByType = requestDoc.getQueryRelationshipsByType();
        javax.xml.namespace.QName requestedType = queryRelationshipsByType.getRequestedType();

        ResourcePropertySet properties = getProperties();
        ResourceProperty resourceProperty = properties.get(RelationshipsCapability.PROP_NAME_RELATIONSHIP);

        if(resourceProperty == null)
        {
            throw new JAXRPCException("Unable to query relationship since the Resource does not expose a " + RelationshipsCapability.PROP_NAME_RELATIONSHIP + " resource property.");
        }
View Full Code Here

   public void init(  )
   {
      SubscriptionManagerRPDocument propsDoc        = SubscriptionManagerRPDocument.Factory.newInstance(  );
      ResourcePropertySetMetaData   propSetMetaData =
         new XmlBeansResourcePropertySetMetaData( propsDoc.schemaType(  ), READ_ONLY_PROP_NAMES );
      ResourcePropertySet           propSet = new XmlBeansResourcePropertySet( propsDoc, propSetMetaData );
      setResourcePropertySet( propSet );

      // wsrlw:ScheduledResourceTermination props
      ResourceProperty    prop        =
         propSet.get( ScheduledResourceTerminationPortType.PROP_QNAME_CURRENT_TIME );
      CurrentTimeDocument currTimeDoc = CurrentTimeDocument.Factory.newInstance(  );
      currTimeDoc.setCurrentTime( getCurrentTime(  ) );
      prop.setCallback( new CurrentTimeCallback(  ) );
      prop.add( currTimeDoc );
      prop = propSet.get( ScheduledResourceTerminationPortType.PROP_QNAME_TERMINATION_TIME );
      TerminationTimeDocument termTimeDoc = TerminationTimeDocument.Factory.newInstance(  );
      termTimeDoc.setTerminationTime( getTerminationTime(  ) );
      prop.add( termTimeDoc );

      // wsntw:SubscriptionManager props
      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_CONSUMER_REFERENCE );
      prop.setCallback( new ConsumerReferenceResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_TOPIC_EXPRESSION );
      prop.setCallback( new TopicExpressionResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_USE_NOTIFY );
      prop.setCallback( new UseNotifyResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_PRECONDITION );
      prop.setCallback( new PreconditionResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_SELECTOR );
      prop.setCallback( new SelectorResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_SUBSCRIPTION_POLICY );
      prop.setCallback( new SubscriptionPolicyResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_CREATION_TIME );
      CreationTimeDocument creationTimeDoc = CreationTimeDocument.Factory.newInstance(  );
      creationTimeDoc.setCreationTime( getCreationTime(  ) );
      prop.add( creationTimeDoc );

      // custom prop 'ProducerReference'
      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_PRODUCER_REFERENCE );
      ProducerReferenceDocument producerRefDoc = ProducerReferenceDocument.Factory.newInstance(  );
      producerRefDoc.setProducerReference( (EndpointReferenceType) ( (XmlBeansEndpointReference) getProducerReference(  ) )
                                           .getXmlObject( AddressingConstants.NSURI_ADDRESSING_SCHEMA ) );
      prop.add( producerRefDoc );
   }
View Full Code Here

TOP

Related Classes of org.apache.ws.resource.properties.ResourcePropertySet

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.