</#list>
<#list comp.getMethod() as meth>
public ${meth.getServiceOperation().getReturnType()}
${meth.getServiceOperation().getName()}
${meth.getServiceOperation().getSignature()} {
//Searching the BindingProviders
<#list comp.getUsesBProviders() as bProv>
${bProv.getBProviderInterface().getName()}
bProvider${bProv.getBProviderId()};
bProvider${bProv.getBProviderId()} =
(${bProv.getBProviderInterface().getName()})
this.getBProvider(
${bProv.getBProviderInterface().getName()}.
class.getName(),
bProvider${bProv.getBProviderId()}PID
);
</#list>
<#if meth.getServiceOperation().getReturnType()!="void">
${meth.getServiceOperation().getReturnType()} result;
</#if>
${meth.getBody()}
this.changeState("${meth.getServiceOperation().
getName()}");
this.log("Operation
’${meth.getServiceOperation().getName()}’
invoked on Component ${getPackageName()}");
<#if meth.getServiceOperation().getReturnType()!="void">
return result;
<#else>
this.notifyConsumers();
</#if>
}
</#list>
//constructor, checkTriggers, changeState,
enabledOperations and buildProps definition here. }
Templates like the one presented above have been de-
veloped for the Interaction and BProvider elements.
Moreover, templates for generating their correspond-
ing activators have been developed too, using the data
of the main elements (the ComponentActivator
using the Component data, etc.).
7 CONCLUSIONS AND FUTURE
WORK
In this paper, we have presented and approach for
building a Software Factory for pervasive systems, fo-
cusing in the definition of a product line for this kind
of systems. We have previously experimented the
benefits of the application of similar approaches. Our
research group have developed a model driven de-
velopment method (called OO-Method (Pastor et al.,
2001)) with full code generation capabilities that has
been implemented in the OlivaNova Model Execu-
tion System
4
. Our aim is to apply these successful
ideas to pervasive systems development. Concretely,
we are working with a specific kind of pervasive sys-
tems: home automation systems.
Currently our future work is focused on four impor-
tant tasks: (1) specifying and implementing the rules
4
http://www.care-t.com/
for automatically transforming the Perv-ML models
into models built using the metamodel introduced
in this work, (2) extending the architecture and the
framework in order to support advanced capabilities
like dynamic evolution or high robustness, (3) provid-
ing new interfaces for accessing the system by means
of new devices, like PDAs, or directly using natural
language, and (4) providing industrial tool support for
the application of the software factory.
REFERENCES
Buschmann, F., Meunier, R., Rohnert, H., Sommerlad, P.,
and Stal, M. (1996). Pattern-Oriented Software Ar-
chitecture, volume 1: A System of Patterns. Wiley.
Fernandes, J. E., Machado, R. J., and ao
´
Alvaro Carvalho,
J. (2004). Model-Driven Methodologies for Pervasive
Information Systems Development. In I International
Workshop on Model-Based Methodologies for Perva-
sive and Embedded Software (MOMPES), pages 15 –
23. Turku Centre for Computer Science.
Greenfield, J., Short, K., Cook, S., and Kent, S. (2004).
Software Factories. Wiley Publising Inc.
Grimm, R., Davis, J., Lemar, E., MacBeth, A., Swanson,
S., Anderson, T., Bershad, B., Borriello, G., Gribble,
S., and Wetherall, D. (2004). System Support for Per-
vasive Applications. ACM Transactions on Computer
Systems, 22(4):421–486.
Kirby, G., Dearle, A., Morrison, R., Dunlop, M., Connor,
R., and Nixon, P. (2003). Active architecture for per-
vasive contextual services. In International Workshop
on Middleware for Pervasive and Ad-hoc Computing
(MPAC 2003). Rio de Janeiro.
Mu
˜
noz, J. and Pelechano, V. (2005). Building a Software
Factory for Pervasive Systems Development. In Os-
car Pastor and Joo Falco e Cunha, editor, Advanced
Information Systems Engineering: 17th International
Conference, CAiSE 2005, Porto, Portugal, June 13-
17, volume 3520 of Lecture Notes in Computer Sci-
ence, pages 329–343. Springer-Verlag GmbH.
Mu
˜
noz, J., Pelechano, V., and Fons, J. (2004). Model
Driven Development of Pervasive Systems. In I In-
ternational Workshop on Model-Based Methodologies
for Pervasive and Embedded Software (MOMPES),
pages 3 – 14. Turku Centre for Computer Science.
Object Management Group (2003). Model Driven Archi-
tecture Guide.
Pastor, O., G
´
omez, J., Insfr
´
an, E., and Pelechano, V. (2001).
The OO-Method Approach for Information Systems
Modelling: From Object-Oriented Conceptual Model-
ing to Automated Programming. Information Systems,
26(7):507–534.
The Open Services Gateway Iniatite (2003). OSGi Service
Platform (Release 3). IOS Press.
Weiser, M. (1991). The Computer for the 21st Century.
Scientific American, 265(3):94–104.
ICEIS 2006 - INFORMATION SYSTEMS ANALYSIS AND SPECIFICATION
342