[jboss-cvs] JBossAS SVN: r83353 - in projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi: metadata and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jan 23 11:25:15 EST 2009


Author: emuckenhuber
Date: 2009-01-23 11:25:15 -0500 (Fri, 23 Jan 2009)
New Revision: 83353

Added:
   projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileKeyMetaData.java
Removed:
   projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfilesMetaData.java
Modified:
   projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentRepositoryFactory.java
   projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/Profile.java
   projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileService.java
   projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileDeploymentMetaData.java
   projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileMetaData.java
   projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileSourceMetaData.java
   projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/SubProfileMetaData.java
Log:
update profileservice-spi

Modified: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentRepositoryFactory.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentRepositoryFactory.java	2009-01-23 15:06:38 UTC (rev 83352)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentRepositoryFactory.java	2009-01-23 16:25:15 UTC (rev 83353)
@@ -21,7 +21,7 @@
  */
 package org.jboss.profileservice.spi;
 
-import org.jboss.profileservice.spi.metadata.ProfileMetaData;
+import org.jboss.profileservice.spi.metadata.ProfileSourceMetaData;
 
 /**
  * A factory for DeploymentRepository.
@@ -44,10 +44,10 @@
     * Create a DeploymentRepository based on a type.
     * 
     * @param repositoryType the repository type.
-    * @param metaData the profile meta data.
+    * @param metaData the profile source meta data.
     * @return the deploymentRepository.
     * @throws Exception
     */
-   DeploymentRepository createDeploymentRepository(ProfileKey key, ProfileMetaData metaData) throws Exception;
+   DeploymentRepository createDeploymentRepository(ProfileKey key, ProfileSourceMetaData metaData) throws Exception;
    
 }

Modified: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/Profile.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/Profile.java	2009-01-23 15:06:38 UTC (rev 83352)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/Profile.java	2009-01-23 16:25:15 UTC (rev 83353)
@@ -24,7 +24,6 @@
 import java.util.Collection;
 import java.util.Set;
 
-import org.jboss.dependency.spi.DependencyItem;
 import org.jboss.deployers.vfs.spi.client.VFSDeployment;
 import org.jboss.managed.api.ManagedComponent;
 
@@ -63,6 +62,13 @@
    void destroy();
    
    /**
+    * Get the profile dependencies.
+    * 
+    * @return the collection of profile keys.
+    */
+   Collection<ProfileKey> getSubProfiles();
+   
+   /**
     * Get the names of the deployments in the profile
     * @return names of deployments
     */
@@ -150,10 +156,4 @@
     */
    boolean hasDeployment(String name);
    
-   /**
-    * Get the dependencies to other profiles.
-    * 
-    * @return the dependencies.
-    */
-   Collection<DependencyItem> getDependencies();
 }

Modified: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileService.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileService.java	2009-01-23 15:06:38 UTC (rev 83352)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileService.java	2009-01-23 16:25:15 UTC (rev 83353)
@@ -110,13 +110,12 @@
    public void activateProfile(ProfileKey key) throws NoSuchProfileException, Exception;
    
    /**
-    * Release the profile.
+    * Deactivate the profile.
     * 
     * @param key the profile key.
     * @throws NoSuchProfileException if the profile is not active.
     */
-   public void releaseProfile(ProfileKey key) throws NoSuchProfileException;
-   
+   public void deactivateProfile(ProfileKey key) throws NoSuchProfileException;
 
    /**
     * Unregister a profile.

Modified: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileDeploymentMetaData.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileDeploymentMetaData.java	2009-01-23 15:06:38 UTC (rev 83352)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileDeploymentMetaData.java	2009-01-23 16:25:15 UTC (rev 83353)
@@ -21,27 +21,22 @@
  */ 
 package org.jboss.profileservice.spi.metadata;
 
-import javax.xml.bind.annotation.XmlValue;
 
 /**
+ * The meta data for a profile deployment.
+ * 
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
  */
