Package org.apache.ws.resource.properties

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


   throws ResourceContextException,
          ResourceException
   {
      JobPropertiesDocument jobPropDoc           = getJobPropDoc( instance );
      PrinterPortResource   printerResource      = (PrinterPortResource) getResourceContext(  ).getResource(  );
      ResourceProperty      printerJobProperties =
         printerResource.getResourcePropertySet(  ).get( PrinterPortPropertyQNames.JOB_PROPERTIES );
      printerJobProperties.add( jobPropDoc );
   }
View Full Code Here


   private void incrementQueueCount(  )
   throws ResourceException,
          ResourceContextException
   {
      PrinterPortResource printerResource      = (PrinterPortResource) getResourceContext(  ).getResource(  );
      ResourceProperty    printerJobProperties =
         printerResource.getResourcePropertySet(  ).get( PrinterPortPropertyQNames.QUEUED_JOB_COUNT );
      XmlInteger          queued               = (XmlInteger) printerJobProperties.get( 0 );
      BigInteger          bigIntegerValue      = queued.getBigIntegerValue(  );
      int                 count                = bigIntegerValue.intValue(  );
      count++;
      queued.setBigIntegerValue( BigInteger.valueOf( count ) );
   }
View Full Code Here

     */
    public GetResourcePropertyResponseDocument getResourceProperty( GetResourcePropertyDocument requestDoc )
    {
        GetResourcePropertyResponseDocument responseDoc = createResponseDocument();
        QName propName = requestDoc.getGetResourceProperty();
        ResourceProperty prop = getProperty( propName );
        addPropertyToResponse( prop, responseDoc.getGetResourcePropertyResponse() );
        return responseDoc;
    }
View Full Code Here

        {
            LOG.debug( MSG.getMessage( Keys.GET_RP_REQ, requestDoc.toString() ) );
        }
        GetResourcePropertyResponseDocument responseDoc = createResponseDocument();
        QName propName = requestDoc.getGetResourceProperty();
        ResourceProperty prop = getProperty( propName );
        addPropertyToResponse( prop, responseDoc.getGetResourcePropertyResponse() );
        return responseDoc;
    }
View Full Code Here

         throws Exception
   {
      XmlBeansResourcePropertyMetaData metaData =
            new XmlBeansResourcePropertyMetaData( EndpointReferenceDocument.type.getElementProperty( EPR_TYPE_QNAME ), false );
      m_resourcePropSet.add( metaData.create( m_resourcePropSet ) );
      ResourceProperty resourceProp = m_resourcePropSet.get( EPR_TYPE_QNAME );
      assertNotNull( resourceProp );
      assertEquals( EPR_TYPE_QNAME,
            resourceProp.getMetaData().getName() );
   }
View Full Code Here

   public void testCreate()
         throws Exception
   {
      XmlBeansResourcePropertyMetaData metaData =
            new XmlBeansResourcePropertyMetaData( EndpointReferenceDocument.type.getElementProperty( EPR_TYPE_QNAME  ), false );
      ResourceProperty resourceProp = metaData.create( m_resourcePropSet );
      assertNotNull( resourceProp );
      assertEquals( EPR_TYPE_QNAME,
            resourceProp.getMetaData().getName() );
   }
View Full Code Here

    * @throws Exception DOCUMENT_ME
    */
   public void testGet()
         throws Exception
   {
      ResourceProperty resourceProp = m_resourcePropSet.get( SushiPropertyQNames.AKAGI );
      assertEquals( 1, resourceProp.size() );
      assertEquals( SushiPropertyQNames.AKAGI, resourceProp.getMetaData().getName() );
      XmlObject propElemXBean = (XmlObject) resourceProp.get( 0 );
      assertEquals( "24", XmlBeanUtils.getValue( propElemXBean ) );
   }
View Full Code Here

    * @throws Exception DOCUMENT_ME
    */
   public void testRemove()
         throws Exception
   {
      ResourceProperty resourceProp = m_resourcePropSet.get( SushiPropertyQNames.IKA );
      assertEquals( 1, resourceProp.size() );
      m_resourcePropSet.remove( SushiPropertyQNames.IKA );
      resourceProp = m_resourcePropSet.get( SushiPropertyQNames.IKA );
      assertNull( resourceProp );
   }
View Full Code Here

    * Test for XmlBeansResourceProperty#add.
    */
   public void testAdd()
         throws Exception
   {
      ResourceProperty prop = m_resourcePropSet.get( SushiPropertyQNames.IKA );
      final String stringValue = "somethang";
      prop.add( XmlObject.Factory.parse( "<" + SushiPropertyQNames.IKA.getLocalPart() + " xmlns=\"" + SushiPropertyQNames.IKA.getNamespaceURI() + "\">" + stringValue + "</" + SushiPropertyQNames.IKA.getLocalPart() + ">" ) );
      assertEquals( 2,
            prop.size() );
      XmlString xString = (XmlString) prop.get( 1 );
      assertEquals( stringValue,
            xString.getStringValue() );
   }
View Full Code Here

    * Test for XmlBeansResourceProperty#clear.
    */
   public void testClear()
         throws Exception
   {
      ResourceProperty manufacturerProp = m_resourcePropSet.get( SushiPropertyQNames.IKA );
      manufacturerProp.clear();
      assertTrue( manufacturerProp.isEmpty() );
   }
View Full Code Here

TOP

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

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.