[jboss-cvs] JBossAS SVN: r83735 - 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
Sat Jan 31 20:37:18 EST 2009
Author: emuckenhuber
Date: 2009-01-31 20:37:18 -0500 (Sat, 31 Jan 2009)
New Revision: 83735
Added:
projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileDeployment.java
projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileFactory.java
Modified:
projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/AttachmentStore.java
projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentRepository.java
projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ModificationInfo.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/metadata/ProfileKeyMetaData.java
Log:
update the spi to use a ProfileDeployment instead of VFSDeployment
Modified: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/AttachmentStore.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/AttachmentStore.java 2009-01-31 23:34:16 UTC (rev 83734)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/AttachmentStore.java 2009-02-01 01:37:18 UTC (rev 83735)
@@ -23,9 +23,8 @@
import java.net.URI;
-import org.jboss.deployers.vfs.spi.client.VFSDeployment;
+import org.jboss.deployers.client.spi.Deployment;
import org.jboss.managed.api.ManagedComponent;
-import org.jboss.virtual.VirtualFile;
/**
* The AttachmentStore.
@@ -46,20 +45,20 @@
/**
* Persist the changes of the managed component.
*
- * @param deployment the deployment.
+ * @param deployment the profile deployment.
* @param comp the managed component.
* @throws Exception
*/
- void updateDeployment(VFSDeployment deployment, ManagedComponent comp) throws Exception;
+ void updateDeployment(ProfileDeployment deployment, ManagedComponent comp) throws Exception;
/**
- * Load the deployment with the persisted attachments.
+ * Create the deployment with the persisted attachments.
*
- * @param vfsPath the deployment path.
- * @return the deployment.
+ * @param deployment the profile deployment.
+ * @return the mc deployment.
* @throws Exception
*/
- VFSDeployment loadDeploymentData(VirtualFile vfsPath) throws Exception;
+ Deployment loadDeploymentData(ProfileDeployment deployment) throws Exception;
}
Modified: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentRepository.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentRepository.java 2009-01-31 23:34:16 UTC (rev 83734)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentRepository.java 2009-02-01 01:37:18 UTC (rev 83735)
@@ -28,7 +28,6 @@
import java.util.Collection;
import java.util.Set;
-import org.jboss.deployers.vfs.spi.client.VFSDeployment;
import org.jboss.managed.api.ManagedComponent;
import org.jboss.virtual.VirtualFile;
@@ -168,7 +167,7 @@
* deployment is loaded
* @throws Exception for any error
*/
- public void addDeployment(String vfsPath, VFSDeployment d)
+ public void addDeployment(String vfsPath, ProfileDeployment d)
throws Exception;
/**
@@ -180,7 +179,7 @@
* @param comp - the ManagedComponent that has been modified
* @throws Exception
*/
- public void updateDeployment(VFSDeployment d, ManagedComponent comp)
+ public void updateDeployment(ProfileDeployment d, ManagedComponent comp)
throws Exception;
/**
@@ -192,7 +191,7 @@
* @return the named bootstrap
* @throws NoSuchDeploymentException - if there is no such bootstrap
*/
- public VFSDeployment getDeployment(String name)
+ public ProfileDeployment getDeployment(String name)
throws NoSuchDeploymentException;
/**
@@ -204,7 +203,7 @@
* @return the removed deployment
* @throws Exception for any error
*/
- public VFSDeployment removeDeployment(String vfsPath)
+ public ProfileDeployment removeDeployment(String vfsPath)
throws Exception;
/**
@@ -212,7 +211,7 @@
*
* @return the deployment instances in this profile.
*/
- public Collection<VFSDeployment> getDeployments();
+ public Collection<ProfileDeployment> getDeployments();
/**
* Get the modified deployments.
Modified: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ModificationInfo.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ModificationInfo.java 2009-01-31 23:34:16 UTC (rev 83734)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ModificationInfo.java 2009-02-01 01:37:18 UTC (rev 83735)
@@ -23,8 +23,6 @@
import java.io.Serializable;
-import org.jboss.deployers.vfs.spi.client.VFSDeployment;
-
/**
* Represents a modified deployment returned from the modified deployments scan.
*
@@ -39,18 +37,18 @@
private final static long serialVersionUID = 1;
public enum ModifyStatus {ADDED, MODIFIED, REMOVED};
- private VFSDeployment deployment;
+ private ProfileDeployment deployment;
private long lastModified;
private ModifyStatus status;
- public ModificationInfo(VFSDeployment deployment, long lastModified, ModifyStatus status)
+ public ModificationInfo(ProfileDeployment deployment, long lastModified, ModifyStatus status)
{
this.deployment = deployment;
this.lastModified = lastModified;
this.status = status;
}
- public VFSDeployment getDeployment()
+ public ProfileDeployment getDeployment()
{
return deployment;
}
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-31 23:34:16 UTC (rev 83734)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/Profile.java 2009-02-01 01:37:18 UTC (rev 83735)
@@ -24,7 +24,6 @@
import java.util.Collection;
import java.util.Set;
-import org.jboss.deployers.vfs.spi.client.VFSDeployment;
import org.jboss.managed.api.ManagedComponent;
/**
@@ -82,7 +81,7 @@
* deployment is loaded
* @throws Exception for any error
*/
- void addDeployment(VFSDeployment d) throws Exception;
+ void addDeployment(ProfileDeployment d) throws Exception;
/**
* Update a deployment. This can be used to save attachments, other
@@ -94,7 +93,7 @@
* @param attachments - the attachments that have been modified
* @throws Exception for any error
*/
- void updateDeployment(VFSDeployment d, ManagedComponent comp) throws Exception;
+ void updateDeployment(ProfileDeployment d, ManagedComponent comp) throws Exception;
/**
* Remove a deployment
@@ -105,7 +104,7 @@
* @return the DeploymentContext for the name if found
* @throws Exception for any error
*/
- VFSDeployment removeDeployment(String name) throws Exception;
+ ProfileDeployment removeDeployment(String name) throws Exception;
/**
* Get a named deployment.
@@ -117,7 +116,7 @@
* @throws Exception for any error
* @throws NoSuchDeploymentException - if there is no such bootstrap
*/
- VFSDeployment getDeployment(String name) throws Exception, NoSuchDeploymentException;
+ ProfileDeployment getDeployment(String name) throws Exception, NoSuchDeploymentException;
/**
* Get all deployments defined in this profile
@@ -125,7 +124,7 @@
* @return the deployment instances in this profile.
* @throws Exception for any error
*/
- Collection<VFSDeployment> getDeployments() throws Exception;
+ Collection<ProfileDeployment> getDeployments() throws Exception;
/**
* Get the deployments that have been modified since the last
Added: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileDeployment.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileDeployment.java (rev 0)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileDeployment.java 2009-02-01 01:37:18 UTC (rev 83735)
@@ -0,0 +1,81 @@
+/*
+ * 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;
+
+import java.io.Serializable;
+import java.util.Map;
+
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * The profile deployment.
+ *
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public interface ProfileDeployment extends Serializable
+{
+
+ /**
+ * Get the deployment name
+ *
+ * @return the name
+ */
+ String getName();
+
+ /**
+ * Get the root of the deployment
+ *
+ * @return the root, or null if it's not a VFS based deployment
+ */
+ VirtualFile getRoot();
+
+ /**
+ * Get all attachments.
+ *
+ * @return the attachments
+ */
+ Map<String, Object> getAttachments();
+
+ /**
+ * Get attachment
+ *
+ * @param name the name of the attachment
+ * @return the attachment or null if not present
+ *
+ * @throws IllegalArgumentException for a null name
+ */
+ Object getAttachment(String name);
+
+ /**
+ * Add attachment
+ *
+ * @param name the name of the attachment
+ * @param attachment the attachment
+ * @return any previous attachment
+ *
+ * @throws IllegalArgumentException for a null name or attachment
+ */
+ Object addAttachment(String name, Object attachment);
+
+}
+
Added: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileFactory.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileFactory.java (rev 0)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileFactory.java 2009-02-01 01:37:18 UTC (rev 83735)
@@ -0,0 +1,46 @@
+/*
+ * 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;
+
+import org.jboss.profileservice.spi.metadata.ProfileMetaData;
+
+/**
+ * The profile factory.
+ *
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public interface ProfileFactory
+{
+
+ /**
+ * Create a profile based on the meta data.
+ *
+ * @param key the profile key
+ * @param metaData the profile meta data
+ * @return the profile
+ * @throws Exception
+ */
+ Profile createProfile(ProfileKey key, ProfileMetaData metaData) throws Exception;
+
+}
+
Modified: 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 2009-01-31 23:34:16 UTC (rev 83734)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileKeyMetaData.java 2009-02-01 01:37:18 UTC (rev 83735)
@@ -33,21 +33,21 @@
/**
* Get the profileKey domain attribute.
*
- * @return the domain.
+ * @return the domain
*/
public String getDomain();
/**
- * Get the profileKey server attribute;
+ * Get the profileKey server attribute.
*
- * @return the server.
+ * @return the server
*/
public String getServer();
/**
* Get the profile name.
*
- * @return the name.
+ * @return the name
*/
public String getName();
More information about the jboss-cvs-commits
mailing list