Welcome!

Eclipse Authors: Pat Romanski, Elizabeth White, Liz McMillan, David H Deans, JP Morgenthal

Related Topics: Eclipse, Adobe Flex

Eclipse: Article

A Runtime Integration Approach to Application Development

Plug-in Integrator Pattern

Annexure –A: Configurator Schema XSD

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:complexType name="containerConfigurationType">
        <xsd:sequence>
            <xsd:element ref="keepStaticChildren"/>
            <xsd:element name="pluginComponent" type="pluginComponentType" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="clazz" type="xsd:string" use="required"/>
        <xsd:attribute name="pluginInterface" type="xsd:string" use="required"/>
    </xsd:complexType>
    <xsd:element name="keepStaticChildren" type="xsd:string"/>
    <xsd:complexType name="pluginComponentType">
        <xsd:sequence>
            <xsd:element name="property" type="propertyType" maxOccurs="unbounded"/>
            <xsd:element ref="moduleURL"/>
            <xsd:element ref="asClass"/>
            <xsd:element name="initParam" type="initParamType" maxOccurs="unbounded"/>
            <xsd:element name="msgMap" type="msgMapType" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:string" use="required"/>
        <xsd:attribute name="name" type="xsd:string" use="required"/>
    </xsd:complexType>
    <xsd:element name="moduleURL" type="xsd:string"/>
    <xsd:complexType name="initParamType">
        <xsd:sequence>
            <xsd:element name="selfFunction" type="selfFunctionType" minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="type" use="required">
            <xsd:simpleType>
                <xsd:restriction base="xsd:NMTOKEN">
                    <xsd:enumeration value="funcHookup"/>
                    <xsd:enumeration value="varHookup"/>
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
        <xsd:attribute name="bindToContainerProperty" type="xsd:string" use="required"/>
        <xsd:attribute name="selfpropertyName" type="xsd:string"/>
    </xsd:complexType>
    <xsd:complexType name="selfFunctionType">
        <xsd:sequence>
            <xsd:element name="arg" type="argType" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string" use="required"/>
    </xsd:complexType>
    <xsd:complexType name="argType">
        <xsd:choice>
            <xsd:element name="objectRef" type="objectRefType"/>
            <xsd:element name="object" type="objectType"/>
        </xsd:choice>
        <xsd:attribute name="name" use="required"/>
    </xsd:complexType>
    <xsd:element name="asClass" type="xsd:string"/>
    <xsd:complexType name="propertyType">
        <xsd:choice>
            <xsd:element ref="value"/>
            <xsd:element name="object" type="objectType"/>
            <xsd:element name="objectRef" type="objectRefType"/>
        </xsd:choice>
        <xsd:attribute name="name" use="required"/>
    </xsd:complexType>
    <xsd:complexType name="srcExtentionPointType">
        <xsd:choice>
            <xsd:element name="srcMsg" type="srcMsgType"/>
            <xsd:element name="srcCallBackFunc" type="srcCallBackFuncType"/>
        </xsd:choice>
    </xsd:complexType>
    <xsd:complexType name="destHandlerType">
        <xsd:choice>
            <xsd:element name="destMsg" type="destMsgType"/>
            <xsd:element name="destHandlerFunc" type="destHandlerFuncType"/>
        </xsd:choice>
    </xsd:complexType>
    <xsd:complexType name="msgMapType">
        <xsd:sequence>
            <xsd:element name="srcExtentionPoint" type="srcExtentionPointType"/>
            <xsd:element name="destHandler" type="destHandlerType"/>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:string" use="required"/>
        <xsd:attribute name="handler" use="required">
            <xsd:simpleType>
                <xsd:restriction base="xsd:NMTOKEN">
                    <xsd:enumeration value="event"/>
                    <xsd:enumeration value="function"/>
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
    </xsd:complexType>
    <xsd:complexType name="srcCallBackFuncType">
        <xsd:sequence>
            <xsd:element name="arg" type="argType" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string" use="required"/>
    </xsd:complexType>
    <xsd:complexType name="destHandlerFuncType">
        <xsd:sequence>
            <xsd:element name="arg" type="argType" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string" use="required"/>
    </xsd:complexType>
    <xsd:complexType name="destMsgType">
        <xsd:sequence>
            <xsd:element name="object" type="objectType"/>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:string" use="required"/>
        <xsd:attribute name="pluginCompid" type="xsd:string" use="required"/>
        <xsd:attribute name="type" type="xsd:string" use="required"/>
    </xsd:complexType>
    <xsd:complexType name="evaluateType">
        <xsd:attribute name="expr" use="required">
            <xsd:simpleType>
                <xsd:restriction base="xsd:NMTOKEN">
                    <xsd:enumeration value="aproperty"/>
                    <xsd:enumeration value="aproperty.internal"/>
                    <xsd:enumeration value="aproperty.internalproperty"/>
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
    </xsd:complexType>
    <xsd:complexType name="objectType">
        <xsd:sequence>
            <xsd:element name="property" type="propertyType" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="clazz" use="required"/>
    </xsd:complexType>
    <xsd:complexType name="objectRefType">
        <xsd:sequence>
            <xsd:element name="evaluate" type="evaluateType"/>
        </xsd:sequence>
        <xsd:attribute name="srcObject" use="required"/>
    </xsd:complexType>
    <xsd:complexType name="srcMsgType">
        <xsd:attribute name="id" type="xsd:string" use="required"/>
        <xsd:attribute name="pluginCompid" type="xsd:string" use="required"/>
        <xsd:attribute name="type" type="xsd:string" use="required"/>
    </xsd:complexType>
    <xsd:element name="value" type="xsd:string"/>
    <xsd:element name="response">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref="status"/>
                <xsd:element name="data" type="dataType"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name="status" type="xsd:string"/>
    <xsd:complexType name="dataType">
        <xsd:sequence>
            <xsd:element name="containerConfiguration" type="containerConfigurationType" maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>
