Package org.apache.ws.resource.properties

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


        }
        if ( nameOfPropToBeDeleted == null )
        {
            throw new DeleteResourcePropertyRequestFailedFaultException( getNamespaceSet(), MSG.getMessage( Keys.DEL_MISSING_RP_ATTRIB ) );
        }
        ResourceProperty prop = getProperties().get( nameOfPropToBeDeleted );
        if ( prop == null )
        {
            if ( getProperties().getMetaData().isOpenContent() )
            {
                return;
            }
            else
            {
                throw new InvalidResourcePropertyQNameFaultException( getNamespaceSet(), nameOfPropToBeDeleted );
            }
        }
        throwFaultIfPropertyIsReadOnly( prop );
        throwFaultIfDeletionViolatesSchema( prop );
        try
        {
            deletePropertyCallback( prop );
        }
        catch ( RuntimeException re )
        {
            throw new DeleteResourcePropertyRequestFailedFaultException( getNamespaceSet(), re.toString() );
        }
        Object[] oldValue = getValue( prop );
        prop.clear();
        Object[] newValue = null;
        firePropChangeEvents( prop, oldValue, newValue );
    }
View Full Code Here


        {
            throw new InvalidInsertResourcePropertiesRequestContentFaultException( getNamespaceSet(), MSG.getMessage( Keys.ERROR_INSERT_ELEMS_NOT_HOMOGENOUS ) );
        }

        QName propName = XmlBeanUtils.getName( propElemsToBeInserted[0] );
        ResourceProperty prop = getProperty( propName );

        if(prop == null)
        {
            prop = createAnyProperty(propName);
            getProperties().add(prop);
        }

        if(!prop.getMetaData().isAny())
        {
            throwFaultIfInsertionViolatesSchema( prop, propElemsToBeInserted );
        }

        throwFaultIfPropertyIsReadOnly( prop );

        try
        {
            insertPropertyCallback( prop, propElemsToBeInserted );
        }
        catch ( RuntimeException re )
        {
            throw new SetResourcePropertyRequestFailedFaultException( getNamespaceSet(), re.toString() );
        }

        Object[] oldValue = getValue( prop );
        for ( int i = 0; i < propElemsToBeInserted.length; i++ )
        {
            try
            {
                prop.add( propElemsToBeInserted[i] );
            }
            catch ( MetaDataViolationException mdve )
            {
                throw new InvalidSetResourcePropertiesRequestContentFaultException( getNamespaceSet(), mdve );
            }
View Full Code Here

        if ( newPropElems.length == 0 )
        {
            return; // nothing to do
        }
        QName propName = XmlBeanUtils.getName( newPropElems[0] );
        ResourceProperty prop = getProperty( propName );

        throwFaultIfPropertyIsReadOnly( prop );
        if ( elementNamesNotHomogenous( newPropElems ) )
        {
            throw new InvalidUpdateResourcePropertiesRequestContentFaultException( getNamespaceSet(), MSG.getMessage( Keys.ERROR_UPDATE_ELEMS_NOT_HOMOGENOUS ) );
        }
        throwFaultIfUpdateViolatesSchema( prop, newPropElems );

        try
        {
            updatePropertyCallback( prop, newPropElems );
        }
        catch ( RuntimeException re )
        {
            throw new SetResourcePropertyRequestFailedFaultException( getNamespaceSet(), re.toString() );
        }

        Object[] oldValue = getValue( prop );

        try
        {
            prop.clear();
            for ( int i = 0; i < newPropElems.length; i++ )
            {
                prop.add( newPropElems[i] );
            }
        }
        catch ( MetaDataViolationException mdve )
        {
            throw new InvalidSetResourcePropertiesRequestContentFaultException( getNamespaceSet(), mdve );
View Full Code Here

    private ResourceProperty getProperty( QName propName )
    {
        LOG.debug( MSG.getMessage( Keys.GET_RP_WITH_NAME,
                propName.toString() ) );
        ResourceProperty prop = getProperties().get( propName );
        if ( prop == null )
        {
            if ( !getProperties().getMetaData().isOpenContent() )
            {
                throw new InvalidResourcePropertyQNameFaultException( getNamespaceSet(), propName );
View Full Code Here

    {
        if ( LOG.isDebugEnabled() )
        {
            LOG.debug( MSG.getMessage( Keys.GET_RP_REQ, propName ) );
        }
        ResourceProperty prop = getProperties().get( propName );
        if ( prop == null )
        {
            throw new InvalidResourcePropertyQNameFaultException( getNamespaceSet(), propName );
        }
        refreshProperty( prop );
View Full Code Here

    {
        LOG.debug( MSG.getMessage( Keys.CLEAR_PROP_SET ) );
        Collection props = m_propsMap.values();
        for ( Iterator iterator = props.iterator(); iterator.hasNext(); )
        {
            ResourceProperty prop = (ResourceProperty) iterator.next();
            prop.clear();
            m_propsMap.remove( prop.getMetaData().getName() );
        }
    }
View Full Code Here

        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

     */
    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

   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

   {
      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

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.