Package org.apache.ws.resource.properties

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


    private SushiCallback m_callback;

    protected void setUp() throws Exception
    {
        super.setUp();
        m_callback = new SushiCallback( new SushiPlate() );
    }
View Full Code Here


            XmlException
    {
        String newValue = "99";
        m_resourceContext = new SushiResourceContext();
        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 );
        XmlObject xBean =
                XmlObject.Factory.parse( "<foo:Ebi xmlns:foo=\"http://ws.apache.org/resource/properties/test/sushi\">"
                + newValue + "</foo:Ebi>" );
        updateResourceProperty( new XmlObject[]{xBean} );
        assertPropHasOneElemWithGivenValue( SushiPropertyQNames.EBI, newValue );
        assertTrue( callback.updateWasInvoked() );
    }
View Full Code Here

    public void testGetMultipleResourcePropertiesCallback()
            throws Exception
    {
        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 );
View Full Code Here

    {
        m_resourceContext = new SushiResourceContext();

        //build callback obj
        SushiPlate plate = new SushiPlate();
        SushiCallback callback = new SushiCallback( plate );

        //check whats there
        QueryResourcePropertiesResponseDocument.QueryResourcePropertiesResponse queryResourcePropertiesResponse =
                queryResourceProperties( "*" );
        XmlObject[] ebiPropElems =
View Full Code Here

    public void testGetPropertyTriggersCallback() throws Exception
    {
        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 );
View Full Code Here

    public void testGetMultipleResourcePropertiesCallback()
            throws Exception
    {
        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 );
View Full Code Here

    {
        m_resourceContext = new SushiResourceContext();

        //build callback obj
        SushiPlate plate = new SushiPlate();
        SushiCallback callback = new SushiCallback( plate );

        //check whats there
        QueryResourcePropertiesResponseDocument.QueryResourcePropertiesResponse queryResourcePropertiesResponse =
                queryResourceProperties( "*" );
        XmlObject[] ebiPropElems =
View Full Code Here

    public void testGetPropertyTriggersCallback() throws Exception
    {
        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 );
View Full Code Here

    private SushiCallback m_callback;

    protected void setUp() throws Exception
    {
        super.setUp();
        m_callback = new SushiCallback( new SushiPlate() );
    }
View Full Code Here

    public void testUpdateResourcePropertiesCallback() throws ResourceException, ResourceContextException, XmlException
    {
        String newValue = "99";
        m_resourceContext = new SushiResourceContext();
        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();

        XmlObject xmlObject =
                XmlObject.Factory.parse( "<foo:Ebi xmlns:foo=\"http://ws.apache.org/resource/properties/test/sushi\">"
                + newValue + "</foo:Ebi>" );
        XmlBeanUtils.addChildElement( update, xmlObject );

        set_provider.updateResourceProperty( updateDoc.getUpdate() );

        assertPropHasOneElemWithGivenValue( SushiPropertyQNames.EBI, newValue );
        assertTrue( callback.updateWasInvoked() );
    }
View Full Code Here

TOP

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

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.