[jboss-cvs] JBossAS SVN: r97838 - in projects/profileservice/trunk: core/src/main/java/org/jboss/profileservice/bootstrap and 17 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Dec 15 08:14:51 EST 2009


Author: emuckenhuber
Date: 2009-12-15 08:14:50 -0500 (Tue, 15 Dec 2009)
New Revision: 97838

Added:
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/bootstrap/AbstractProfileServiceInitializer.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/bootstrap/ProfileServiceConstants.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/bootstrap/ProfileServiceDomainBootstrap.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/hotdeploy/DefaultHDScannerFactory.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/helpers/
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/FeatureCapability.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/FeatureRequirement.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/FileRepositorySourceConfiguration.java
Removed:
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/bootstrap/AbstractBoostrapProfileFactory.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/FileRepositorySourceMetaData.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/NamespaceFeatureCapability.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/NamespaceFeatureRequirement.java
   projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/package-info.java
   projects/profileservice/trunk/spi/src/main/java/org/jboss/profileservice/spi/metadata/helpers/
Modified:
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/AbstractProfileService.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/bootstrap/AbstractProfileServiceBootstrap.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/dependency/LocalProfileServiceDomain.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/hotdeploy/AbstractHDScannerFactory.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/hotdeploy/HDScanner.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/hotdeploy/HDScannerFactory.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/hotdeploy/Scanner.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/ImplicitProfileRequirement.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/ProfileMetaDataFactory.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/helpers/AbstractProfileKeyCapability.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/helpers/AbstractProfileKeyMetaData.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/helpers/AbstractProfileMetaData.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/helpers/AbstractSubProfileKeyMetaData.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/BasicProfileFactory.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/bootstrap/BootstrapProfileFactory.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/bootstrap/BootstrapProfileMetaData.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/BasicProfileMetaData.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/BasicSubProfileMetaData.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/plugin/ClassPathProfileMetaData.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/plugin/EmptyProfileMetaData.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/plugin/FarmingProfileMetaData.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/plugin/PropertyProfileMetaData.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/plugin/ScanPeriod.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/repository/artifact/AbstractArtifact.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/repository/virtual/AbstractVirtualProfileFactory.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/repository/virtual/VirtualDeploymentProfile.java
   projects/profileservice/trunk/core/src/test/java/org/jboss/test/profileservice/domain/support/DomainMetaDataRepoSupport.java
   projects/profileservice/trunk/core/src/test/java/org/jboss/test/profileservice/support/ProfileServiceBootstrap.java
   projects/profileservice/trunk/core/src/test/java/org/jboss/test/profileservice/test/BasicProfileServiceUnitTestCase.java
   projects/profileservice/trunk/core/src/test/resources/system/profiles/common-profiles.xml
   projects/profileservice/trunk/core/src/test/resources/system/profiles/core-profiles.xml
   projects/profileservice/trunk/spi/src/main/java/org/jboss/profileservice/spi/repository/Artifact.java
Log:
move meta data helpers to core.

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/AbstractProfileService.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/AbstractProfileService.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/AbstractProfileService.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -252,7 +252,10 @@
       }
       // Create the profile key
       ProfileKey key = new ProfileKey(getDomainName(), getServerName(), metaData.getName());
-      
+      if(domain.getProfile(key) != null)
+      {
+         return key;
+      }
       // Register
       // TODO this should be plugable?
       ProfileDependencyContext dependency = new ProfileDependencyContext(key, metaData, domain);

Deleted: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/bootstrap/AbstractBoostrapProfileFactory.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/bootstrap/AbstractBoostrapProfileFactory.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/bootstrap/AbstractBoostrapProfileFactory.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This 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.1 of
- * the License, or (at your option) any later version.
- *
- * This software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */ 
-package org.jboss.profileservice.bootstrap;
-
-/**
- * The abstract bootstrap profile factory.
- * 
- * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision$
- */
-public class AbstractBoostrapProfileFactory
-{
-
-}
-

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/bootstrap/AbstractProfileServiceBootstrap.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/bootstrap/AbstractProfileServiceBootstrap.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/bootstrap/AbstractProfileServiceBootstrap.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -21,122 +21,61 @@
  */ 
 package org.jboss.profileservice.bootstrap;
 
-import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
+import java.util.Collection;
+
 import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerState;
 import org.jboss.kernel.Kernel;
-import org.jboss.kernel.spi.dependency.KernelController;
-import org.jboss.profileservice.AbstractProfileService;
-import org.jboss.profileservice.ManagementDomain;
-import org.jboss.profileservice.ProfileDeployerPluginRegistry;
-import org.jboss.profileservice.dependency.LocalProfileServiceDomain;
 import org.jboss.profileservice.domain.AbstractDomainMetaData;
-import org.jboss.profileservice.domain.ManagementDomainMetaData;
-import org.jboss.profileservice.domain.ServerMetaData;
-import org.jboss.profileservice.spi.Profile;
-import org.jboss.profileservice.spi.ProfileFactory;
+import org.jboss.profileservice.domain.spi.DomainFeatureNode;
 import org.jboss.profileservice.spi.ProfileService;
-import org.jboss.profileservice.spi.metadata.ProfileMetaData;
 
 
+
 /**
  * The abstract profile service bootstrap.
  * 
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
  */
-public abstract class AbstractProfileServiceBootstrap
+public abstract class AbstractProfileServiceBootstrap extends AbstractProfileServiceInitializer
 {
-   
-   /** The local profile domain bean name. */
-   public static final String LOCALDOMAIN_BEANNAME = "jboss.profileservice:service=LocalProfileServiceDomain";
-   public static final String PROFILESERVICE_BEANNAME = "jboss.profileservice:service=ProfileService";
 
-   protected abstract Kernel getKernel();
-   protected abstract KernelController getController();
-   protected abstract ProfileDeployerPluginRegistry getDeployerRegistry();
-   protected abstract ProfileFactory<ProfileMetaData, Profile> getProfileFactory();
+   /** The jboss kernel. */
+   private final Kernel kernel;
    
-   protected ProfileService createProfileService(AbstractDomainMetaData domainMetaData) throws Throwable
+   /** The profile service. */
+   private ProfileService profileService;
+   
+   public AbstractProfileServiceBootstrap(Kernel kernel)
    {
-      if(domainMetaData == null)
-      {
-         throw new IllegalArgumentException("null domain meta data");
-      }
-      BeanMetaData localDomain = createLocalDomain(domainMetaData);
-      if(localDomain == null)
-      {
-         throw new IllegalStateException("failed to create local domain");
-      }
-      //
-
-      BeanMetaData bmd = createProfileService();
-      ControllerContext ps = getController().install(bmd);
-
-      return (ProfileService) ps.getTarget();
+      super(kernel);
+      this.kernel = kernel;
    }
-
-   protected BeanMetaData createLocalDomain(AbstractDomainMetaData domainMetaData) throws Throwable
+   
+   protected Kernel getKernel()
    {
-      ManagementDomainMetaData domain = domainMetaData.getDomain();
-      if(domain == null)
-      {
-         throw new IllegalArgumentException("null domain meta data");
-      }
-      // Get the domain name
-      String domainName = domain.getDomainName();
-      if(domainName == null)
-      {
-         throw new IllegalArgumentException("null domain name");
-      }
-      domainName = domainName.trim();
-      if(domainName.length() == 0)
-      {
-         throw new IllegalArgumentException("empty domain name");
-      }
-      
-      ServerMetaData serverMetaData = domainMetaData.getServer();
-      if(serverMetaData == null)
-      {
-         throw new IllegalArgumentException("null server meta data");
-      }
-      // Get the server name
-      String serverName = serverMetaData.getName();
-      if(serverName == null)
-      {
-         throw new IllegalArgumentException("null server name");
-      }
-      serverName = serverName.trim();
-      if(serverName.length() == 0)
-      {
-         throw new IllegalArgumentException("empty server name");
-      }
-      // The management domain
-      ManagementDomain mgtDomain = new ManagementDomain(domainName);
-      
-      BeanMetaData bmd = createLocalProfileServiceDomain(mgtDomain, serverName);
-      getController().install(bmd);
-      return bmd;
+      return this.kernel;
    }
    
-   protected BeanMetaData createLocalProfileServiceDomain(ManagementDomain mgtDomain, String serverName)
+   protected ProfileService createProfileService(AbstractDomainMetaData domainMetaData) throws Throwable
    {
-      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(
-            LOCALDOMAIN_BEANNAME, LocalProfileServiceDomain.class.getName());
-      builder.addConstructorParameter(ManagementDomain.class.getName(), mgtDomain);
-      builder.addConstructorParameter(String.class.getName(), serverName);
-      // Inject the DeployersRegistry and profileFactory
-      builder.addPropertyMetaData("profileDeployers", getDeployerRegistry());
-      builder.addPropertyMetaData("profileFactory", getProfileFactory());
-      return builder.getBeanMetaData();
+      super.initialize(domainMetaData);
+      ControllerContext context = kernel.getController().getContext(ProfileServiceConstants.PROFILESERVICE_NAME, ControllerState.INSTALLED);
+      return ProfileService.class.cast(context.getTarget());
    }
    
-   protected BeanMetaData createProfileService()
+   protected void start(AbstractDomainMetaData domainMetaData) throws Throwable
    {
-      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(PROFILESERVICE_BEANNAME, AbstractProfileService.class.getName());
-      builder.addConstructorParameter(Kernel.class.getName(), getKernel());
-      builder.addPropertyMetaData("domain", builder.createInject(LOCALDOMAIN_BEANNAME));
-      return builder.getBeanMetaData();
+      this.profileService = createProfileService(domainMetaData);
+      Collection<DomainFeatureNode> features = domainMetaData.getFeatures();
+      if(features != null && features.isEmpty() == false)
+      {
+         for(DomainFeatureNode node : domainMetaData.getFeatures())
+         {
+
+         }
+      }
    }
    
 }

