Commit f1df85cc authored by Damien Fournier's avatar Damien Fournier
Browse files

* Update copyrights for pom, java, fractal files in assembly factory directory

* Update README, LICENSE an RELEASE_NOTES
parent 5b244df6
============================================================================
SCOrWare FraSCAti Assembly Factory.
Copyright (C) 2007-2008 INRIA, USTL
OW2 FraSCAti Assembly Factory.
Copyright (C) 2007-2009 INRIA, USTL
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
......@@ -16,9 +16,12 @@ You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: Damien.Fournier@inria.fr
Contact: frascati@ow2.org
Author: Damien Fournier
Philippe Merle
Nicolas Dolet
Christophe Demarey
Contributor : Philippe Merle
============================================================================
......@@ -16,14 +16,16 @@ You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: Damien.Fournier@inria.fr
Contact: frascati@ow2.org
Author: Damien Fournier
Contributor : Philippe Merle
Philippe Merle
Nicolas Dolet
Christophe Demarey
============================================================================
Assembly Factory 0.4
Assembly Factory 0.5
--------------------
The Assembly Factory provides support for creating SCA components from SCA
......@@ -174,6 +176,7 @@ the HelloWorld in the assembly-factory/examples/helloworld directory.
- SCOrWare : http://www.scorware.org
For any question concerning the Assembly Factory, please contact
Damien.Fournier@inria.fr / Philippe.Merle@inria.fr
frascati@ow2.org
Date of creation of this file: May 27, 2008.
Last modified: October 03, 2008.
Last modified: January 15, 2009.
Assembly Factory 0.4
Assembly Factory 0.5
--------------------
* move to org.ow2.frascati for artifacts and Java packages
Assembly Factory 0.4
--------------------
* Preliminary support for Spring implementation.
See examples/helloworld-spring
* Partial support for composite properties
......@@ -16,7 +19,6 @@ Released on 21/11/2008
Assembly Factory 0.3
--------------------
* Enable SCA Model Validation
* Run with Java 1.5 and 1.6
* SCA Composites run in separate containers
......
<?xml version="1.0"?>
<!--
* Copyright (c) 2007-2008 INRIA
* OW2 FraSCAti : Assembly Factory
*
* Copyright (c) 2007-2009 INRIA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -16,6 +19,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
......
/***
* Assembly Factory
* Copyright (C) 2008 INRIA, USTL
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2009 INRIA, USTL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -16,6 +16,8 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: frascati@ow2.org
*
* Author(s): Damien Fournier
* Christophe Demarey
* Philippe Merle
......
/***
* Assembly Factory
* Copyright (C) 2008 INRIA, USTL
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2009 INRIA, USTL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: Damien.Fournier@inria.fr
* Contact: frascati@ow2.org
*
* Author: Damien Fournier
* Contributor(s) : Christophe Demarey
......
/***
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2009 INRIA, USTL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: frascati@ow2.org
*
* Author: Damien Fournier
*/
package org.ow2.frascati.factory;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.logging.Logger;
import org.objectweb.fractal.api.Component;
import org.objectweb.fractal.api.NoSuchInterfaceException;
import org.objectweb.fractal.api.control.IllegalContentException;
import org.objectweb.fractal.api.control.IllegalLifeCycleException;
import org.objectweb.fractal.api.control.NameController;
import org.objectweb.fractal.api.factory.GenericFactory;
import org.objectweb.fractal.api.factory.InstantiationException;
import org.objectweb.fractal.api.type.ComponentType;
import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.api.type.TypeFactory;
/**
* Domain Manager allows to load/unload severals SCA composite
*
* @author <a href="mailto:damien.fournier@inria.fr">Damien Fournier</a>
* @version $Revision$
*/
public class ScaDomainManager {
/**
* Logger for this class
*/
Logger log = Logger.getLogger(ScaDomainManager.class.getCanonicalName());
private AbstractFactory factory;
@SuppressWarnings(value = "unused")
private Component factoryComp;
private Component domain;
private HashMap<String, Component> componentRegistry = new HashMap<String, Component>();
/**
* Set factory to use by the SCA Domain
*
* @param f
* - A FraSCAti factory instance
*/
private void setFactory(AbstractFactory f) {
factory = f;
factoryComp = f.getFactory();
}
/**
* Get Factory used for this domain
*
* @return
*/
public AbstractFactory getFactory() {
return factory;
}
/**
* Set the domain to manage represented as Fractal component
*
* @param c
* - The Fractal component representing the domain
*
*/
public void setDomain(Component c) {
domain = c;
}
/**
* SCA Domain constructor
*
* @param f
* - The FraSCAti factory to associate with the domain
*/
public ScaDomainManager(AbstractFactory f) {
setFactory(f);
try {
Component bootstrap = org.objectweb.fractal.util.Fractal
.getBootstrapComponent();
GenericFactory gf = org.objectweb.fractal.util.Fractal
.getGenericFactory(bootstrap);
TypeFactory tf = org.objectweb.fractal.util.Fractal
.getTypeFactory(bootstrap);
ComponentType containerType = tf.createFcType(new InterfaceType[0]);
Component d = gf.newFcInstance(containerType, "composite", null);
NameController nc = org.objectweb.fractal.util.Fractal
.getNameController(d);
nc.setFcName("domain");
setDomain(d);
} catch (InstantiationException e) {
e.printStackTrace();
} catch (NoSuchInterfaceException e) {
e.printStackTrace();
}
}
/**
* Load a new SCA composite
*
* @param composite
* - Composite file name
* @param jars
* - list of jars files to load
* @throws NoSuchInterfaceException
* @throws IllegalLifeCycleException
* @throws IllegalContentException
*/
public boolean load(String composite, URL[] jars)
throws NoSuchInterfaceException, IllegalContentException,
IllegalLifeCycleException {
Component c = factory.getComposite(composite, jars);
Component[] cList = org.objectweb.fractal.util.Fractal
.getSuperController(c).getFcSuperComponents();
for (Component component : cList) {
org.objectweb.fractal.util.Fractal.getContentController(this.domain)
.addFcSubComponent(component);
this.componentRegistry.put(composite, component);
}
return true;
}
/**
* Unload an SCA composite
*
* @param composite
* - composite name
* @throws NoSuchInterfaceException
* @throws IllegalLifeCycleException
* @throws IllegalContentException
*/
public void unload(String composite) throws NoSuchInterfaceException,
IllegalContentException, IllegalLifeCycleException {
Component component = this.componentRegistry.get(composite + "-container");
try {
org.objectweb.fractal.util.Fractal.getLifeCycleController(component)
.stopFc();
org.objectweb.fractal.util.Fractal.getContentController(domain)
.removeFcSubComponent(component);
} catch (NullPointerException e) {
log.severe((("Composite " + composite) + " does not exist"));
}
}
/**
* Get list of SCA composites loaded in the Domain
*
* @return
*/
public List<java.lang.String> getLoadedComposites() {
Component[] cList = null;
List<java.lang.String> nList = new ArrayList<java.lang.String>();
try {
cList = org.objectweb.fractal.util.Fractal.getContentController(
this.domain).getFcSubComponents();
if (cList != null) {
for (Component component : cList) {
String name = org.objectweb.fractal.util.Fractal.getNameController(
component).getFcName();
System.out.println(name);
nList.add(name.substring(0, ((name.length()) - 10)));
}
}
} catch (NoSuchInterfaceException e) {
e.printStackTrace();
}
return nList;
}
/**
* Start composite of the Domain
*
* @param composite
* - name of the composite
* @return Status of the composite
* @throws NoSuchInterfaceException
* @throws IllegalLifeCycleException
*/
public String startComposite(String composite)
throws NoSuchInterfaceException, IllegalLifeCycleException {
Component component = this.componentRegistry.get(composite + "-container");
try {
org.objectweb.fractal.util.Fractal.getLifeCycleController(component)
.startFc();
return org.objectweb.fractal.util.Fractal.getLifeCycleController(
component).getFcState();
} catch (NullPointerException e) {
log.severe((("Composite " + composite) + " does not exist"));
}
return "Error";
}
/**
* Stop composite of the Domain
*
* @param composite
* - name of the composite
* @return Status of the composite
* @throws NoSuchInterfaceException
* @throws IllegalLifeCycleException
*/
public String stopComposite(String composite)
throws NoSuchInterfaceException, IllegalLifeCycleException {
Component component = this.componentRegistry.get(composite + "-container");
try {
org.objectweb.fractal.util.Fractal.getLifeCycleController(component)
.stopFc();
return org.objectweb.fractal.util.Fractal.getLifeCycleController(
component).getFcState();
} catch (NullPointerException e) {
log.severe((("Composite " + composite) + " does not exist"));
}
return "Error";
}
}
/***
* Assembly Factory
* Copyright (C) 2008 INRIA, USTL
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2009 INRIA, USTL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: Damien.Fournier@inria.fr
* Contact: frascati@ow2.org
*
* Author: Damien Fournier
*/
......
/***
* Assembly Factory
* Copyright (C) 2008 INRIA, USTL
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2009 INRIA, USTL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: Damien.Fournier@inria.fr
* Contact: frascati@ow2.org
*
* Author: Damien Fournier
*/
......
/***
* Assembly Factory
* Copyright (C) 2008 INRIA, USTL
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2009 INRIA, USTL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: Damien.Fournier@inria.fr
* Contact: frascati@ow2.org
*
* Author: Damien Fournier
*/
......
/***
* Assembly Factory
* Copyright (C) 2008 INRIA, USTL
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2009 INRIA, USTL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: Damien.Fournier@inria.fr
* Contact: frascati@ow2.org
*
* Author: Damien Fournier
*/
......
/***
* Assembly Factory
* Copyright (C) 2008 INRIA, USTL
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2009 INRIA, USTL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: Damien.Fournier@inria.fr
* Contact: frascati@ow2.org
*
* Author: Damien Fournier
*/
......
/***
* Assembly Factory
* Copyright (C) 2008 INRIA, USTL
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2009 INRIA, USTL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: Damien.Fournier@inria.fr
* Contact: frascati@ow2.org
*
* Author: Damien Fournier
*/
......
/***
* Assembly Factory
* Copyright (C) 2008 INRIA, USTL
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2009 INRIA, USTL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: Damien.Fournier@inria.fr
* Contact: frascati@ow2.org
*
* Author: Damien Fournier
*/
......
/***
* Assembly Factory
* Copyright (C) 2008 INRIA, USTL
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2009 INRIA, USTL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: Damien.Fournier@inria.fr
* Contact: frascati@ow2.org
*
* Author: Damien Fournier
*/
......
/***
* Assembly Factory
* Copyright (C) 2008 INRIA, USTL
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2009 INRIA, USTL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: Damien.Fournier@inria.fr
* Contact: frascati@ow2.org
*
* Author: Damien Fournier
*/
......
/***
* Assembly Factory
* Copyright (C) 2008 INRIA, USTL
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2009 INRIA, USTL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: Damien.Fournier@inria.fr
* Contact: frascati@ow2.org
*
* Author: Damien Fournier
*/
......
/***
* Assembly Factory
* Copyright (C) 2008 INRIA, USTL
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2009 INRIA, USTL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: Damien.Fournier@inria.fr
* Contact: frascati@ow2.org
*
* Author: Damien Fournier
*/
......
/***
* Assembly Factory
* Copyright (C) 2008 INRIA, USTL
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2009 INRIA, USTL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software