Examples of SushiPlate


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

    private SushiCallback m_callback;

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

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

    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 );
View Full Code Here

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

     */
    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 );
        XmlObject[] propElems = XmlBeanUtils.getChildElements( response );
        assertNotNull( propElems );
        assertEquals( propNames[0], XmlBeanUtils.getName( propElems[0] ) );
        assertEquals( plate.getEbi().getNumberOfPieces(), XmlBeanUtils.getValue( propElems[0] ) );
    }
View Full Code Here

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

            ResourceContextException
    {
        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 =
                XmlBeanUtils.getChildElements( queryResourcePropertiesResponse, SushiPropertyQNames.EBI );
        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 );
        value = XmlBeanUtils.getValue( ebiPropElems[0] );
        assertEquals( plate.getEbi().getNumberOfPieces(), value );
    }
View Full Code Here

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

     */
    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 );
        XmlObject[] ebiPropElems = XmlBeanUtils.getChildElements( response, SushiPropertyQNames.EBI );
        assertNotNull( ebiPropElems );
        assertEquals( 1, ebiPropElems.length );
        assertEquals( plate.getEbi().getNumberOfPieces(), XmlBeanUtils.getValue( ebiPropElems[0] ) );
    }
View Full Code Here

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

     */
    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 );
        XmlObject[] propElems = XmlBeanUtils.getChildElements( response );
        assertNotNull( propElems );
        assertEquals( propNames[0], XmlBeanUtils.getName( propElems[0] ) );
        assertEquals( plate.getEbi().getNumberOfPieces(), XmlBeanUtils.getValue( propElems[0] ) );
    }
View Full Code Here

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

            ResourceContextException
    {
        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 =
                XmlBeanUtils.getChildElements( queryResourcePropertiesResponse, SushiPropertyQNames.EBI );
        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 );
        value = XmlBeanUtils.getValue( ebiPropElems[0] );
        assertEquals( plate.getEbi().getNumberOfPieces(), value );
    }
View Full Code Here

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

     */
    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 );
        XmlObject[] ebiPropElems = XmlBeanUtils.getChildElements( response, SushiPropertyQNames.EBI );
        assertNotNull( ebiPropElems );
        assertEquals( 1, ebiPropElems.length );
        assertEquals( plate.getEbi().getNumberOfPieces(), XmlBeanUtils.getValue( ebiPropElems[0] ) );
    }
View Full Code Here

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

    private SushiCallback m_callback;

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

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

     */
    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 );
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.