Added: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/bootstrap/AbstractProfileServiceInitializer.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/bootstrap/AbstractProfileServiceInitializer.java	                        (rev 0)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/bootstrap/AbstractProfileServiceInitializer.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -0,0 +1,141 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This 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.1 of
+* the License, or (at your option) any later version.
+*
+* This software 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 software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.profileservice.bootstrap;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
+import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
+import org.jboss.kernel.plugins.deployment.BasicKernelDeployer;
+import org.jboss.profileservice.AbstractProfileService;
+import org.jboss.profileservice.ManagementDomain;
+import org.jboss.profileservice.ProfileDeployerPluginRegistry;
+import org.jboss.profileservice.dependency.LocalProfileServiceDomain;
+import org.jboss.profileservice.domain.AbstractDomainMetaData;
+import org.jboss.profileservice.domain.ManagementDomainMetaData;
+import org.jboss.profileservice.domain.ServerMetaData;
+import org.jboss.profileservice.spi.Profile;
+import org.jboss.profileservice.spi.ProfileFactory;
+import org.jboss.profileservice.spi.metadata.ProfileMetaData;
+
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+abstract class AbstractProfileServiceInitializer
+{
+
+   /** The kernel controller. */
+   private BasicKernelDeployer deployer;
+   
+   protected abstract Kernel getKernel();
+   protected abstract ProfileDeployerPluginRegistry getDeployerRegistry();
+   protected abstract ProfileFactory<ProfileMetaData, Profile> getProfileFactory();
+   
+   public AbstractProfileServiceInitializer(Kernel kernel)
+   {
+      deployer = new BasicKernelDeployer(kernel);
+   }
+   
+   public void initialize(AbstractDomainMetaData domainMetaData) throws Throwable
+   {
+      AbstractKernelDeployment deployment = new AbstractKernelDeployment();
+      deployment.setBeanFactories(createBeanFactories(domainMetaData));
+      deployer.deploy(deployment);
+      deployer.validate(deployment);
+   }
+   
+   protected List<BeanMetaDataFactory> createBeanFactories(AbstractDomainMetaData domainMetaData)
+   {
+      List<BeanMetaDataFactory> factories = new ArrayList<BeanMetaDataFactory>();
+      factories.add(createLocalDomain(domainMetaData));
+      factories.add(createProfileService());
+      return factories;
+   }
+
+   protected BeanMetaDataFactory createLocalDomain(AbstractDomainMetaData domainMetaData)
+   {
+      ManagementDomainMetaData domain = domainMetaData.getDomain();
+      if(domain == null)
+      {
+         throw new IllegalArgumentException("null domain meta data");
+      }
+      // Get the domain name
+      String domainName = domain.getDomainName();
+      if(domainName == null)
+      {
+         throw new IllegalArgumentException("null domain name");
+      }
+      domainName = domainName.trim();
+      if(domainName.length() == 0)
+      {
+         throw new IllegalArgumentException("empty domain name");
+      }
+      
+      ServerMetaData serverMetaData = domainMetaData.getServer();
+      if(serverMetaData == null)
+      {
+         throw new IllegalArgumentException("null server meta data");
+      }
+      // Get the server name
+      String serverName = serverMetaData.getName();
+      if(serverName == null)
+      {
+         throw new IllegalArgumentException("null server name");
+      }
+      serverName = serverName.trim();
+      if(serverName.length() == 0)
+      {
+         throw new IllegalArgumentException("empty server name");
+      }
+      // The management domain
+      ManagementDomain mgtDomain = new ManagementDomain(domainName);
+      return createLocalProfileServiceDomain(mgtDomain, serverName);
+   }
+   
+   protected BeanMetaDataFactory createLocalProfileServiceDomain(ManagementDomain mgtDomain, String serverName)
+   {
+      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(
+            ProfileServiceConstants.LOCALDOMAIN_NAME, LocalProfileServiceDomain.class.getName());
+      builder.addConstructorParameter(ManagementDomain.class.getName(), mgtDomain);
+      builder.addConstructorParameter(String.class.getName(), serverName);
+      // Inject the DeployersRegistry and profileFactory
+      builder.addPropertyMetaData("profileDeployers", getDeployerRegistry());
+      builder.addPropertyMetaData("profileFactory", getProfileFactory());
+      return builder.getBeanMetaDataFactory();
+   }
+   
+   protected BeanMetaDataFactory createProfileService()
+   {
+      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(ProfileServiceConstants.PROFILESERVICE_NAME,
+               AbstractProfileService.class.getName());
+      builder.addConstructorParameter(Kernel.class.getName(), getKernel());
+      builder.addPropertyMetaData("domain", builder.createInject(ProfileServiceConstants.LOCALDOMAIN_NAME));
+      return builder.getBeanMetaDataFactory();
+   }
+   
+}
+

Added: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/bootstrap/ProfileServiceConstants.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/bootstrap/ProfileServiceConstants.java	                        (rev 0)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/bootstrap/ProfileServiceConstants.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This 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.1 of
+* the License, or (at your option) any later version.
+*
+* This software 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 software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.profileservice.bootstrap;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public interface ProfileServiceConstants
+{
+   
+   /** The profile service name. */
+   String PROFILESERVICE_NAME = "jboss.profileservice:service=ProfileService";
+
+   /** The local profile domain bean name. */
+   String LOCALDOMAIN_NAME = "jboss.profileservice:service=LocalProfileServiceDomain";
+   
+   
+}
+

Added: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/bootstrap/ProfileServiceDomainBootstrap.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/bootstrap/ProfileServiceDomainBootstrap.java	                        (rev 0)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/bootstrap/ProfileServiceDomainBootstrap.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -0,0 +1,70 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This 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.1 of
+* the License, or (at your option) any later version.
+*
+* This software 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 software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.profileservice.bootstrap;
+
+import org.jboss.kernel.Kernel;
+import org.jboss.profileservice.ProfileDeployerPluginRegistry;
+import org.jboss.profileservice.domain.spi.DomainMetaDataRepository;
+import org.jboss.profileservice.spi.Profile;
+import org.jboss.profileservice.spi.ProfileFactory;
+import org.jboss.profileservice.spi.metadata.ProfileMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class ProfileServiceDomainBootstrap extends AbstractProfileServiceBootstrap
+{
+
+   private ProfileDeployerPluginRegistry registry;
+   private ProfileFactory<ProfileMetaData, Profile> profileFactory;
+   private DomainMetaDataRepository domainMetaDataRepository;
+   
+   public ProfileServiceDomainBootstrap(Kernel kernel)
+   {
+      super(kernel);
+   }
+
+   @Override
+   public ProfileDeployerPluginRegistry getDeployerRegistry()
+   {
+      return this.registry;
+   }
+   
+   public void setDeployerRegistry(ProfileDeployerPluginRegistry registry)
+   {
+      this.registry = registry;
+   }
+
+   @Override
+   public ProfileFactory<ProfileMetaData, Profile> getProfileFactory()
+   {
+      return this.profileFactory;
+   }
+
+   public void setProfileFactory(ProfileFactory<ProfileMetaData, Profile> profileFactory)
+   {
+      this.profileFactory = profileFactory;
+   }
+
+}
+

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/dependency/LocalProfileServiceDomain.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/dependency/LocalProfileServiceDomain.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/dependency/LocalProfileServiceDomain.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -29,8 +29,10 @@
 
 import org.jboss.logging.Logger;
 import org.jboss.profileservice.ManagementDomain;
+import org.jboss.profileservice.ProfileDeployerPlugin;
 import org.jboss.profileservice.ProfileDeployerPluginRegistry;
 import org.jboss.profileservice.spi.Profile;
+import org.jboss.profileservice.spi.ProfileDeployment;
 import org.jboss.profileservice.spi.ProfileFactory;
 import org.jboss.profileservice.spi.ProfileKey;
 import org.jboss.profileservice.spi.dependency.ProfileCapability;
@@ -214,16 +216,28 @@
       return null;
    }
    
