diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/factorys/Resources.properties b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/factorys/Resources.properties index 275097c8f..9d1e2fbf5 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/factorys/Resources.properties +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/factorys/Resources.properties @@ -1 +1,2 @@ -missing-home-dir.error=Cannot locate antRun scripts: Property 'myrmidon.home' not specified \ No newline at end of file +missing-home-dir.error=Cannot locate antRun scripts: Property 'myrmidon.home' not specified +create-vfs-manager.error=Could not create the VFS manager. \ No newline at end of file diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/factorys/VfsManagerFactory.java b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/factorys/VfsManagerFactory.java new file mode 100644 index 000000000..62476a6be --- /dev/null +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/factorys/VfsManagerFactory.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) The Apache Software Foundation. All rights reserved. + * + * This software is published under the terms of the Apache Software License + * version 1.1, a copy of which has been included with this distribution in + * the LICENSE.txt file. + */ +package org.apache.myrmidon.framework.factorys; + +import org.apache.aut.vfs.FileSystemManager; +import org.apache.aut.vfs.impl.DefaultFileSystemManager; +import org.apache.myrmidon.interfaces.service.ServiceFactory; +import org.apache.myrmidon.interfaces.service.ServiceException; +import org.apache.avalon.excalibur.i18n.Resources; +import org.apache.avalon.excalibur.i18n.ResourceManager; + +/** + * A factory that creates the {@link FileSystemManager} service. + * + * @author Adam Murdoch + * @version $Revision$ $Date$ + */ +public class VfsManagerFactory + implements ServiceFactory +{ + private final static Resources REZ + = ResourceManager.getPackageResources( VfsManagerFactory.class ); + + /** + * Create a service that coresponds to this factory. + */ + public Object createService() + throws ServiceException + { + try + { + return new DefaultFileSystemManager(); + } + catch( Exception e ) + { + final String message = REZ.getString( "create-vfs-manager.error" ); + throw new ServiceException( message ); + } + } +} diff --git a/proposal/myrmidon/src/manifest/builtin-ant-roles.xml b/proposal/myrmidon/src/manifest/builtin-ant-roles.xml index cce5f92fa..0165be62c 100644 --- a/proposal/myrmidon/src/manifest/builtin-ant-roles.xml +++ b/proposal/myrmidon/src/manifest/builtin-ant-roles.xml @@ -1,9 +1,11 @@ - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/proposal/myrmidon/src/manifest/core-services.xml b/proposal/myrmidon/src/manifest/core-services.xml index 9cc54aefd..fa8076bae 100644 --- a/proposal/myrmidon/src/manifest/core-services.xml +++ b/proposal/myrmidon/src/manifest/core-services.xml @@ -1,4 +1,9 @@ - - - \ No newline at end of file + + + + + + + + +