Package org.apache.ws.resource.properties.impl

Examples of org.apache.ws.resource.properties.impl.XmlBeansResourceProperty


      AnyResourcePropertyMetaData anyMeta = new AnyResourcePropertyMetaData( new QName( "foo" ) );

      //need some sort of documenttype
      NotifyDocument                       doc         = NotifyDocument.Factory.newInstance(  );
      XmlBeansResourcePropertySet          set         = new XmlBeansResourcePropertySet( doc );
      XmlBeansResourceProperty             prop        = new XmlBeansResourceProperty( anyMeta, set );
      ResourcePropertyValueChangeTopicImpl topic       = new ResourcePropertyValueChangeTopicImpl( prop );
      TopicListenerTestObj                 testListenr = new TopicListenerTestObj(  );
      topic.addTopicListener( testListenr );
      lis.topicChanged( topic );
   }
View Full Code Here


            (PrinterPortHome) initialContext.lookup( PrinterPortHome.HOME_LOCATION );
         PrinterPortResource instance        =
            (PrinterPortResource) printerPortHome.createPrinter( getResourceContext(  ) );

         //get Resource Prop for Printer Ref
         XmlBeansResourceProperty prop =
            (XmlBeansResourceProperty) instance.getResourcePropertySet(  ).get( PrinterPortPropertyQNames.PRINTER_REFERENCE );

         //set the Printer EPR on the response
         createPrinterResponse.setPrinterReference( (EndpointReferenceType) prop.toXmlObjects(  )[0] );
      }
      catch ( Exception e )
      {
         throw new ResourceUnknownFaultException( new NamespaceVersionHolderImpl(  ),
                                                  new ResourceUnknownException( null,
View Full Code Here

      catch ( Exception e )
      {
         throw new ClientErrorNotPossibleFaultException(new NamespaceVersionHolderImpl(), "Problem occurred when retrieving resource: " + e.getLocalizedMessage());
      }

      XmlBeansResourceProperty resourceProperty =
         (XmlBeansResourceProperty) resource.getResourcePropertySet(  ).get( PrinterPortPropertyQNames.PRINTER_IS_ACCEPTING_JOBS );
      XmlBoolean               doc = (XmlBoolean) resourceProperty.get( 0 );
      return doc.getBooleanValue(  );
   }
View Full Code Here

        setPrinterState(PrinterStateType.PROCESSING);
    }

    private void setPrinterState(PrinterStateType.Enum printerState)
    {
        XmlBeansResourceProperty resourceProperty = (XmlBeansResourceProperty) getResourcePropertySet().get(PrinterPortPropertyQNames.PRINTER_STATE);
        PrinterStateType state = (PrinterStateType) resourceProperty.get(0);
        state.set(printerState);
    }
View Full Code Here

        resetTimer();//restart timer
    }

    private boolean isJobCancelledOrAborted(JobPortResource job)
    {
        XmlBeansResourceProperty resourceProperty = (XmlBeansResourceProperty) job.getResourcePropertySet().get(JobPortPropertyQNames.JOB_STATE);
        JobStateType o = (JobStateType) resourceProperty.get(0);
        org.apache.xmlbeans.StringEnumAbstractBase stateVal = o.enumValue();
        return stateVal == JobStateType.ABORTED || stateVal == JobStateType.CANCELED || stateVal == JobStateType.COMPLETED;
    }
View Full Code Here

        return stateVal == JobStateType.ABORTED || stateVal == JobStateType.CANCELED || stateVal == JobStateType.COMPLETED;
    }

    private void setJobState(JobPortResource job, JobStateType.Enum state)
    {
        XmlBeansResourceProperty resourceProperty = (XmlBeansResourceProperty) job.getResourcePropertySet().get(JobPortPropertyQNames.JOB_STATE);
        JobStateType o = null;
        if (resourceProperty != null)
        {
         o = (JobStateType) resourceProperty.get(0);
         o.set(state);
        }

        resourceProperty = (XmlBeansResourceProperty) getResourcePropertySet().get(JobPortPropertyQNames.JOB_STATE);
        if (resourceProperty != null)
        {
            o = (JobStateType) resourceProperty.get(0);
            o.set(state);
        }
    }
View Full Code Here

        setPrinterState(PrinterStateType.IDLE);
    }

    private boolean isPrinterStopped()
    {
        XmlBeansResourceProperty resourceProperty = (XmlBeansResourceProperty) getResourcePropertySet().get(PrinterPortPropertyQNames.PRINTER_STATE);
        PrinterStateType state = (PrinterStateType) resourceProperty.get(0);
        return state.enumValue() == PrinterStateType.STOPPED;
    }
View Full Code Here

        return state.enumValue() == PrinterStateType.STOPPED;
    }

    private void decrementQueueCount()
    {
        XmlBeansResourceProperty resourceProperty = (XmlBeansResourceProperty) getResourcePropertySet().get(PrinterPortPropertyQNames.QUEUED_JOB_COUNT);
        XmlInteger count = (XmlInteger) resourceProperty.get(0);
        int intCount = count.getBigIntegerValue().intValue();
        --intCount;
        count.setBigIntegerValue(BigInteger.valueOf(intCount));
    }
View Full Code Here

            (PrinterPortHome) initialContext.lookup( PrinterPortHome.HOME_LOCATION );
         PrinterPortResource instance        =
            (PrinterPortResource) printerPortHome.createPrinter( getResourceContext(  ) );

         //get Resource Prop for Printer Ref
         XmlBeansResourceProperty prop =
            (XmlBeansResourceProperty) instance.getResourcePropertySet(  ).get( PrinterPortPropertyQNames.PRINTER_REFERENCE );

         //set the Printer EPR on the response
         createPrinterResponse.setPrinterReference( (EndpointReferenceType) prop.toXmlObjects(  )[0] );
      }
      catch ( Exception e )
      {
         throw new ResourceUnknownFaultException( new NamespaceVersionHolderImpl(  ),
                                                  new ResourceUnknownException( null,
View Full Code Here

      catch ( Exception e )
      {
         throw new ClientErrorNotPossibleFaultException(new NamespaceVersionHolderImpl(), "Problem occurred when retrieving resource: " + e.getLocalizedMessage());
      }

      XmlBeansResourceProperty resourceProperty =
         (XmlBeansResourceProperty) resource.getResourcePropertySet(  ).get( PrinterPortPropertyQNames.PRINTER_IS_ACCEPTING_JOBS );
      XmlBoolean               doc = (XmlBoolean) resourceProperty.get( 0 );
      return doc.getBooleanValue(  );
   }
View Full Code Here

TOP

Related Classes of org.apache.ws.resource.properties.impl.XmlBeansResourceProperty

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.