-   protected void addDeploymentToProfile(String deploymentName, ProfileKey key)
+   public void deploy(Profile profile) throws Exception
    {
-      this.deploymentsToProfile.put(deploymentName, key.getName());
+      ProfileKey key = profile.getKey();
+      ProfileDependencyContext ctx = getProfile(key);
+      Collection<ProfileDeployment> deployments = profile.getDeployments();
+      if(deployments != null && deployments.isEmpty() == false)
+      {
+         ProfileDeployerPlugin deployer = getProfileDeployers().getDeployer(ctx.getProfileMetaData());
+         if(deployer == null)
+         {
+            throw new IllegalStateException("no registered deployer for " + profile);
+         }
+         for(ProfileDeployment deployment : deployments)
+         {
+            deploymentsToProfile.put(deployment.getName(), key.getName());
+            deployer.addDeployment(deployment);
+         }
+         deployer.process();
+         // TODO checkComplete
+      }
    }
    
-   protected String removeDeploymentToProfile(String deploymentName)
-   {
-      return this.deploymentsToProfile.remove(deploymentName);
-   }
-   
    protected String domainName()
    {
       final String domainName = domain.getName();

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/hotdeploy/AbstractHDScannerFactory.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/hotdeploy/AbstractHDScannerFactory.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/hotdeploy/AbstractHDScannerFactory.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -41,7 +41,7 @@
 {
    
    /** The logger. */
-   private static final Logger log = Logger.getLogger(HDScannerFactory.class);
+   protected static final Logger log = Logger.getLogger(HDScannerFactory.class);
    
    /** The active scans. */
    private Map<ProfileKey, ScannerWrapper> activeScans = new ConcurrentHashMap<ProfileKey, ScannerWrapper>(); 
@@ -51,11 +51,11 @@
     * 
     * @param <T> the expected type
     * @param scanner the hd scanner runnable
-    * @param interval the schedule interval
+    * @param scanPeriod the schedule interval
     * @param timeUnit the schedule time unit
     * @return the scheduled future
     */
-   abstract <T extends Runnable> ScheduledFuture<T> schedule(T scanner, int interval, TimeUnit timeUnit);
+   abstract <T extends Runnable> ScheduledFuture<Void> schedule(T scanner, int scanPeriod, TimeUnit timeUnit);
    
    /**
     * {@inheritDoc}
@@ -77,7 +77,7 @@
          throw new IllegalArgumentException("scanner already registered for profile " + key);
       }
       HDScanner scanner = new HDScanner(profile, null, configuration);
-      ScheduledFuture<HDScanner> future = schedule(scanner, scanner.getInterval(), scanner.getTimeUnit());      
+      ScheduledFuture<Void> future = schedule(scanner, scanner.getScanPeriod(), scanner.getTimeUnit());      
       return addScanner(key, scanner, future);
    }
 
@@ -90,6 +90,13 @@
       return unregisterScanner(key, false);
    }
    
+   /**
+    * Internally unregister a scanner.
+    * 
+    * @param key the profile key
+    * @param mayInterruptIfRunning interrupt if running
+    * @return the scanner
+    */
    protected Scanner unregisterScanner(ProfileKey key, boolean mayInterruptIfRunning)
    {
       ScannerWrapper wrapper = this.activeScans.remove(key);
@@ -100,14 +107,25 @@
       return wrapper;      
    }
    
+   /**
+    * Register a scanner and wrap it.
+    * 
+    * @param key the associated profile key
+    * @param scanner the scanner
+    * @param activeScan the schedule future
+    * @return the scanner wrapper
+    */
    protected Scanner addScanner(ProfileKey key, HDScanner scanner,
-         ScheduledFuture<HDScanner> activeScan)
+         ScheduledFuture<Void> activeScan)
    {
       ScannerWrapper wrapper = new ScannerWrapper(scanner, activeScan);
       this.activeScans.put(key, wrapper);
       return wrapper;
    }
    
+   /**
+    * Stop and unregister all still active scanners.
+    */
    public void stop()
    {
       // Actually all scanners should be unregistered
@@ -123,30 +141,33 @@
       /** The actual scanner. */
       private final HDScanner scanner;
       /** The scanner future. */
-      private ScheduledFuture<HDScanner> activeScan;
+      private ScheduledFuture<Void> activeScan;
       
-      public ScannerWrapper(HDScanner scanner, ScheduledFuture<HDScanner> activeScan)
+      public ScannerWrapper(HDScanner scanner, ScheduledFuture<Void> activeScan)
       {
          this.scanner = scanner;
          this.activeScan = activeScan;
       }
       
       @Override
+      public int getScanCount()
+      {
+         return scanner.getScanCount();
+      }
+      
+      @Override
       public synchronized void resume()
       {
          if(activeScan == null)
          {
-            activeScan = schedule(scanner, scanner.getInterval(), scanner.getTimeUnit());
+            activeScan = schedule(scanner, scanner.getScanPeriod(), scanner.getTimeUnit());
          }
       }
 
       @Override
       public synchronized void scan() throws Exception
       {
-         if(activeScan != null )
-         {
-            activeScan.get().scan();
-         }
+         scanner.scan();
       }
 
       @Override

Added: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/hotdeploy/DefaultHDScannerFactory.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/hotdeploy/DefaultHDScannerFactory.java	                        (rev 0)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/hotdeploy/DefaultHDScannerFactory.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -0,0 +1,153 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This 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.1 of
+* the License, or (at your option) any later version.
+*
+* This software 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 software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.profileservice.hotdeploy;
+
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * The default HDScanner factory.
+ * 
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class DefaultHDScannerFactory extends AbstractHDScannerFactory
+{
+
+   /** The executor. */
+   private ScheduledExecutorService scanExecutor;
+   
+   /** Did we create the ScheduledExecutorService */
+   private boolean createdScanExecutor;
+   
+   /** Thread name used when the ScheduledExecutorService is created internally. */
+   private String scanThreadName = "HDScanner";
+   
+   /**
+    * Get the scan Executor.
+    * 
+    * @return Returns the scanExecutor.
+    */
+   public ScheduledExecutorService getScanExecutor()
+   {
+      return scanExecutor;
+   }
+
+   /**
+    * Set the scan executor.
+    * 
+    * @param scanExecutor The scanExecutor to set.
+    */
+   public void setScanExecutor(ScheduledExecutorService scanExecutor)
+   {
+      if(scanExecutor == null)
+      {
+         throw new IllegalArgumentException("null scan executor");
+      }
+      this.scanExecutor = scanExecutor;
+      createdScanExecutor = false;
+   }
+
+   /**
+    * Get the scan thread name.
+    * 
+    * @return the thread name
+    */
+   public String getScanThreadName()
+   {
+      return scanThreadName;
+   }
+
+   /**
+    * Set the scan thread name.
+    * 
+    * @param scanThreadName the thread name
+    * @throws IllegalArgumentException for a null name
+    */
+   public void setScanThreadName(String scanThreadName)
+   {
+      if(scanThreadName == null)
+      {
+         throw new IllegalArgumentException("null thread name.");
+      }
+      this.scanThreadName = scanThreadName;
+   }
+   
+   /**
+    * Start, creates a single thread executor if there
+    * was no executor injected before. 
+    */
+   public void start()
+   {
+      // Default to a single thread executor
+      if (scanExecutor == null)
+      {
+         scanExecutor = Executors.newSingleThreadScheduledExecutor(
+               new ThreadFactory()
+               {
+                  public Thread newThread(Runnable r)
+                  {
+                     return new Thread(r, DefaultHDScannerFactory.this.getScanThreadName());
+                  }
+               }
+         );
+         createdScanExecutor = true;
+      }
+   }
+   
+   @Override
+   public void stop()
+   {
+      super.stop();
+      // Shutdown the scanExecutor
+      if (scanExecutor != null && createdScanExecutor)
+      {
+         try
+         {
+            scanExecutor.shutdownNow();
+         }
+         catch(Exception e)
+         {
+            log.debug("Failed to cleanly shutdown scanExecutor", e);
+         }
+         finally
+         {
+            scanExecutor = null;
+         }
+      }
+   }
+   
+   /**
+    * {@inheritDoc}
+    */
+   @Override
+   @SuppressWarnings("unchecked")
+   <T extends Runnable> ScheduledFuture schedule(T scanner, int scanPeriod, TimeUnit timeUnit)
+   {
+      return scanExecutor.scheduleWithFixedDelay(scanner, scanPeriod, scanPeriod, timeUnit);
+   }
+
+}
+

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/hotdeploy/HDScanner.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/hotdeploy/HDScanner.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/hotdeploy/HDScanner.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -32,6 +32,7 @@
 import org.jboss.profileservice.spi.ModificationInfo;
 import org.jboss.profileservice.spi.MutableProfile;
 import org.jboss.profileservice.spi.ProfileDeployment;
+import org.jboss.profileservice.spi.ProfileKey;
 import org.jboss.profileservice.spi.action.deployment.DeploymentAction;
 
 /**
@@ -45,6 +46,9 @@
 
    /** The logger. */
    private static final Logger log = Logger.getLogger(HDScanner.class);
+
+   /** The number of scans that have been done. */
+   private int scanCount = 0;
    
    /** The mutable profile. */
    private final MutableProfile profile;
@@ -68,18 +72,34 @@
       this.configuration = configuration;
    }
    
+   /**
+    * Get the profile key.
+    * 
+    * @return the profile key
+    */
+   public ProfileKey getKey()
+   {
+      return profile.getKey();
+   }
+   
+   /**
+    * {@inheritDoc}
+    */
    @Override
-   public int getInterval()
+   public int getScanPeriod()
    {
-      return configuration.getInterval();
+      return configuration.getScanPeriod();
    }
    
+   /**
+    * {@inheritDoc}
+    */
    @Override
    public TimeUnit getTimeUnit()
    {
       return configuration.getTimeUnit();
    }
-   
+
    @Override
    public void run()
    {
@@ -91,8 +111,35 @@
       {
          log.warn("Scan failed", e);
       }
+      finally
+      {
+         incScanCount();
+      }
    }
    
+   /**
+    * Get the scan count.
+    * 
+    * @return the scan count
+    */
+   protected synchronized int getScanCount()
+   {
+      return scanCount;
+   }
+
+   /**
+    * Reset the scan count.
+    */
+   protected synchronized void resetScanCount()
+   {
+      this.scanCount = 0;
+   }
+   
+   /**
+    * Scan.
+    * 
+    * @throws Exception
+    */
    protected synchronized void scan() throws Exception
    {
       boolean trace = log.isTraceEnabled();
@@ -149,5 +196,14 @@
          log.trace("End deployment scan: " + profile.getKey());
       }
    }
