Examples of ResourceProperty


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

        if ( !m_metaData.isOpenContent() )
        {
            throw new MetaDataViolationException( MSG.getMessage( Keys.NON_ANY_PROP_CANNOT_BE_REMOVED ) );
        }
        LOG.debug( MSG.getMessage( Keys.REMOVING_PROP, propName.toString() ) );
        ResourceProperty resourceProp = (ResourceProperty) m_propsMap.get( propName );
        resourceProp.clear();
        m_propsMap.remove( propName );
        return true;
    }
View Full Code Here

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

     */
    public boolean set(ResourceProperty prop)
    {
        QName propName = prop.getMetaData().getName();
        LOG.debug( MSG.getMessage( Keys.REMOVING_PROP, propName.toString() ) );
        ResourceProperty resourceProp = (ResourceProperty) m_propsMap.get( propName );
        resourceProp.clear();
        m_propsMap.remove( propName );
        addProperty( prop );
        return true;
    }
View Full Code Here

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

   throws ResourceContextException,
          ResourceException
   {
      PropertiesResource              resource                        =
         (PropertiesResource) m_resourceContext.getResourceHome(  ).find( UnitExampleHome.RESOURCE_ID );
      ResourceProperty                resourceProperty                =
         resource.getResourcePropertySet(  ).get( NotificationProducerPortType.PROP_QNAME_TOPIC_EXPRESSION_DIALECTS );
      TopicExpressionDialectsDocument topicExpressionDialectsDocument =
         TopicExpressionDialectsDocument.Factory.newInstance(  );
      topicExpressionDialectsDocument.setTopicExpressionDialects( "foo-dialect" );
      resourceProperty.add( topicExpressionDialectsDocument );
   }
View Full Code Here

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

   {
      List     topicList = new ArrayList(  );
      Iterator propIter = propSet.iterator(  );
      while ( propIter.hasNext(  ) )
      {
         ResourceProperty prop = (ResourceProperty) propIter.next(  );
         if ( !prop.getMetaData(  ).isReadOnly(  ) )
         {
            Topic topic = addResourcePropertyValueChangeTopic( prop, topicSpaceSet );
            topicList.add( topic );
         }
      }
View Full Code Here

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

      ResourcePropertySetMetaData   propSetMetaData =
         new XmlBeansResourcePropertySetMetaData( propsDoc.schemaType(  ), READ_ONLY_PROP_NAMES );
      m_propSet = new XmlBeansResourcePropertySet( propsDoc, propSetMetaData );

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

      // wsntw:SubscriptionManager props
      prop = m_propSet.get( SubscriptionManagerPortType.PROP_QNAME_CONSUMER_REFERENCE );
      ConsumerReferenceDocument consumerRefDoc = ConsumerReferenceDocument.Factory.newInstance(  );
      consumerRefDoc.setConsumerReference( (EndpointReferenceType) ( (XmlObjectWrapper) m_consumerReference )
                                           .getXmlObject(  ) );
      prop.add( consumerRefDoc );
      prop = m_propSet.get( SubscriptionManagerPortType.PROP_QNAME_CREATION_TIME );
      CreationTimeDocument creationTimeDoc = CreationTimeDocument.Factory.newInstance(  );
      creationTimeDoc.setCreationTime( m_creationTime );
      prop.add( creationTimeDoc );
      prop = m_propSet.get( SubscriptionManagerPortType.PROP_QNAME_TOPIC_EXPRESSION );
      TopicExpressionDocument topicExprDoc = TopicExpressionDocument.Factory.newInstance(  );
      topicExprDoc.setTopicExpression( (TopicExpressionType) ( (XmlBeansTopicExpression) m_topicExpression )
                                       .getXmlObject(  ) );
      prop.add( topicExprDoc );
      prop = m_propSet.get( SubscriptionManagerPortType.PROP_QNAME_USE_NOTIFY );
      UseNotifyDocument useNotifyDoc = UseNotifyDocument.Factory.newInstance(  );
      useNotifyDoc.setUseNotify( m_useNotify );
      prop.add( useNotifyDoc );
      if ( m_precondition != null )
      {
         prop = m_propSet.get( SubscriptionManagerPortType.PROP_QNAME_PRECONDITION );
         PreconditionDocument preconditionDoc = PreconditionDocument.Factory.newInstance(  );
         preconditionDoc.setPrecondition( (QueryExpressionType) ( (XmlBeansQueryExpression) m_precondition )
                                          .getXmlObject(  ) );
         prop.add( preconditionDoc );
      }

      if ( m_selector != null )
      {
         prop = m_propSet.get( SubscriptionManagerPortType.PROP_QNAME_SELECTOR );
         SelectorDocument selectorDoc = SelectorDocument.Factory.newInstance(  );
         selectorDoc.setSelector( (QueryExpressionType) ( (XmlBeansQueryExpression) m_selector ).getXmlObject(  ) );
         prop.add( selectorDoc );
      }

      if ( m_policy != null )
      {
         prop = m_propSet.get( SubscriptionManagerPortType.PROP_QNAME_SUBSCRIPTION_POLICY );
         SubscriptionPolicyDocument subPolicyDoc = SubscriptionPolicyDocument.Factory.newInstance(  );
         subPolicyDoc.setSubscriptionPolicy( null );
         prop.add( subPolicyDoc );
      }
   }