-public class ProfileDeploymentMetaData
+public interface ProfileDeploymentMetaData
 {
-
-   /** The deployment name. */
-   private String name;
    
-   @XmlValue
-   public String getName()
-   {
-      return name;
-   }
+   /**
+    * Get the deployment name.
+    * 
+    * @return
+    */
+   public String getName();
    
-   public void setName(String name)
-   {
-      this.name = name;
-   }
 }
 

Added: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileKeyMetaData.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileKeyMetaData.java	                        (rev 0)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileKeyMetaData.java	2009-01-23 16:25:15 UTC (rev 83353)
@@ -0,0 +1,55 @@
+/*
+ * 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.
+ */ 
+package org.jboss.profileservice.spi.metadata;
+
+/**
+ * The profileKey meta data.
+ * 
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public interface ProfileKeyMetaData
+{
+
+   /**
+    * Get the profileKey domain attribute.
+    * 
+    * @return the domain.
+    */
+   public String getDomain();
+   
+   /**
+    * Get the profileKey server attribute;
+    * 
+    * @return the server.
+    */
+   public String getServer();
+
+   /**
+    * Get the profile name.
+    * 
+    * @return the name.
+    */
+   public String getName();
+   
+}
+

Modified: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileMetaData.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileMetaData.java	2009-01-23 15:06:38 UTC (rev 83352)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileMetaData.java	2009-01-23 16:25:15 UTC (rev 83353)
@@ -23,114 +23,34 @@
 
 import java.util.List;
 
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlTransient;
-
 /**
+ * The meta data making up a profile.
+ * 
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
  */
-public class ProfileMetaData
+public interface ProfileMetaData extends ProfileKeyMetaData
 {
-
-   /** The profile name. */
-   private String name;
    
-   /** The server. */
-   private String server;
-   
-   /** The doamin. */
-   private String domain;
-   
-   /** The profile sources. */
-   private List<ProfileSourceMetaData> sources;
-   
-   /** The sub profiles. */
-   private List<SubProfileMetaData> subprofiles;
-   
-   /** The deployments. */
-   private List<ProfileDeploymentMetaData> deployments;
-   
-   /** TODO The dependencies. */
-   private List<Object> dependencies;
+   /**
+    * Get the ProfileSource.
+    * 
+    * @return the profile source.
+    */
+   public ProfileSourceMetaData getSource();
 
-   @XmlAttribute(name = "name")
-   public String getName()
-   {
-      return name;
-   }
+   /**
+    * Get the sub-profiles.
+    * 
+    * @return the sub-profiles
+    */
+   public List<SubProfileMetaData> getSubprofiles();
 
-   public void setName(String name)
-   {
-      this.name = name;
-   }
+   /**
+    * Get the associated deployments to this profile.
+    * 
+    * @return the deployments
+    */
+   public List<ProfileDeploymentMetaData> getDeployments();
    
-   @XmlAttribute(name = "server")
-   public String getServer()
-   {
-      return server;
-   }
-
-   public void setServer(String server)
-   {
-      this.server = server;
-   }
-
-   @XmlAttribute(name = "domain")
-   public String getDomain()
-   {
-      return domain;
-   }
-
-   public void setDomain(String domain)
-   {
-      this.domain = domain;
-   }
-
-   @XmlElement(name = "source")
-   public List<ProfileSourceMetaData> getSources()
-   {
-      return sources;
-   }
-
-   public void setSources(List<ProfileSourceMetaData> sources)
-   {
-      this.sources = sources;
-   }
-
-   @XmlElement(name = "sub-profile")
-   public List<SubProfileMetaData> getSubprofiles()
-   {
-      return subprofiles;
-   }
-
-   public void setSubprofiles(List<SubProfileMetaData> subprofiles)
-   {
-      this.subprofiles = subprofiles;
-   }
-
-   @XmlElement(name = "deployment")
-   public List<ProfileDeploymentMetaData> getDeployments()
-   {
-      return deployments;
-   }
-   
-   public void setDeployments(List<ProfileDeploymentMetaData> deployments)
-   {
-      this.deployments = deployments;
-   }
-
-   @XmlTransient
-//   @XmlElement(name = "dependency", type = String.class)
-   public List<Object> getDependencies()
-   {
-      return dependencies;
-   }
-   
-   public void setDependencies(List<Object> dependencies)
-   {
-      this.dependencies = dependencies;
-   }
-   
 }