+   
+   /**
+    * Inc the scanCount and to a notifyAll.
+    */
+   protected synchronized void incScanCount()
+   {
+      scanCount++;
+      notifyAll();
+   }
 }
 

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/hotdeploy/HDScannerFactory.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/hotdeploy/HDScannerFactory.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/hotdeploy/HDScannerFactory.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -51,11 +51,11 @@
    public interface ScannerConfiguration
    {
       /**
-       * Get the interval
+       * Get the scan period.
        * 
-       * @return the interval
+       * @return the scan period
        */
-      int getInterval();
+      int getScanPeriod();
       
       /**
        * Get the time unit

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/hotdeploy/Scanner.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/hotdeploy/Scanner.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/hotdeploy/Scanner.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -21,21 +21,37 @@
  */
 package org.jboss.profileservice.hotdeploy;
 
+import org.jboss.managed.api.annotation.ManagementOperation;
+import org.jboss.managed.api.annotation.ManagementProperty;
+
 /**
- * Simple scanner interface.
+ * The scanner interface.
  *
  * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  */
+// TODO we need to merge a scanner into a Profile MO 
+// @ManagementObject(componentType = @ManagementComponent(type="Profile", subtype = "HDScanner"))
 public interface Scanner
 {
    /**
+    * Get the scan count.
+    * 
+    * @return the scan count
+    */
+   @ManagementProperty(name = "scan-count", readOnly = true)
+   int getScanCount();
+   
+   /**
     * Suspend scanning.
     */
+   @ManagementOperation
    void suspend();
 
    /**
     * Resume scanning.
     */
+   @ManagementOperation
    void resume();
 
    /**
@@ -43,5 +59,6 @@
     *
     * @throws Exception for any error
     */
+   @ManagementOperation
    void scan() throws Exception;
 }
\ No newline at end of file

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/ImplicitProfileRequirement.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/ImplicitProfileRequirement.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/ImplicitProfileRequirement.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -21,9 +21,9 @@
  */ 
 package org.jboss.profileservice.metadata;
 
+import org.jboss.profileservice.metadata.helpers.AbstractSubProfileKeyMetaData;
 import org.jboss.profileservice.spi.ProfileKey;
 import org.jboss.profileservice.spi.metadata.ProfileKeyMetaData;
-import org.jboss.profileservice.spi.metadata.helpers.AbstractSubProfileKeyMetaData;
 
 /**
  * A implicit profile requirement, used by the parsing layer to set a

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/ProfileMetaDataFactory.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/ProfileMetaDataFactory.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/ProfileMetaDataFactory.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -36,7 +36,8 @@
 import org.jboss.xb.binding.JBossXBException;
 import org.jboss.xb.binding.Unmarshaller;
 import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
+import org.jboss.xb.binding.resolver.MutableSchemaResolver;
+import org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory;
 
 /**
  * Basic profile meta data factory.
@@ -56,7 +57,7 @@
    private static final VirtualFileFilter filter = new ProfilesFilter();
    
    /** The schema resolver. */
-   private static final DefaultSchemaResolver resolver = new DefaultSchemaResolver();
+   private static final MutableSchemaResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
 
    /** The parsed profiles. */
    private final Map<String, ProfileMetaData> profiles = new HashMap<String, ProfileMetaData>();
@@ -66,7 +67,7 @@
    
    static
    {
-      resolver.addClassBinding("urn:jboss:profileservice:profiles:1.0", ProfilesMetaData.class);
+      resolver.mapURIToClass("urn:jboss:profileservice:profiles:1.0", ProfilesMetaData.class);
    }
    
    public static ProfileMetaDataFactory getInstance()
@@ -89,11 +90,11 @@
       {
          if(clazz == null)
          {
-            resolver.removeClassBinding(nsUri);
+            resolver.removeLocationToClassMapping(nsUri);
          }
          else
          {
-            resolver.addClassBinding(nsUri, clazz);
+            resolver.mapLocationToClass(nsUri, clazz);
          }
       }
    }

Copied: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/helpers (from rev 97598, projects/profileservice/trunk/spi/src/main/java/org/jboss/profileservice/spi/metadata/helpers)

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/helpers/AbstractProfileKeyCapability.java
===================================================================
--- projects/profileservice/trunk/spi/src/main/java/org/jboss/profileservice/spi/metadata/helpers/AbstractProfileKeyCapability.java	2009-12-09 07:20:24 UTC (rev 97598)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/helpers/AbstractProfileKeyCapability.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -19,7 +19,7 @@
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */ 
-package org.jboss.profileservice.spi.metadata.helpers;
+package org.jboss.profileservice.metadata.helpers;
 
 import org.jboss.profileservice.spi.dependency.ProfileCapability;
 import org.jboss.profileservice.spi.dependency.ProfileRequirement;

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/helpers/AbstractProfileKeyMetaData.java
===================================================================
--- projects/profileservice/trunk/spi/src/main/java/org/jboss/profileservice/spi/metadata/helpers/AbstractProfileKeyMetaData.java	2009-12-09 07:20:24 UTC (rev 97598)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/helpers/AbstractProfileKeyMetaData.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -19,7 +19,7 @@
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */ 
-package org.jboss.profileservice.spi.metadata.helpers;
+package org.jboss.profileservice.metadata.helpers;
 
 import org.jboss.profileservice.spi.ProfileKey;
 import org.jboss.profileservice.spi.metadata.ProfileKeyMetaData;

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/helpers/AbstractProfileMetaData.java
===================================================================
--- projects/profileservice/trunk/spi/src/main/java/org/jboss/profileservice/spi/metadata/helpers/AbstractProfileMetaData.java	2009-12-09 07:20:24 UTC (rev 97598)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/helpers/AbstractProfileMetaData.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -19,7 +19,7 @@
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */ 
-package org.jboss.profileservice.spi.metadata.helpers;
+package org.jboss.profileservice.metadata.helpers;
 
 import java.util.List;
 

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/helpers/AbstractSubProfileKeyMetaData.java
===================================================================
--- projects/profileservice/trunk/spi/src/main/java/org/jboss/profileservice/spi/metadata/helpers/AbstractSubProfileKeyMetaData.java	2009-12-09 07:20:24 UTC (rev 97598)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/metadata/helpers/AbstractSubProfileKeyMetaData.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -19,7 +19,7 @@
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */ 
-package org.jboss.profileservice.spi.metadata.helpers;
+package org.jboss.profileservice.metadata.helpers;
 
 import org.jboss.profileservice.spi.ProfileKey;
 import org.jboss.profileservice.spi.dependency.ProfileRequirement;

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/BasicProfileFactory.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/BasicProfileFactory.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/BasicProfileFactory.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -24,7 +24,7 @@
 import java.util.Collection;
 
 import org.jboss.profileservice.profile.metadata.BasicProfileMetaData;
-import org.jboss.profileservice.profile.metadata.FileRepositorySourceMetaData;
+import org.jboss.profileservice.profile.metadata.FileRepositorySourceConfiguration;
 import org.jboss.profileservice.repository.virtual.AbstractVirtualProfileFactory;
 import org.jboss.profileservice.repository.virtual.VirtualDeploymentProfile;
 import org.jboss.profileservice.spi.ProfileFactory;
