You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Marcus Crafter <cr...@fztig938.bank.dresdner.net> on 2002/10/02 19:45:57 UTC

XFC checked in

Hi All,

	Hope all is well.
	
	I've just committed the start of the XFC subproject in
	jakarta-avalon-excalibur. XFC stands for (X)Conf (F)ile
	(C)onverter (for the lack of a better name), and is a subproject
	that aims to make it possible to convert between our current
	container's configuration files.
	
	The code committed is pretty bare bones at the moment, but can
	so far (mostly) convert an ECM style roles file into a Fortress
	one.
	
	There's still a long way to go, but I wanted to get the code into
	CVS so you can all see what's happening, and hopefully provide any
	feedback.
	
	I plan to add support for converting configuration files as well,
	along with other containers (eg. Merlin, etc).
	
	Technically, XFC works by using the following interface:
	
/**
 * Interface defining the operations for creation and serialization of
 * {@link Model} objects.
 *
 * <p>
 *  Implementations of this interface provide creation/serialization
 *  support for specific containers, allowing us to convert to and from
 *  different file formats now and in the future.
 * </p>
 *
 * @author <a href="mailto:crafterm@apache.org">Marcus Crafter</a>
 * @version CVS $Id: Module.java,v 1.1 2002/10/02 17:32:28 crafterm Exp $
 */
public interface Module
{
    /**
     * Generate a {@link Model} object from a given input
     * <code>Context</code>.
     *
     * @param context a <code>String</code> Context value
     * @return a {@link Model} instance
     * @exception Exception if an error occurs
     */
    Model generate( String context )
        throws Exception;

    /**
     * Serialize the contents of a {@link Model} into a particular
     * output <code>Context</code>.
     *
     * @param model a {@link Model} instance
     * @param context a <code>String</code> Context value
     * @exception Exception if an error occurs
     */
    void serialize( Model model, String context )
        throws Exception;
}

	The interface defines 2 operations for creating a Model object and
	for serializing it.
	
	The rest of XFC supports this interface by providing implementations
	as input and output 'modules' (eg. ECM as input, Fortress as output),
	the Model class itself, and a command line runner.

	I have several improvements coming, so I'll leave it there for the
	moment, and add the improvements and future direction in a separate
	email.
	
	Cheers,
	
	Marcus
	
-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   ManageSoft GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'
          &&&&.
    &&&&&&&:

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: XFC checked in

Posted by Marcus Crafter <cr...@fztig938.bank.dresdner.net>.
Hi All,

	Just an update mail for everyone. The current XFC code in CVS can now
	convert	between ECM and Fortress roles in both directions.
	
	The ECM module also contains some logic that attempts to find out what
	lifestyle interface each component implements, if any. This allows the
	Fortress module for example, to automatically choose the right
	component handler in the converted roles file.
	
	There's also an ant task for invoking the converter during a
	build, and some test cases for ensuring correct functionality.
	
	I'm now looking at conversion of configuration files, which I have
	mostly working in my dev environment. Once I iron out a few issues
	I'll commit that code and get some docs up.
	
	Cheers,
	
	Marcus
	
On Wed, Oct 02, 2002 at 07:45:57PM +0200, Marcus Crafter wrote:
> Hi All,
> 
> 	Hope all is well.
> 	
> 	I've just committed the start of the XFC subproject in
> 	jakarta-avalon-excalibur. XFC stands for (X)Conf (F)ile
> 	(C)onverter (for the lack of a better name), and is a subproject
> 	that aims to make it possible to convert between our current
> 	container's configuration files.
> 	
> 	The code committed is pretty bare bones at the moment, but can
> 	so far (mostly) convert an ECM style roles file into a Fortress
> 	one.
> 	
> 	There's still a long way to go, but I wanted to get the code into
> 	CVS so you can all see what's happening, and hopefully provide any
> 	feedback.
> 	
> 	I plan to add support for converting configuration files as well,
> 	along with other containers (eg. Merlin, etc).
> 	
> 	Technically, XFC works by using the following interface:
> 	
> /**
>  * Interface defining the operations for creation and serialization of
>  * {@link Model} objects.
>  *
>  * <p>
>  *  Implementations of this interface provide creation/serialization
>  *  support for specific containers, allowing us to convert to and from
>  *  different file formats now and in the future.
>  * </p>
>  *
>  * @author <a href="mailto:crafterm@apache.org">Marcus Crafter</a>
>  * @version CVS $Id: Module.java,v 1.1 2002/10/02 17:32:28 crafterm Exp $
>  */
> public interface Module
> {
>     /**
>      * Generate a {@link Model} object from a given input
>      * <code>Context</code>.
>      *
>      * @param context a <code>String</code> Context value
>      * @return a {@link Model} instance
>      * @exception Exception if an error occurs
>      */
>     Model generate( String context )
>         throws Exception;
> 
>     /**
>      * Serialize the contents of a {@link Model} into a particular
>      * output <code>Context</code>.
>      *
>      * @param model a {@link Model} instance
>      * @param context a <code>String</code> Context value
>      * @exception Exception if an error occurs
>      */
>     void serialize( Model model, String context )
>         throws Exception;
> }
> 
> 	The interface defines 2 operations for creating a Model object and
> 	for serializing it.
> 	
> 	The rest of XFC supports this interface by providing implementations
> 	as input and output 'modules' (eg. ECM as input, Fortress as output),
> 	the Model class itself, and a command line runner.
> 
> 	I have several improvements coming, so I'll leave it there for the
> 	moment, and add the improvements and future direction in a separate
> 	email.
> 	
> 	Cheers,
> 	
> 	Marcus
> 	
> -- 
>         .....
>      ,,$$$$$$$$$,      Marcus Crafter
>     ;$'      '$$$$:    Computer Systems Engineer
>     $:         $$$$:   ManageSoft GmbH
>      $       o_)$$$:   82-84 Mainzer Landstrasse
>      ;$,    _/\ &&:'   60327 Frankfurt Germany
>        '     /( &&&
>            \_&&&&'
>           &&&&.
>     &&&&&&&:
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 

-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   ManageSoft GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'
          &&&&.
    &&&&&&&:

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>