Package com.volantis.mcs.integration

Examples of com.volantis.mcs.integration.MarkupPlugin


     */
    public void testDoPluginInitialize() throws Exception {
        final BooleanWrapper success = new BooleanWrapper(false);
        final HashMap argMap = new HashMap();
       
        MarkupPlugin plugin = new AbstractMarkupPlugin() {
            // javadoc inherited from superclass.
            public void initialize(Map arguments) {
                success.setValue(true);
                assertSame("Unexpected value for arguments.",
                        argMap, arguments);
View Full Code Here


        final BooleanWrapper success = new BooleanWrapper(false);
        final HashMap argMap = new HashMap();
        final TestMarinerRequestContext requestContext =
                new TestMarinerRequestContext();

        MarkupPlugin plugin = new AbstractMarkupPlugin() {
            // javadoc inherited from superclass.
            public void process(MarinerRequestContext context, Map arguments) {
                success.setValue(true);
                assertSame("Unexpected value for arguments.",
                        argMap, arguments);
View Full Code Here

     * Test the method doPluginRelease    
     */
    public void testDoPluginRelease() throws Exception {
        final BooleanWrapper success = new BooleanWrapper(false);       

        MarkupPlugin plugin = new AbstractMarkupPlugin() {
            // javadoc inherited from superclass.
            public void release() {
                success.setValue(true);
            }
        };
View Full Code Here

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

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

    // javadoc inherited from MarkupPluginContainer interface
    public void releasePlugins() {
        Iterator iterator = plugins.values().iterator();
        while (iterator.hasNext()) {
            MarkupPlugin plugin = (MarkupPlugin) iterator.next();
            plugin.release();
        }
        plugins.clear();
    }
View Full Code Here

    // Javadoc inherited.
    public MarkupPlugin getMarkupPlugin(MarinerRequestContext context,
                                        String pluginName) {

        MarkupPlugin result = null;

        MarkupEntry entry = (MarkupEntry) getEntry(pluginName);

        if (entry != null) {
            IntegrationPluginFactory factory = entry.getFactory();
View Full Code Here

        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

        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)
        //session.getMarkupPluginContainer();
        MarkupPlugin fromContext = (MarkupPlugin)
                sessionScopeContainer.getPlugin(pluginName);

        assertSame("Expected the plugin to be stored in session.",
                   fromManager, fromContext);
    }
View Full Code Here

        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
                = (MarkupPlugin) canvasScopeContainer.getPlugin(pluginName);

        assertSame("Expected the plugin to be stored in canvas.",
                   fromManager, fromContext);
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.integration.MarkupPlugin

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.