@@ -66,7 +66,7 @@
       {
          throw new IllegalArgumentException("null profile meta data");
       }
-      FileRepositorySourceMetaData source = metaData.getSource();
+      FileRepositorySourceConfiguration source = metaData.getSource();
       Collection<ProfileDeploymentMetaData> virtual = metaData.getDeployments(); 
       return new VirtualDeploymentProfile(key, virtual, createRepository(source)); 
    }

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/bootstrap/BootstrapProfileFactory.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/bootstrap/BootstrapProfileFactory.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/bootstrap/BootstrapProfileFactory.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -23,7 +23,7 @@
 
 import java.util.Collection;
 
-import org.jboss.profileservice.profile.metadata.FileRepositorySourceMetaData;
+import org.jboss.profileservice.profile.metadata.FileRepositorySourceConfiguration;
 import org.jboss.profileservice.repository.virtual.AbstractVirtualProfileFactory;
 import org.jboss.profileservice.repository.virtual.VirtualDeploymentProfile;
 import org.jboss.profileservice.spi.ProfileFactory;
@@ -60,7 +60,7 @@
       {
          throw new IllegalArgumentException("null profile meta data");
       }
-      FileRepositorySourceMetaData source = metaData.getSource();
+      FileRepositorySourceConfiguration source = metaData.getSource();
       Collection<ProfileDeploymentMetaData> virtual = metaData.getDeployments(); 
       return new VirtualDeploymentProfile(key, virtual, createRepository(source)); 
    }

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/bootstrap/BootstrapProfileMetaData.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/bootstrap/BootstrapProfileMetaData.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/bootstrap/BootstrapProfileMetaData.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -33,15 +33,15 @@
 
 import org.jboss.profileservice.domain.spi.DomainFeatureNode;
 import org.jboss.profileservice.domain.spi.DomainFeatureVisitor;
+import org.jboss.profileservice.metadata.helpers.AbstractProfileMetaData;
 import org.jboss.profileservice.profile.metadata.BasicProfileDeploymentMetaData;
 import org.jboss.profileservice.profile.metadata.BasicSubProfileMetaData;
 import org.jboss.profileservice.profile.metadata.CommonProfileNameSpaces;
-import org.jboss.profileservice.profile.metadata.FileRepositorySourceMetaData;
-import org.jboss.profileservice.profile.metadata.NamespaceFeatureCapability;
+import org.jboss.profileservice.profile.metadata.FileRepositorySourceConfiguration;
+import org.jboss.profileservice.profile.metadata.FeatureCapability;
 import org.jboss.profileservice.spi.metadata.ProfileDeploymentMetaData;
 import org.jboss.profileservice.spi.metadata.ProfileMetaDataVisitor;
 import org.jboss.profileservice.spi.metadata.ProfileMetaDataVisitorNode;
-import org.jboss.profileservice.spi.metadata.helpers.AbstractProfileMetaData;
 import org.jboss.xb.annotations.JBossXmlSchema;
 
 /**
@@ -58,7 +58,7 @@
 {
    
    /** The profile source. */
-   private FileRepositorySourceMetaData source;
+   private FileRepositorySourceConfiguration source;
    
    /** The deployments. */
    private List<ProfileDeploymentMetaData> deployments;
@@ -107,7 +107,7 @@
    @Override
    @XmlElements({
       @XmlElement(name = "requires", type = BasicSubProfileMetaData.class),
-      @XmlElement(name = "management", type = NamespaceFeatureCapability.class)
+      @XmlElement(name = "management", type = FeatureCapability.class)
    })
    public List<ProfileMetaDataVisitorNode> getFeatures()
    {
@@ -120,13 +120,13 @@
       this.deployments = deployments;
    }
 
-   @XmlElement(name = "file-repository", type = FileRepositorySourceMetaData.class)
-   public FileRepositorySourceMetaData getSource()
+   @XmlElement(name = "file-repository", type = FileRepositorySourceConfiguration.class)
+   public FileRepositorySourceConfiguration getSource()
    {
       return this.source;
    }
    
-   public void setSource(FileRepositorySourceMetaData source)
+   public void setSource(FileRepositorySourceConfiguration source)
    {
       this.source = source;
    }

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/BasicProfileMetaData.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/BasicProfileMetaData.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/BasicProfileMetaData.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -33,11 +33,11 @@
 
 import org.jboss.profileservice.domain.spi.DomainFeatureNode;
 import org.jboss.profileservice.domain.spi.DomainFeatureVisitor;
+import org.jboss.profileservice.metadata.helpers.AbstractProfileMetaData;
 import org.jboss.profileservice.spi.metadata.ProfileDeploymentMetaData;
 import org.jboss.profileservice.spi.metadata.ProfileMetaData;
 import org.jboss.profileservice.spi.metadata.ProfileMetaDataVisitor;
 import org.jboss.profileservice.spi.metadata.ProfileMetaDataVisitorNode;
-import org.jboss.profileservice.spi.metadata.helpers.AbstractProfileMetaData;
 import org.jboss.xb.annotations.JBossXmlSchema;
 
 /**
@@ -56,13 +56,13 @@
 {
 
    /** Requirement on the bootstrap. */
-   private static NamespaceFeatureRequirement BOOTSTRAP = new NamespaceFeatureRequirement(CommonProfileNameSpaces.BOOTSTRAP_PROFILE_NAMESPACE);
+   private static FeatureRequirement BOOTSTRAP = new FeatureRequirement(CommonProfileNameSpaces.BOOTSTRAP_PROFILE_NAMESPACE);
    
    /** The aliases. */
    private List<String> aliases;
    
    /** The profile sources. */
-   private FileRepositorySourceMetaData source;
+   private FileRepositorySourceConfiguration source;
    
    /** The deployments. */
    private List<ProfileDeploymentMetaData> deployments;
@@ -127,7 +127,7 @@
    @Override
    @XmlElements({
       @XmlElement(name = "requires", type = BasicSubProfileMetaData.class),
-      @XmlElement(name = "management", type = NamespaceFeatureCapability.class)
+      @XmlElement(name = "management", type = FeatureCapability.class)
    })
    public List<ProfileMetaDataVisitorNode> getFeatures()
    {
@@ -145,13 +145,13 @@
    }
 
    @Override
-   @XmlElement(name = "file-repository", type = FileRepositorySourceMetaData.class)
-   public FileRepositorySourceMetaData getSource()
+   @XmlElement(name = "file-repository", type = FileRepositorySourceConfiguration.class)
+   public FileRepositorySourceConfiguration getSource()
    {
       return this.source;
    }
    
-   public void setSource(FileRepositorySourceMetaData source)
+   public void setSource(FileRepositorySourceConfiguration source)
    {
       this.source = source;
    }
@@ -159,6 +159,7 @@
    public void visit(ProfileMetaDataVisitor visitor)
    {
       super.visit(visitor);
+      visitor.addRequirement(BOOTSTRAP);
       if(aliases != null && aliases.isEmpty() == false)
       {
          for(String alias : aliases)
@@ -174,7 +175,6 @@
             visitor.visit(deployment);
          }
       }
-      visitor.addRequirement(BOOTSTRAP);
    }
    
    @Override

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/BasicSubProfileMetaData.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/BasicSubProfileMetaData.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/BasicSubProfileMetaData.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -24,8 +24,8 @@
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlTransient;
 
+import org.jboss.profileservice.metadata.helpers.AbstractSubProfileKeyMetaData;
 import org.jboss.profileservice.spi.ProfileKey;
-import org.jboss.profileservice.spi.metadata.helpers.AbstractSubProfileKeyMetaData;
 
 /**
  * The basic sub profile meta data.

Copied: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/FeatureCapability.java (from rev 97598, projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/NamespaceFeatureCapability.java)
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/FeatureCapability.java	                        (rev 0)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/FeatureCapability.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -0,0 +1,107 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This 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.1 of
+* the License, or (at your option) any later version.
+*
+* This software 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 software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.profileservice.profile.metadata;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+import org.jboss.profileservice.spi.dependency.ProfileCapability;
+import org.jboss.profileservice.spi.dependency.ProfileRequirement;
+import org.jboss.profileservice.spi.metadata.ProfileMetaDataVisitor;
+import org.jboss.profileservice.spi.metadata.ProfileMetaDataVisitorNode;
+
+/**
+ * Management namespace feature capability.
+ * 
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class FeatureCapability implements ProfileCapability, ProfileMetaDataVisitorNode
+{
+
+   /** The namespace. */
+   private String nsUri;
+   
+   public FeatureCapability()
+   {
+      // xml
+   }
+   
+   public FeatureCapability(String nsUri)
+   {
+      if(nsUri == null)
+      {
+         throw new IllegalArgumentException("null namespace");
+      }
+      this.nsUri = nsUri;
+   }
+   
+   @XmlAttribute(name = "namespace", required = true)
+   public String getNsUri()
+   {
+      if(nsUri == null)
+      {
+         throw new IllegalStateException("null namespace value");
+      }
+      return nsUri;
+   }
+   
+   public void setNsUri(String nsUri)
+   {
+      if(nsUri == null)
+      {
+         throw new IllegalArgumentException("null namespace value");
+      }
+      this.nsUri = nsUri;
+   }
+   
+   @Override
+   public boolean resolves(ProfileRequirement requirement)
+   {
+      if(requirement instanceof FeatureRequirement)
+      {
+         String other = ((FeatureRequirement)requirement).getNsUri();
+         return nsUri.equals(other);
+      }
+      return false;
+   }
+
+   @Override
+   public void visit(ProfileMetaDataVisitor visitor)
+   {
+      visitor.addCapability(this);
+   }
+   
+   @Override
+   public int hashCode()
+   {
+      return getNsUri().hashCode();
+   }
+   
+   @Override
+   public String toString()
+   {
+      StringBuffer buffer = new StringBuffer(getClass().getSimpleName());
+      buffer.append("{namespace=").append(nsUri).append("}");
+      return buffer.toString();
+   }
+}
+