View Full Code Here

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

        m_fileSystem = new UnixFileSystem( m_id );

        /*
         * Initialize each of our properties by calling prop.add(propElem) and/or prop.setCallback(callback)...
         */
        ResourceProperty prop = m_propSet.get( FileSystemPropertyQNames.DEVICE_SPECIAL_FILE );
        DeviceSpecialFileDocument deviceDocXBean = DeviceSpecialFileDocument.Factory.newInstance();
        deviceDocXBean.setDeviceSpecialFile( m_fileSystem.getDeviceSpecialFile() );
        prop.add( deviceDocXBean );

        prop = m_propSet.get( FileSystemPropertyQNames.TYPE );
        TypeDocument typeDocXBean = TypeDocument.Factory.newInstance();
        typeDocXBean.setType( m_fileSystem.getType() );
        prop.add( typeDocXBean );

        BackupFrequencyDocument backupDocXBean = BackupFrequencyDocument.Factory.newInstance();
        backupDocXBean.setBackupFrequency( m_fileSystem.getBackupFrequency() );
        prop = m_propSet.get( FileSystemPropertyQNames.BACKUP_FREQUENCY );
        prop.add( backupDocXBean );
        prop.setCallback( new BackupFrequencyCallback( m_fileSystem ) );

        CommentDocument commentDocXBean = CommentDocument.Factory.newInstance();
        commentDocXBean.setComment( m_fileSystem.getComment() );
        prop = m_propSet.get( FileSystemPropertyQNames.COMMENT );
        prop.add( commentDocXBean );
        prop.setCallback( new CommentCallback( m_fileSystem ) );

        FsckPassNumberDocument fsckDocXBean = FsckPassNumberDocument.Factory.newInstance();
        fsckDocXBean.setFsckPassNumber( m_fileSystem.getFsckPassNumber() );
        prop = m_propSet.get( FileSystemPropertyQNames.FSCK_PASS_NUMBER );
        prop.add( fsckDocXBean );
        prop.setCallback( new FsckPassNumberCallback( m_fileSystem ) );

        MountPointDirectoryDocument mountPointDocXBean = MountPointDirectoryDocument.Factory.newInstance();
        mountPointDocXBean.setMountPointDirectory( m_fileSystem.getMountPoint() );
        prop = m_propSet.get( FileSystemPropertyQNames.MOUNT_POINT_DIR );
        prop.add( mountPointDocXBean );
        prop.setCallback( new MountPointCallback( m_fileSystem ) );

        OptionsDocument optionsDocXBean =
                OptionsDocument.Factory.newInstance();
        org.apache.ws.resource.example.filesystem.OptionsDocument.Options options =
                optionsDocXBean.addNewOptions();
        List backendOptions =
                m_fileSystem.getOptions();
        for ( int i = 0; i < backendOptions.size(); i++ )
        {
            options.addOption( (String) backendOptions.get( i ) );
        }

        prop = m_propSet.get( FileSystemPropertyQNames.OPTIONS );
        prop.add( optionsDocXBean );
        prop.setCallback( new OptionsCallback( m_fileSystem ) );

    }
View Full Code Here

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

    public void testInsertResourcePropertiesCallback() throws XmlException, ResourceException,
            ResourceContextException
    {
        m_resourceContext = new SushiResourceContext();
        SushiResource resource = (SushiResource) m_resourceContext.getResource();
        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.EBI );
        resourceProp.setCallback( m_callback );

        XmlObject xBean =
                XmlObject.Factory.parse( "<foo:Ebi xmlns:foo=\"http://ws.apache.org/resource/properties/test/sushi\">"
                + "0" + "</foo:Ebi>" );
        insertResourceProperty( new XmlObject[]{xBean} );
View Full Code Here

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

    public void testInsertResourcePropertiesFailedCallback() throws XmlException, ResourceException,
            ResourceContextException
    {
        m_resourceContext = new SushiResourceContext();
        SushiResource resource = (SushiResource) m_resourceContext.getResource();
        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.EBI );
        resourceProp.setCallback( new ThrowsCallback() );

        XmlObject xBean =
                XmlObject.Factory.parse( "<foo:Ebi xmlns:foo=\"http://ws.apache.org/resource/properties/test/sushi\">"
                + "0" + "</foo:Ebi>" );
        try
View Full Code Here

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

        XmlObject xBean =
                XmlObject.Factory.parse( "<foo:Ika xmlns:foo=\"http://ws.apache.org/resource/properties/test/sushi\">"
                + "my favorite!" + "</foo:Ika>" );
        insertResourceProperty( new XmlObject[]{xBean} );
        SushiResource resource = (SushiResource) m_resourceContext.getResource();
        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.IKA );
        resourceProp.setCallback( m_callback );
        deleteResourceProperty( SushiPropertyQNames.IKA );
        GetResourcePropertyResponseDocument.GetResourcePropertyResponse getResourcePropertyResponse = getResourceProperty(
                SushiPropertyQNames.OHTORO );
        assertNotNull( getResourcePropertyResponse );
        assertTrue( m_callback.deleteWasInvoked() );
View Full Code Here

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

        XmlObject xBean =
                XmlObject.Factory.parse( "<foo:Ika xmlns:foo=\"http://ws.apache.org/resource/properties/test/sushi\">"
                + "my favorite!" + "</foo:Ika>" );
        insertResourceProperty( new XmlObject[]{xBean} );
        SushiResource resource = (SushiResource) m_resourceContext.getResource();
        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.IKA );
        resourceProp.setCallback( new ThrowsCallback() );
        try
        {
            deleteResourceProperty( SushiPropertyQNames.IKA );
        }
        catch (RuntimeException e)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.