Package com.volantis.mcs.integration.iapi

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


        ApplicationInternals.setVolantisBean(application, volantis);     
        MarinerRequestContext context = new TestMarinerRequestContext();
        ContextInternals.setMarinerApplication(context, application);
        for (int pluginCount=0; pluginCount < 6; pluginCount++) {
            MarkupPluginManager manager = volantis.getMarkupPluginManager();
            InvokeAttributes attrs = new InvokeAttributes();
            attrs.setName("myPlugin" + pluginCount);
            MarkupPlugin plugin = manager.getMarkupPlugin(
                    context, attrs.getName());

            if (plugin instanceof TestMarkupPlugin){
                Map args = ((TestMarkupPlugin)plugin).initializeArgs;
                for (int argCount = 0; argCount < 3; argCount++) {
                    Assert.assertEquals("Wrong value for argument value.",
View Full Code Here


    /**
     * Test the reset method    
     */
    public void testReset() throws Exception {
        InvokeAttributes attrs = new InvokeAttributes();
        attrs.setMethodName("initialize");
        attrs.setName("myPlugin");
       
        assertEquals("Unexpected value for methodName.",
                "initialize", attrs.getMethodName());
        assertEquals("Unexpected value for name.",
                "myPlugin", attrs.getName());
       
        attrs.reset();
       
        assertNull("methodName attribute should be null.",
                attrs.getMethodName());
       
        assertNull("name should be null.", attrs.getName());
    }
View Full Code Here

                ContextInternals.getMarinerPageContext(context);

        MarkupPluginManager manager =
                pageContext.getVolantisBean().getMarkupPluginManager();

        InvokeAttributes attrs = (InvokeAttributes) iapiAttributes;

        final String pluginName = attrs.getName();
        MarkupPlugin plugin = manager.getMarkupPlugin(context, pluginName);

        String name = attrs.getName();
        String methodName = attrs.getMethodName();

        MarkupPluginMethod method = MarkupPluginMethod.literal(methodName);
        if (MarkupPluginMethod.INITIALIZE == method) {
            // Get the MarinerApplication to pass to the plugin initialise
            // method.
View Full Code Here

     * Push an InvokeElement onto the top of our stack of elements.
     * @param saxAttributes The SAX Attributes with the infomation required
     * to create our IAPIElement    
     */
    protected void pushInvokeEntryOnStack(Attributes saxAttributes) {
        InvokeAttributes attrs = new InvokeAttributes();
        attrs.setName(saxAttributes.getValue("pluginName"));
        attrs.setMethodName(saxAttributes.getValue("methodName"));
       
        InvokeElement element = new InvokeElement();
       
        elementStackEntry = new IAPIElementStackEntry(element, attrs);
        elementStack.push(elementStackEntry);
View Full Code Here

        ac.setValue(argValue);
        config.addArgument(ac);

        MarkupPluginManagerImpl manager = createManagerForOnePlugin(config);

        InvokeAttributes attrs = new InvokeAttributes();
        attrs.setName(pluginName);

        MarinerRequestContext requestContext = createMarinerRequestContext();

        MarkupPlugin plugin
                = manager.getMarkupPlugin(requestContext, attrs.getName());
        assertTrue("Expected an instance of ManagerTestMarkupPlugin.",
                   plugin instanceof ManagerTestMarkupPlugin);
    }
View Full Code Here

        ac.setValue(argValue);
        config.addArgument(ac);

        MarkupPluginManagerImpl manager = createManagerForOnePlugin(config);

        InvokeAttributes attrs = new InvokeAttributes();
        attrs.setName(pluginName);

        MarinerRequestContext requestContext = createMarinerRequestContext();

        MarkupPlugin fromManager =
                manager.getMarkupPlugin(requestContext, attrs.getName());
        assertNotNull("Unexpected null value for plugin", fromManager);
        assertTrue("Expected an instance of ManagerTestMarkupPlugin.",
                   fromManager instanceof ManagerTestMarkupPlugin);

        //MarkupPluginContainerImpl container = (MarkupPluginContainerImpl)
View Full Code Here

        ac.setValue(argValue);
        config.addArgument(ac);

        MarkupPluginManagerImpl manager = createManagerForOnePlugin(config);

        InvokeAttributes attrs = new InvokeAttributes();
        attrs.setName(pluginName);

        MarinerRequestContext requestContext = createMarinerRequestContext();

        MarkupPlugin fromManager =
                manager.getMarkupPlugin(requestContext, attrs.getName());
        assertNotNull("Unexpected null value for plugin", fromManager);
        assertTrue("Expected an instance of ManagerTestMarkupPlugin.",
                   fromManager instanceof ManagerTestMarkupPlugin);

        MarkupPlugin fromContext
View Full Code Here

TOP

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

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.