Copied: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/FeatureRequirement.java (from rev 97598, projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/NamespaceFeatureRequirement.java)
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/FeatureRequirement.java	                        (rev 0)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/FeatureRequirement.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -0,0 +1,109 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This 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.1 of
+* the License, or (at your option) any later version.
+*
+* This software 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 software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.profileservice.profile.metadata;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+import org.jboss.profileservice.spi.dependency.ProfileRequirement;
+import org.jboss.profileservice.spi.metadata.ProfileMetaDataVisitor;
+import org.jboss.profileservice.spi.metadata.ProfileMetaDataVisitorNode;
+
+
+/**
+ * Management namespace feature requirement.
+ * 
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class FeatureRequirement implements ProfileRequirement, ProfileMetaDataVisitorNode
+{
+
+   /** The namespace. */
+   private String nsUri;
+   
+   public FeatureRequirement()
+   {
+      // xml
+   }
+   
+   public FeatureRequirement(String nsUri)
+   {
+      if(nsUri == null)
+      {
+         throw new IllegalArgumentException("null namespace");
+      }
+      this.nsUri = nsUri;
+   }
+   
+   @XmlAttribute(name = "namespace", required = true)
+   public String getNsUri()
+   {
+      if(nsUri == null)
+      {
+         throw new IllegalStateException("null namespace value");
+      }
+      return nsUri;
+   }
+   
+   public void setNsUri(String nsUri)
+   {
+      if(nsUri == null)
+      {
+         throw new IllegalArgumentException("null namespace value");
+      }
+      this.nsUri = nsUri;
+   }
+
+   @Override
+   public boolean isConsistent(ProfileRequirement other)
+   {
+      return true;
+   }
+
+   @Override
+   public boolean isOptional()
+   {
+      return false;
+   }
+
+   @Override
+   public void visit(ProfileMetaDataVisitor visitor)
+   {
+      visitor.addRequirement(this);
+   }
+   
+   @Override
+   public int hashCode()
+   {
+      return getNsUri().hashCode();
+   }
+   
+   @Override
+   public String toString()
+   {
+      StringBuffer buffer = new StringBuffer(getClass().getSimpleName());
+      buffer.append("{namespace=").append(nsUri).append("}");
+      return buffer.toString();
+   }
+   
+}
+

Copied: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/FileRepositorySourceConfiguration.java (from rev 97598, projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/FileRepositorySourceMetaData.java)
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/FileRepositorySourceConfiguration.java	                        (rev 0)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/FileRepositorySourceConfiguration.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -0,0 +1,65 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This 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.1 of
+* the License, or (at your option) any later version.
+*
+* This software 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 software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.profileservice.profile.metadata;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+import org.jboss.profileservice.repository.artifact.file.FileArtifactId;
+import org.jboss.profileservice.spi.metadata.ProfileSourceMetaData;
+
+/**
+ * Additional file repository configuration for a profile.
+ * 
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class FileRepositorySourceConfiguration implements ProfileSourceMetaData
+{
+
+   /** The sub folder in the file repository. */
+   private String group;
+   
+   @Override
+   public String getType()
+   {
+      return FileArtifactId.TYPE;
+   }
+
+   /**
+    * Get the file repository group, the relative path
+    * to the repository root.
+    * 
+    * @return the group
+    */
+   @XmlAttribute(name = "group")
+   public String getGroup()
+   {
+      return group;
+   }
+   
+   public void setGroup(String group)
+   {
+      this.group = group;
+   }
+   
+}
+

Deleted: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/FileRepositorySourceMetaData.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/FileRepositorySourceMetaData.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/FileRepositorySourceMetaData.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -1,64 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This 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.1 of
-* the License, or (at your option) any later version.
-*
-* This software 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 software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.profileservice.profile.metadata;
-
-import javax.xml.bind.annotation.XmlAttribute;
-
-import org.jboss.profileservice.repository.artifact.file.FileArtifactId;
-import org.jboss.profileservice.spi.metadata.ProfileSourceMetaData;
-
-/**
- * Additional file repository configuration for a profile.
- * 
- * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision$
- */
-public class FileRepositorySourceMetaData implements ProfileSourceMetaData
-{
-
-   /** The sub folder in the file repository. */
-   private String group;
-   
-   @Override
-   public String getType()
-   {
-      return FileArtifactId.TYPE;
-   }
-
-   /**
-    * Get the file repo group.
-    * 
-    * @return the group
-    */
-   @XmlAttribute(name = "group")
-   public String getGroup()
-   {
-      return group;
-   }
-   
-   public void setGroup(String group)
-   {
-      this.group = group;
-   }
-   
-}
-

Deleted: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/NamespaceFeatureCapability.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/NamespaceFeatureCapability.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/NamespaceFeatureCapability.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -1,107 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This 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.1 of
-* the License, or (at your option) any later version.
-*
-* This software 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 software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.profileservice.profile.metadata;
-
-import javax.xml.bind.annotation.XmlAttribute;
-
-import org.jboss.profileservice.spi.dependency.ProfileCapability;
-import org.jboss.profileservice.spi.dependency.ProfileRequirement;
-import org.jboss.profileservice.spi.metadata.ProfileMetaDataVisitor;
-import org.jboss.profileservice.spi.metadata.ProfileMetaDataVisitorNode;
-
-/**
- * Management namespace feature capability.
- * 
- * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision$
- */
-public class NamespaceFeatureCapability implements ProfileCapability, ProfileMetaDataVisitorNode
-{
-
-   /** The namespace. */
-   private String nsUri;
-   
-   public NamespaceFeatureCapability()
-   {
-      // xml
-   }
-   
-   public NamespaceFeatureCapability(String nsUri)
-   {
-      if(nsUri == null)
-      {
-         throw new IllegalArgumentException("null namespace");
-      }
-      this.nsUri = nsUri;
-   }
-   
-   @XmlAttribute(name = "namespace", required = true)
-   public String getNsUri()
-   {
-      if(nsUri == null)
-      {
-         throw new IllegalStateException("null namespace value");
-      }
-      return nsUri;
-   }
-   
-   public void setNsUri(String nsUri)
-   {
-      if(nsUri == null)
-      {
-         throw new IllegalArgumentException("null namespace value");
-      }
-      this.nsUri = nsUri;
-   }
-   
-   @Override
-   public boolean resolves(ProfileRequirement requirement)
-   {
-      if(requirement instanceof NamespaceFeatureRequirement)
-      {
-         String other = ((NamespaceFeatureRequirement)requirement).getNsUri();
-         return nsUri.equals(other);
-      }
-      return false;
-   }
-
-   @Override
-   public void visit(ProfileMetaDataVisitor visitor)
-   {
-      visitor.addCapability(this);
-   }
-   
-   @Override
-   public int hashCode()
-   {
-      return getNsUri().hashCode();
-   }
-   
-   @Override
-   public String toString()
-   {
-      StringBuffer buffer = new StringBuffer(getClass().getSimpleName());
-      buffer.append("{namespace=").append(nsUri).append("}");
-      return buffer.toString();
-   }
-}
-