</xsd:schema>

Annexure –B: Configuration file for Sample Application

<?xml version="1.0" encoding="UTF-8"?>
<containerConfiguration clazz="sample::PlugInIntegratorContainer" pluginInterface="mx.core::IUIComponent">
    <keepStaticChildren>true</keepStaticChildren>
    <pluginComponent id="12345679" name="View1">
        <property name="label">
            <value><![CDATA[Chart View]]></value>
        </property>
        <moduleURL>/an/external/module/url-view1</moduleURL>
        <asClass>sample.plugincomp.ViewOne</asClass>
        <initParam type="varHookup" bindToContainerProperty="editingObject" selfpropertyName="myData"/>
        <msgMap id="123456789" handler="event">
            <srcExtentionPoint>
                <srcMsg id="draw" pluginCompid="333345678" type="somepkg::GraphEvent"/>
            </srcExtentionPoint>
            <destHandler>
                <destMsg id="graphIt" type="some.pkg::SomeEvent">
                    <object clazz="some.pkg::SomeEvent">
                        <property name="any">
                            <objectRef srcObject="srcEvent">
                                <evaluate expr="an.exp.to.get.req.data"/>
                            </objectRef>
                        </property>
                    </object>
                </destMsg>
            </destHandler>
        </msgMap>
        <!-- Other way to define msgMap hooked up to dest handler function
        <msgMap id="123456789" handler="function">
            <srcExtentionPoint>
                <srcMsg id="draw" pluginCompid="333345678" type="somepkg::GraphEvent"/>
            </srcExtentionPoint>
            <destHandler>
                <destHandlerFunc name="graphIthandlerFunc">
                    <arg name="param1">
                        <object clazz="some.pkg::SomeEvent">
                            <property name="any">
                                <objectRef srcObject="srcEvent">
                                    <evaluate expr="an.exp.to.get.req.data"/>
                                </objectRef>
                            </property>
                        </object>                        
                    </arg>                    
                </destHandlerFunc>
            </destHandler>
        </msgMap>
        -->
    </pluginComponent>
    <pluginComponent id="22345678" name="View2">
        <property name="label">
            <value><![CDATA[Grid Data View]]></value>
        </property>
        <moduleURL>/an/external/module/url-view2</moduleURL>
        <initParam type="varHookup" bindToContainerProperty="editingObject" selfpropertyName="myData"/>
        <initParam type="funcHookup" bindToContainerProperty="editingObject">
            <selfFunction name="initMyData">
                <arg name="param1">
                    <objectRef srcObject="editingObject">
                        <evaluate expr="aproperty"/>
                    </objectRef>
                </arg>
                <arg name="param2">
                    <objectRef srcObject="editingObject">
                        <evaluate expr="aproperty.internalproperty"/>
                    </objectRef>
                </arg>
                <arg name="param3">
                    <object clazz="String">
                        <property name="default">
                            <value>str value</value>
                        </property>
                    </object>
                </arg>                
            </selfFunction>
        </initParam>        
    </pluginComponent>
    <pluginComponent id="333345678" name="View3">
        <property name="label">
            <value><![CDATA[Stats View]]></value>
        </property>
        <moduleURL>/an/external/module/url-view3</moduleURL>
        <initParam type="funcHookup" bindToContainerProperty="editingObject">
            <selfFunction name="initStatsData">
                <arg name="param1">
                   <objectRef srcObject="editingObject">
                        <evaluate expr="dataSeries"/>
                   </objectRef>
                </arg>
                <arg name="param2">
                   <objectRef srcObject="editingObject">
                    <evaluate expr="dataSeries.processLength"/>
                   </objectRef>
                </arg>                            
            </selfFunction>
        </initParam>                
    </pluginComponent>