Modified: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileSourceMetaData.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileSourceMetaData.java	2009-01-23 15:06:38 UTC (rev 83352)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileSourceMetaData.java	2009-01-23 16:25:15 UTC (rev 83353)
@@ -21,43 +21,30 @@
  */ 
 package org.jboss.profileservice.spi.metadata;
 
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlValue;
+import java.util.List;
 
 /**
+ * The meta data for a profile source.
+ * 
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
  */
-public class ProfileSourceMetaData
+public interface ProfileSourceMetaData
 {
 
-   /** The source type. */
-   private String type;
-   
-   /** The source. */
-   private String source;
+   /**
+    * Get the profile source type.
+    * 
+    * @return the type.
+    */
+   public String getType();
 
-   @XmlAttribute(name = "type")
-   public String getType()
-   {
-      return type;
-   }
+   /**
+    * Get the sources URIs for this source;
+    * 
+    * @return the sources/
+    */
+   public List<String> getSources();
 
-   public void setType(String type)
-   {
-      this.type = type;
-   }
-
-   @XmlValue
-   public String getSource()
-   {
-      return source;
-   }
-
-   public void setSource(String source)
-   {
-      this.source = source;
-   }
-
 }
 

Deleted: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfilesMetaData.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfilesMetaData.java	2009-01-23 15:06:38 UTC (rev 83352)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfilesMetaData.java	2009-01-23 16:25:15 UTC (rev 83353)
@@ -1,94 +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.
- */ 
-package org.jboss.profileservice.spi.metadata;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
- * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision$
- */
- at XmlRootElement(name = "profiles")
-public class ProfilesMetaData
-{
-   /** The name. */
-   private String name;
-   
-   /** The server. */
-   private String server;
-   
-   /** The doamin. */
-   private String domain;
-   
-   /** The profiles. */
-   private List<ProfileMetaData> profiles;
-   
-   @XmlAttribute(name = "name")
-   public String getName()
-   {
-      return name;
-   }
-   
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-   
-   @XmlAttribute(name = "server")
-   public String getServer()
-   {
-      return server;
-   }
-
-   public void setServer(String server)
-   {
-      this.server = server;
-   }
-
-   @XmlAttribute(name = "domain")
-   public String getDomain()
-   {
-      return domain;
-   }
-
-   public void setDomain(String domain)
-   {
-      this.domain = domain;
-   }
-   
-   @XmlElement(name = "profile")
-   public List<ProfileMetaData> getProfiles()
-   {
-      return profiles;
-   }
-   
-   public void setProfiles(List<ProfileMetaData> profiles)
-   {
-      this.profiles = profiles;
-   }
-   
-}
-

Modified: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/SubProfileMetaData.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/SubProfileMetaData.java	2009-01-23 15:06:38 UTC (rev 83352)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/SubProfileMetaData.java	2009-01-23 16:25:15 UTC (rev 83353)
@@ -21,56 +21,14 @@
  */ 
 package org.jboss.profileservice.spi.metadata;
 
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlValue;
-
 /**
+ * The meta data describing a sub-profile, which is basically a reference
+ * to a different profile.
+ * 
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
  */
-public class SubProfileMetaData
+public interface SubProfileMetaData extends ProfileKeyMetaData
 {
    
-   /** The name. */
-   private String name;
-   
-   /** The server. */
-   private String server;
-   
-   /** The doamin. */
-   private String domain;
-
-   @XmlValue
-   public String getName()
-   {
-      return name;
-   }
-
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-
-   @XmlAttribute(name = "server")
-   public String getServer()
-   {
-      return server;
-   }
-
-   public void setServer(String server)
-   {
-      this.server = server;
-   }
-
-   @XmlAttribute(name = "domain")
-   public String getDomain()
-   {
-      return domain;
-   }
-
-   public void setDomain(String domain)
-   {
-      this.domain = domain;
-   }
-   
 }




More information about the jboss-cvs-commits mailing list