Package com.volantis.mcs.integration.iapi

Examples of com.volantis.mcs.integration.iapi.ArgumentAttributes


        };       
        pageContext.pushIAPIElement(arguments);
       
        // Create the ArgumentElement and test the elementStart method.
        ArgumentElement element = new ArgumentElement();
        ArgumentAttributes attrs = new ArgumentAttributes();
        attrs.setName(argName);
        attrs.setValue(argValue);
       
        int result = element.elementStart(requestContext, attrs);
        assertEquals("Unexpected result from elementStart.",
                IAPIConstants.SKIP_ELEMENT_BODY, result);
       
View Full Code Here


    /**
     * Test the reset() method resets the member fields to null.    
     */
    public void testReset() throws Exception {
        ArgumentAttributes attrs = new ArgumentAttributes();
        attrs.setName("myName");
        attrs.setValue("myValue");
       
        assertEquals("Value expected for name attribute.",
                "myName", attrs.getName());
        assertEquals("Value expected for value attribute.",
                "myValue", attrs.getValue());
       
        attrs.reset();
       
        assertNull("Null expected for name attribute.", attrs.getName());
        assertNull("Null expected for value attribute.", attrs.getValue());       
    }
View Full Code Here

    // Javadoc inherited from IAPIElement interface
    public int elementStart(MarinerRequestContext context,
                            IAPIAttributes iapiAttributes)
            throws IAPIException {
       
        ArgumentAttributes attrs = (ArgumentAttributes) iapiAttributes;
       
        MarinerPageContext pageContext =
                ContextInternals.getMarinerPageContext(context);       
       
        ArgumentsElement parent = null;
        try {
            parent = (ArgumentsElement) pageContext.peekIAPIElement();
        } catch (Exception e) {
            logger.error("iapi-element-no-parent-arguments", e);
             throw new IAPIException(
                         exceptionLocalizer.format(
                                     "iapi-element-no-parent-arguments"),
                         e);
        }

        if (parent == null) {
            logger.error("iapi-element-no-parent-arguments");
            throw new IAPIException(exceptionLocalizer.format(
                        "iapi-element-no-parent-arguments"));
        } else {
            parent.addArgument(attrs.getName(), attrs.getValue());
        }
       
        // There should not be any body content for this element.
        return SKIP_ELEMENT_BODY;
    }
View Full Code Here

     * to create our IAPIElement   
     */
    protected void pushArgumentEntryOnStack(Attributes saxAttributes) {
        ArgumentElement element = new ArgumentElement();

        ArgumentAttributes attrs = new ArgumentAttributes();
        attrs.setName(saxAttributes.getValue("name"));
        attrs.setValue(saxAttributes.getValue("value"));
       
        elementStackEntry = new IAPIElementStackEntry(element, attrs);
        elementStack.push(elementStackEntry);
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.integration.iapi.ArgumentAttributes

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.