</containerConfiguration>

More Stories By Indroniel Deb Roy

Indroniel Deb Roy works as an UI Architect for BlueCoat Systems.He has more than 10 years of development experience in the fields of J2EE and Web Application development. In his past he worked in developing web applications for Oracle, Novell, Packeteer, Knova etc. He has a passion for innovation and works with various Web2.0 & J2EE technologies and recently started on Smart Phone & IPhone Development.

More Stories By Alex Nhu

Alex Nhu works as a manager, UI Development at Packeteer Inc. He has more than 11 years of work experience designing and architecting complex server-side J2EE and XML applications. He loves developing Web applications with Flex now after getting a taste of developing UI using other RIA platforms.

Comments (1)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


IoT & Smart Cities Stories
Cloud computing delivers on-demand resources that provide businesses with flexibility and cost-savings. The challenge in moving workloads to the cloud has been the cost and complexity of ensuring the initial and ongoing security and regulatory (PCI, HIPAA, FFIEC) compliance across private and public clouds. Manual security compliance is slow, prone to human error, and represents over 50% of the cost of managing cloud applications. Determining how to automate cloud security compliance is critical...
Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities - ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups.
"MobiDev is a Ukraine-based software development company. We do mobile development, and we're specialists in that. But we do full stack software development for entrepreneurs, for emerging companies, and for enterprise ventures," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
The Internet of Things is clearly many things: data collection and analytics, wearables, Smart Grids and Smart Cities, the Industrial Internet, and more. Cool platforms like Arduino, Raspberry Pi, Intel's Galileo and Edison, and a diverse world of sensors are making the IoT a great toy box for developers in all these areas. In this Power Panel at @ThingsExpo, moderated by Conference Chair Roger Strukhoff, panelists discussed what things are the most important, which will have the most profound e...
As IoT continues to increase momentum, so does the associated risk. Secure Device Lifecycle Management (DLM) is ranked as one of the most important technology areas of IoT. Driving this trend is the realization that secure support for IoT devices provides companies the ability to deliver high-quality, reliable, secure offerings faster, create new revenue streams, and reduce support costs, all while building a competitive advantage in their markets. In this session, we will use customer use cases...
Bill Schmarzo, author of "Big Data: Understanding How Data Powers Big Business" and "Big Data MBA: Driving Business Strategies with Data Science," is responsible for setting the strategy and defining the Big Data service offerings and capabilities for EMC Global Services Big Data Practice. As the CTO for the Big Data Practice, he is responsible for working with organizations to help them identify where and how to start their big data journeys. He's written several white papers, is an avid blogge...
When talking IoT we often focus on the devices, the sensors, the hardware itself. The new smart appliances, the new smart or self-driving cars (which are amalgamations of many ‘things'). When we are looking at the world of IoT, we should take a step back, look at the big picture. What value are these devices providing. IoT is not about the devices, its about the data consumed and generated. The devices are tools, mechanisms, conduits. This paper discusses the considerations when dealing with the...
Business professionals no longer wonder if they'll migrate to the cloud; it's now a matter of when. The cloud environment has proved to be a major force in transitioning to an agile business model that enables quick decisions and fast implementation that solidify customer relationships. And when the cloud is combined with the power of cognitive computing, it drives innovation and transformation that achieves astounding competitive advantage.
With 10 simultaneous tracks, keynotes, general sessions and targeted breakout classes, @CloudEXPO and DXWorldEXPO are two of the most important technology events of the year. Since its launch over eight years ago, @CloudEXPO and DXWorldEXPO have presented a rock star faculty as well as showcased hundreds of sponsors and exhibitors! In this blog post, we provide 7 tips on how, as part of our world-class faculty, you can deliver one of the most popular sessions at our events. But before reading...
If a machine can invent, does this mean the end of the patent system as we know it? The patent system, both in the US and Europe, allows companies to protect their inventions and helps foster innovation. However, Artificial Intelligence (AI) could be set to disrupt the patent system as we know it. This talk will examine how AI may change the patent landscape in the years to come. Furthermore, ways in which companies can best protect their AI related inventions will be examined from both a US and...