Deleted: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/NamespaceFeatureRequirement.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/NamespaceFeatureRequirement.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/NamespaceFeatureRequirement.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -1,109 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This 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.1 of
-* the License, or (at your option) any later version.
-*
-* This software 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 software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.profileservice.profile.metadata;
-
-import javax.xml.bind.annotation.XmlAttribute;
-
-import org.jboss.profileservice.spi.dependency.ProfileRequirement;
-import org.jboss.profileservice.spi.metadata.ProfileMetaDataVisitor;
-import org.jboss.profileservice.spi.metadata.ProfileMetaDataVisitorNode;
-
-
-/**
- * Management namespace feature requirement.
- * 
- * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision$
- */
-public class NamespaceFeatureRequirement implements ProfileRequirement, ProfileMetaDataVisitorNode
-{
-
-   /** The namespace. */
-   private String nsUri;
-   
-   public NamespaceFeatureRequirement()
-   {
-      // xml
-   }
-   
-   public NamespaceFeatureRequirement(String nsUri)
-   {
-      if(nsUri == null)
-      {
-         throw new IllegalArgumentException("null namespace");
-      }
-      this.nsUri = nsUri;
-   }
-   
-   @XmlAttribute(name = "namespace", required = true)
-   public String getNsUri()
-   {
-      if(nsUri == null)
-      {
-         throw new IllegalStateException("null namespace value");
-      }
-      return nsUri;
-   }
-   
-   public void setNsUri(String nsUri)
-   {
-      if(nsUri == null)
-      {
-         throw new IllegalArgumentException("null namespace value");
-      }
-      this.nsUri = nsUri;
-   }
-
-   @Override
-   public boolean isConsistent(ProfileRequirement other)
-   {
-      return true;
-   }
-
-   @Override
-   public boolean isOptional()
-   {
-      return false;
-   }
-
-   @Override
-   public void visit(ProfileMetaDataVisitor visitor)
-   {
-      visitor.addRequirement(this);
-   }
-   
-   @Override
-   public int hashCode()
-   {
-      return getNsUri().hashCode();
-   }
-   
-   @Override
-   public String toString()
-   {
-      StringBuffer buffer = new StringBuffer(getClass().getSimpleName());
-      buffer.append("{namespace=").append(nsUri).append("}");
-      return buffer.toString();
-   }
-   
-}
-

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/plugin/ClassPathProfileMetaData.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/plugin/ClassPathProfileMetaData.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/plugin/ClassPathProfileMetaData.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -33,12 +33,12 @@
 
 import org.jboss.profileservice.domain.spi.DomainFeatureNode;
 import org.jboss.profileservice.domain.spi.DomainFeatureVisitor;
+import org.jboss.profileservice.metadata.helpers.AbstractProfileMetaData;
 import org.jboss.profileservice.profile.metadata.CommonProfileNameSpaces;
 import org.jboss.profileservice.repository.artifact.file.FileArtifactId;
 import org.jboss.profileservice.spi.metadata.ProfileDeploymentMetaData;
 import org.jboss.profileservice.spi.metadata.ProfileMetaDataVisitor;
 import org.jboss.profileservice.spi.metadata.ProfileSourceMetaData;
-import org.jboss.profileservice.spi.metadata.helpers.AbstractProfileMetaData;
 import org.jboss.profileservice.spi.repository.ArtifactId;
 import org.jboss.profileservice.spi.virtual.VirtualArtifactMetaData;
 import org.jboss.profileservice.spi.virtual.VirtualDeployment;

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/plugin/EmptyProfileMetaData.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/plugin/EmptyProfileMetaData.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/plugin/EmptyProfileMetaData.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -33,13 +33,13 @@
 
 import org.jboss.profileservice.domain.spi.DomainFeatureNode;
 import org.jboss.profileservice.domain.spi.DomainFeatureVisitor;
+import org.jboss.profileservice.metadata.helpers.AbstractProfileMetaData;
 import org.jboss.profileservice.profile.metadata.BasicSubProfileMetaData;
 import org.jboss.profileservice.profile.metadata.CommonProfileNameSpaces;
 import org.jboss.profileservice.spi.metadata.ProfileDeploymentMetaData;
 import org.jboss.profileservice.spi.metadata.ProfileMetaData;
 import org.jboss.profileservice.spi.metadata.ProfileMetaDataVisitorNode;
 import org.jboss.profileservice.spi.metadata.ProfileSourceMetaData;
-import org.jboss.profileservice.spi.metadata.helpers.AbstractProfileMetaData;
 import org.jboss.xb.annotations.JBossXmlSchema;
 
 /**

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/plugin/FarmingProfileMetaData.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/plugin/FarmingProfileMetaData.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/plugin/FarmingProfileMetaData.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -28,7 +28,7 @@
 import javax.xml.bind.annotation.XmlType;
 
 import org.jboss.profileservice.profile.metadata.CommonProfileNameSpaces;
-import org.jboss.profileservice.profile.metadata.NamespaceFeatureRequirement;
+import org.jboss.profileservice.profile.metadata.FeatureRequirement;
 import org.jboss.profileservice.spi.metadata.ProfileMetaDataVisitor;
 import org.jboss.xb.annotations.JBossXmlSchema;
 
@@ -87,7 +87,7 @@
          visitor.visit(scanPeriod);
       }
       // We require a associated farming namespace
-      visitor.addRequirement(new NamespaceFeatureRequirement(getNameSpace()));
+      visitor.addRequirement(new FeatureRequirement(getNameSpace()));
    }
    
 }

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/plugin/PropertyProfileMetaData.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/plugin/PropertyProfileMetaData.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/plugin/PropertyProfileMetaData.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -33,9 +33,9 @@
 
 import org.jboss.profileservice.domain.spi.DomainFeatureNode;
 import org.jboss.profileservice.domain.spi.DomainFeatureVisitor;
+import org.jboss.profileservice.metadata.helpers.AbstractProfileMetaData;
 import org.jboss.profileservice.profile.metadata.CommonProfileNameSpaces;
 import org.jboss.profileservice.spi.metadata.ProfileDeploymentMetaData;
-import org.jboss.profileservice.spi.metadata.helpers.AbstractProfileMetaData;
 import org.jboss.xb.annotations.JBossXmlSchema;
 
 /**

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/plugin/ScanPeriod.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/plugin/ScanPeriod.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/metadata/plugin/ScanPeriod.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -29,7 +29,7 @@
 import javax.xml.bind.annotation.XmlValue;
 
 import org.jboss.profileservice.hotdeploy.HDScannerFactory.ScannerConfiguration;
-import org.jboss.profileservice.profile.metadata.NamespaceFeatureRequirement;
+import org.jboss.profileservice.profile.metadata.FeatureRequirement;
 import org.jboss.profileservice.spi.metadata.ProfileMetaDataVisitor;
 import org.jboss.profileservice.spi.metadata.ProfileMetaDataVisitorNode;
 
@@ -43,18 +43,18 @@
 {
 
    /** Requires hot deployment scanner. */
-   protected static final NamespaceFeatureRequirement requirement;
+   protected static final FeatureRequirement requirement;
    
    static
    {
-      requirement = new NamespaceFeatureRequirement(HOTDEPLOY_PROFILE_NAMESPACE);
+      requirement = new FeatureRequirement(HOTDEPLOY_PROFILE_NAMESPACE);
    }
    
    /** The interval. */
-   private int interval;
+   private int scanPeriod = 5;
    
    /** The time unit. */
-   private TimeUnit timeUnit;
+   private TimeUnit timeUnit = TimeUnit.SECONDS;
    
    /** Disable hot deployment. */
    private boolean disabled = false;
@@ -71,14 +71,14 @@
    }
    
    @XmlValue
-   public int getInterval()
+   public int getScanPeriod()
    {
-      return interval;
+      return scanPeriod;
    }
    
-   public void setInterval(int interval)
+   public void setScanPeriod(int scanPeriod)
    {
-      this.interval = interval;
+      this.scanPeriod = scanPeriod;
    }
    
    @XmlAttribute(name = "disabled")
