Package org.apache.ws.resource.properties

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


        {
            LOG.debug( MSG.getMessage( Keys.GET_RP_REQ, requestDoc.toString() ) );
        }
        GetResourcePropertyResponseDocument responseDoc = createResponseDocument();
        QName propName = requestDoc.getGetResourceProperty();
        ResourceProperty prop = getProperties().get( propName );
        if ( prop == null )
        {
            throw new InvalidResourcePropertyQNameFaultException( propName );
        }
        refreshProperty( prop );
        Iterator propElemIter = prop.iterator();
        while ( propElemIter.hasNext() )
        {
            XmlObject propElem = (XmlObject) propElemIter.next();
            XmlBeanUtils.addChildElement( responseDoc.getGetResourcePropertyResponse(),
                    propElem );
View Full Code Here


    {
        m_resourceContext = new SushiResourceContext();
        SushiPlate plate = new SushiPlate();
        SushiCallback callback = new SushiCallback( plate );
        SushiResource resource = (SushiResource) m_resourceContext.getResource();
        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.EBI );
        resourceProp.setCallback( callback );
        final QName[] propNames = new QName[]{SushiPropertyQNames.EBI, SushiPropertyQNames.IKA};
        GetMultipleResourcePropertiesResponseDocument.GetMultipleResourcePropertiesResponse response = getMultipleResourceProperties( propNames );
        XmlObject[] propElems = XmlBeanUtils.getChildElements( response );
        assertNotNull( propElems );
        assertEquals( propNames[0], XmlBeanUtils.getName( propElems[0] ) );
View Full Code Here

        String value = XmlBeanUtils.getValue( ebiPropElems[0] );
        assertEquals( "9", value );

        //setup callback to modify resource prop
        SushiResource resource = (SushiResource) m_resourceContext.getResource();
        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.EBI );
        resourceProp.setCallback( callback );

        queryResourcePropertiesResponse = queryResourceProperties( "*" );

        ebiPropElems = XmlBeanUtils.getChildElements( queryResourcePropertiesResponse, SushiPropertyQNames.EBI );
        assertNotNull( ebiPropElems );
View Full Code Here

        m_resourceContext = new SushiResourceContext();
        // create and register callback object
        SushiPlate plate = new SushiPlate();
        SushiCallback callback = new SushiCallback( plate );
        SushiResource resource = (SushiResource) m_resourceContext.getResource();
        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.EBI );
        resourceProp.setCallback( callback );
        // send GetRP request and make sure prop got updated by callback.refreshProperty()
        GetResourcePropertyResponseDocument.GetResourcePropertyResponse response = getResourceProperty( SushiPropertyQNames.EBI );
        XmlObject[] ebiPropElems = XmlBeanUtils.getChildElements( response, SushiPropertyQNames.EBI );
        assertNotNull( ebiPropElems );
        assertEquals( 1, ebiPropElems.length );
View Full Code Here

    {
        m_resourceContext = new SushiResourceContext();
        //build callback obj
        //setup callback on resource prop
        SushiResource resource = (SushiResource) m_resourceContext.getResource();
        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.EBI );
        resourceProp.setCallback( m_callback );

        SetResourcePropertiesProvider set_provider = new SetResourcePropertiesProvider( m_resourceContext );
        InsertDocument insertDoc = InsertDocument.Factory.newInstance();
        InsertType insertType = insertDoc.addNewInsert();
View Full Code Here

        set_provider.insertResourceProperty( insertType );

        //setup callback on resource prop
        SushiResource resource = (SushiResource) m_resourceContext.getResource();
        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.IKA );
        resourceProp.setCallback( m_callback );

        DeleteDocument deleteDoc = DeleteDocument.Factory.newInstance();
        DeleteType deleteType = deleteDoc.addNewDelete();
        deleteType.setResourceProperty( SushiPropertyQNames.IKA );
View Full Code Here

        SushiPlate plate = new SushiPlate();
        SushiCallback callback = new SushiCallback( plate );

        //setup callback on resource prop
        SushiResource resource = (SushiResource) m_resourceContext.getResource();
        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.EBI );
        resourceProp.setCallback( callback );

        SetResourcePropertiesProvider set_provider = new SetResourcePropertiesProvider( m_resourceContext );
        UpdateDocument updateDoc = UpdateDocument.Factory.newInstance();
        UpdateType update = updateDoc.addNewUpdate();
View Full Code Here

        QName[] propNames =
                requestDoc.getGetMultipleResourceProperties().getResourcePropertyArray();

        for ( int i = 0; i < propNames.length; i++ )
        {
            ResourceProperty prop = getProperties().get( propNames[i] );
            if ( prop == null )
            {
                throw new InvalidResourcePropertyQNameFaultException( propNames[i] );
            }
            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

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.