@@ -106,7 +106,7 @@
    public String toString()
    {
       StringBuilder builder = new StringBuilder(getClass().getSimpleName());
-      builder.append("{interval=").append(getInterval());
+      builder.append("{interval=").append(getScanPeriod());
       builder.append(", time-unit=").append(getTimeUnit());
       if(isDisabled())
       {

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/repository/artifact/AbstractArtifact.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/repository/artifact/AbstractArtifact.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/repository/artifact/AbstractArtifact.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -26,6 +26,7 @@
 import org.jboss.profileservice.spi.repository.Artifact;
 import org.jboss.profileservice.spi.repository.ArtifactId;
 import org.jboss.profileservice.spi.repository.ArtifactRepository;
+import org.jboss.profileservice.spi.repository.ArtifactRepositoryId;
 import org.jboss.virtual.VirtualFile;
 
 /**
@@ -74,14 +75,14 @@
    }
    
    @Override
-   public ArtifactRepository<T> getRepository()
+   public ArtifactRepositoryId getRepository()
    {
-      return this.repository;
+      return this.repository.getIdentifier();
    }
 
    public VirtualFile getFile() throws IOException
    {
-      return getRepository().getArtifactFile(getIdentifier());
+      return this.repository.getArtifactFile(getIdentifier());
    }
    
 }

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/repository/virtual/AbstractVirtualProfileFactory.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/repository/virtual/AbstractVirtualProfileFactory.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/repository/virtual/AbstractVirtualProfileFactory.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -23,7 +23,7 @@
 
 import java.io.IOException;
 
-import org.jboss.profileservice.profile.metadata.FileRepositorySourceMetaData;
+import org.jboss.profileservice.profile.metadata.FileRepositorySourceConfiguration;
 import org.jboss.profileservice.repository.artifact.AbstractRepositoryId;
 import org.jboss.profileservice.repository.artifact.ArtifactRepositoryManager;
 import org.jboss.profileservice.repository.artifact.file.FileArtifactId;
@@ -77,7 +77,7 @@
       }
    }
 
-   protected VirtualDeploymentRepository createRepository(FileRepositorySourceMetaData source) throws Exception
+   protected VirtualDeploymentRepository createRepository(FileRepositorySourceConfiguration source) throws Exception
    {
       if(source != null && source.getGroup() != null)
       {

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/repository/virtual/VirtualDeploymentProfile.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/repository/virtual/VirtualDeploymentProfile.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/repository/virtual/VirtualDeploymentProfile.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -21,6 +21,7 @@
 */
 package org.jboss.profileservice.repository.virtual;
 
+import java.io.IOException;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
@@ -99,7 +100,7 @@
                ProfileDeployment deployment = createDeployment(virtual);
                this.deployments.put(deployment.getName(), deployment);
             }
-            catch(Exception e)
+            catch(IOException e)
             {
                // FIXME, this is only for testing purpose
                log.error("failed to create deployment " + virtual);

Modified: projects/profileservice/trunk/core/src/test/java/org/jboss/test/profileservice/domain/support/DomainMetaDataRepoSupport.java
===================================================================
--- projects/profileservice/trunk/core/src/test/java/org/jboss/test/profileservice/domain/support/DomainMetaDataRepoSupport.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/test/java/org/jboss/test/profileservice/domain/support/DomainMetaDataRepoSupport.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -36,7 +36,8 @@
 import org.jboss.profileservice.profile.metadata.plugin.PropertyProfileMetaData;
 import org.jboss.xb.binding.Unmarshaller;
 import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
+import org.jboss.xb.binding.resolver.MutableSchemaResolver;
+import org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory;
 
 /**
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
@@ -46,12 +47,12 @@
 {
 
    /** The schema resolver. */
-   private static final DefaultSchemaResolver resolver = new DefaultSchemaResolver();
+   private static final MutableSchemaResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
    
    static
    {
       addSchemaBinding(DomainMetaData.DOMAIN_NAMESPACE, AbstractDomainMetaData.class);
-      // initalize the schema binding     
+      // initialize the schema binding     
       addSchemaBinding(CommonProfileNameSpaces.BOOTSTRAP_PROFILE_NAMESPACE, BootstrapProfileMetaData.class);
       addSchemaBinding(CommonProfileNameSpaces.PROFILE_NAMESPACE, BasicProfileMetaData.class);
       addSchemaBinding(CommonProfileNameSpaces.CLASSPATH_PROFILE_NAMESPACE, ClassPathProfileMetaData.class);
@@ -63,7 +64,7 @@
    
    protected static void addSchemaBinding(String nsUri, Class<?> clazz)
    {
-      resolver.addClassBinding(nsUri, clazz);
+      resolver.mapURIToClass(nsUri, clazz);
    }
    
    private final URL url;

Modified: projects/profileservice/trunk/core/src/test/java/org/jboss/test/profileservice/support/ProfileServiceBootstrap.java
===================================================================
--- projects/profileservice/trunk/core/src/test/java/org/jboss/test/profileservice/support/ProfileServiceBootstrap.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/test/java/org/jboss/test/profileservice/support/ProfileServiceBootstrap.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -22,7 +22,6 @@
 package org.jboss.test.profileservice.support;
 
 import org.jboss.kernel.Kernel;
-import org.jboss.kernel.spi.dependency.KernelController;
 import org.jboss.profileservice.ProfileDeployerPluginRegistry;
 import org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap;
 import org.jboss.profileservice.domain.AbstractDomainMetaData;
@@ -39,29 +38,15 @@
 public class ProfileServiceBootstrap extends AbstractProfileServiceBootstrap
 {
 
-   private Kernel kernel;
    private ProfileDeployerPluginRegistry registry;
    private ProfileFactory<ProfileMetaData, Profile> profileFactory;
    
    public ProfileServiceBootstrap(Kernel kernel)
    {
-      if(kernel == null)
-         throw new IllegalArgumentException("null kernel");
-      this.kernel = kernel;
+      super(kernel);
    }
 
-   protected Kernel getKernel()
-   {
-      return this.kernel;
-   }
-   
    @Override
-   protected KernelController getController()
-   {
-      return this.kernel.getController();
-   }
-
-   @Override
    public ProfileDeployerPluginRegistry getDeployerRegistry()
    {
       return this.registry;

Modified: projects/profileservice/trunk/core/src/test/java/org/jboss/test/profileservice/test/BasicProfileServiceUnitTestCase.java
===================================================================
--- projects/profileservice/trunk/core/src/test/java/org/jboss/test/profileservice/test/BasicProfileServiceUnitTestCase.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/test/java/org/jboss/test/profileservice/test/BasicProfileServiceUnitTestCase.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -25,7 +25,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap;
+import org.jboss.profileservice.bootstrap.ProfileServiceConstants;
 import org.jboss.profileservice.dependency.LocalProfileServiceDomain;
 import org.jboss.profileservice.domain.spi.DomainFeatureNode;
 import org.jboss.profileservice.domain.spi.DomainMetaData;
@@ -66,8 +66,8 @@
       DomainMetaData metaData = support.getDomainMetaData();
       assertNotNull(metaData);
       
-      ProfileService ps = getBean(AbstractProfileServiceBootstrap.PROFILESERVICE_BEANNAME, ProfileService.class);
-      LocalProfileServiceDomain resolver = getBean(AbstractProfileServiceBootstrap.LOCALDOMAIN_BEANNAME, LocalProfileServiceDomain.class);
+      ProfileService ps = getBean(ProfileServiceConstants.PROFILESERVICE_NAME, ProfileService.class);
+      LocalProfileServiceDomain resolver = getBean(ProfileServiceConstants.LOCALDOMAIN_NAME, LocalProfileServiceDomain.class);
       assertNotNull(ps);
       assertNotNull(resolver);
 

Modified: projects/profileservice/trunk/core/src/test/resources/system/profiles/common-profiles.xml
===================================================================
--- projects/profileservice/trunk/core/src/test/resources/system/profiles/common-profiles.xml	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/test/resources/system/profiles/common-profiles.xml	2009-12-15 13:14:50 UTC (rev 97838)
@@ -1,6 +1,6 @@
 <profiles xmlns="urn:jboss:profileservice:profiles:1.0">
 
-	<profile name="jboss:profile=default">
+	<profile name="jboss:profile=common">
 		<file-repository group="deployment" />
 		<deployment name="alias-deployers-jboss-beans.xml" />
 		<deployment name="ear-deployer-jboss-eabs.xml" />

Modified: projects/profileservice/trunk/core/src/test/resources/system/profiles/core-profiles.xml
===================================================================
--- projects/profileservice/trunk/core/src/test/resources/system/profiles/core-profiles.xml	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/core/src/test/resources/system/profiles/core-profiles.xml	2009-12-15 13:14:50 UTC (rev 97838)
@@ -1,5 +1,9 @@
 <profiles xmlns="urn:jboss:profileservice:profiles:1.0">
 
+
+	<!-- 
+		Definition of the minimal jboss runtime.
+	-->
 	<profile name="jboss:profile=minimal">
 		<requires name="jboss:profile=bootstrap" />
 		<requires name="jboss:profile=logging" />

Deleted: projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/package-info.java
===================================================================
--- projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/package-info.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/package-info.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -1,31 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This 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.1 of
- * the License, or (at your option) any later version.
- *
- * This software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
- at XmlSchema(namespace = "urn:jboss:profileservice:domain:1.0", 
-      elementFormDefault = XmlNsForm.QUALIFIED,
-      xmlns = { @XmlNs(namespaceURI = "http://www.w3.org/2001/XMLSchema", prefix = "xs") }
-)
-package org.jboss.profileservice.domain;
-
-import javax.xml.bind.annotation.XmlNs;
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.bind.annotation.XmlSchema;
-

Modified: projects/profileservice/trunk/spi/src/main/java/org/jboss/profileservice/spi/repository/Artifact.java
===================================================================
--- projects/profileservice/trunk/spi/src/main/java/org/jboss/profileservice/spi/repository/Artifact.java	2009-12-15 12:29:39 UTC (rev 97837)
+++ projects/profileservice/trunk/spi/src/main/java/org/jboss/profileservice/spi/repository/Artifact.java	2009-12-15 13:14:50 UTC (rev 97838)
@@ -39,11 +39,11 @@
    long getLastModified();
    
    /**
-    * Get the repository.
+    * Get the repository id.
     * 
-    * @return the repository
+    * @return the repository id.
     */
-   ArtifactRepository<T> getRepository();
+   ArtifactRepositoryId getRepository();
    
 }
 




More information about the jboss-cvs-commits mailing list