[jboss-cvs] JBossAS SVN: r84872 - in projects/integration/trunk: jboss-profileservice-spi and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Feb 27 10:17:21 EST 2009
Author: emuckenhuber
Date: 2009-02-27 10:17:21 -0500 (Fri, 27 Feb 2009)
New Revision: 84872
Added:
projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/MutableProfile.java
Removed:
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/repository/
Modified:
projects/integration/trunk/jboss-profileservice-spi/pom.xml
projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/DeploymentTemplate.java
projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/ManagementView.java
projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentID.java
projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentManager.java
projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentProgress.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/Profile.java
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/ProfileRepository.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/ProfileKeyMetaData.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/pom.xml
Log:
[JBAS-6472], [JBAS-6227] update spi and introduce a removeComponent to ManagementView
Modified: projects/integration/trunk/jboss-profileservice-spi/pom.xml
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/pom.xml 2009-02-27 13:59:01 UTC (rev 84871)
+++ projects/integration/trunk/jboss-profileservice-spi/pom.xml 2009-02-27 15:17:21 UTC (rev 84872)
@@ -25,16 +25,12 @@
<artifactId>jboss-metatype</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.deployers</groupId>
- <artifactId>jboss-deployers-vfs-spi</artifactId>
- </dependency>
- <dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-vfs</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.deployers</groupId>
- <artifactId>jboss-deployers-core-spi</artifactId>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-dependency</artifactId>
</dependency>
</dependencies>
</project>
Modified: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/DeploymentTemplate.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/DeploymentTemplate.java 2009-02-27 13:59:01 UTC (rev 84871)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/DeploymentTemplate.java 2009-02-27 15:17:21 UTC (rev 84872)
@@ -21,7 +21,6 @@
*/
package org.jboss.deployers.spi.management;
-import org.jboss.deployers.vfs.spi.client.VFSDeployment;
import org.jboss.managed.api.DeploymentTemplateInfo;
import org.jboss.virtual.VirtualFile;
@@ -33,6 +32,7 @@
* TODO: this needs to be fleshed out in terms of the various pieces, raw deployment
* files, ManagedObjects, etc.
* @author Scott.Stark at jboss.org
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
public interface DeploymentTemplate
@@ -40,32 +40,28 @@
/**
* Get the exportable representation of the properties that the
* template supports.
+ *
* @return the external representation of the template properties.
*/
- public DeploymentTemplateInfo getInfo();
+ DeploymentTemplateInfo getInfo();
/**
- * Create a deployment virtual that can be added to a profile.
+ * Get a deployment name based on the base name, which checks
+ * if the name is valid and get the correct suffix for the deployers.
*
- * @param root - the parent directory where the deployment can be created.
- * @param deploymentBaseName - a base name (without any suffix) to use for
- * any deployment files.
- * @param values - the template ManagedProperty values.
- * @return the virtual file for the template deployment.
- * @throws Exception - thrown on any failure to create the deployment
+ * @param deploymentBaseName the base name.
+ * @return the deployment name
*/
- public VirtualFile applyTemplate(VirtualFile root, String deploymentBaseName,
- DeploymentTemplateInfo values)
- throws Exception;
-
+ String getDeploymentName(String deploymentBaseName);
+
/**
- * Update the DeploymentContext with any attachments needed by the
- * ManagedProperty instance found in values.
- * @param ctx - the DeploymentContext created from the applyTemplate result.
- * @param values - the template ManagedProperty values.
- * @throws Exception
+ * Create a temporary deployment virtual that can be added to a profile.
+ *
+ * @param values - the template ManagedProperty values
+ * @return a virtual file, which gets distributed to the server and deleted afterwards
+ * @throws Exception - thrown on any failure to create the deployment
*/
- public void updateTemplateDeployment(VFSDeployment ctx,
- DeploymentTemplateInfo values)
+ VirtualFile applyTemplate(DeploymentTemplateInfo values)
throws Exception;
+
}
Modified: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/ManagementView.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/ManagementView.java 2009-02-27 13:59:01 UTC (rev 84871)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/ManagementView.java 2009-02-27 15:17:21 UTC (rev 84872)
@@ -31,7 +31,7 @@
/**
* The management view plugin spi for querying profiles for the
- * deployemnt management object interface roots.
+ * deployment management object interface roots.
*
* @author Scott.Stark at jboss.org
* @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
@@ -43,25 +43,19 @@
* Load all active profiles in the ManagementView for future operations.
* This must be called before the other ManagementView operations may be used.
*/
- public void load();
+ void load();
/**
* Reload the current profiles managed deployments/objects.
*/
- public void reload();
-
- /**
- * Release the ManagementView.
- *
- */
- public void release();
+ void reload();
/**
* Get the names of all deployments.
*
* @return the deployment names
*/
- public Set<String> getDeploymentNames();
+ Set<String> getDeploymentNames();
/**
* Get the names of the deployment that have the given deployment type.
@@ -69,7 +63,7 @@
* @param type - the deployment type
* @return the names
*/
- public Set<String> getDeploymentNamesForType(String type);
+ Set<String> getDeploymentNamesForType(String type);
/**
* Search for all deployment names with a name matching the regex expression.
@@ -78,7 +72,7 @@
* @return the deployment name.
* @throws NoSuchDeploymentException if no matches are found
*/
- public Set<String> getMatchingDeploymentName(String regex)
+ Set<String> getMatchingDeploymentName(String regex)
throws NoSuchDeploymentException;
/**
@@ -89,7 +83,7 @@
* @return a possibly empty set of ManagedDeployment accepted by the matcher
* @throws Exception
*/
- public Set<ManagedDeployment> getMatchingDeployments(String name, NameMatcher<ManagedDeployment> matcher)
+ Set<ManagedDeployment> getMatchingDeployments(String name, NameMatcher<ManagedDeployment> matcher)
throws NoSuchDeploymentException, Exception;
/**
@@ -99,7 +93,7 @@
* @return the deployment
* @throws NoSuchDeploymentException if no matches are found
*/
- public ManagedDeployment getDeployment(String name)
+ ManagedDeployment getDeployment(String name)
throws NoSuchDeploymentException;
/**
@@ -108,7 +102,7 @@
* @return the possibly empty set of deployment with the given type.
* @throws Exception
*/
- public Set<ManagedDeployment> getDeploymentsForType(String type)
+ Set<ManagedDeployment> getDeploymentsForType(String type)
throws Exception;
/**
@@ -117,7 +111,7 @@
* @return the possibly empty set of components with the given type.
* @throws Exception
*/
- public Set<ManagedComponent> getComponentsForType(ComponentType type)
+ Set<ManagedComponent> getComponentsForType(ComponentType type)
throws Exception;
/**
@@ -129,7 +123,7 @@
* @return the possibly null ManagedComponent
* @throws Exception
*/
- public ManagedComponent getComponent(String name, ComponentType type)
+ ManagedComponent getComponent(String name, ComponentType type)
throws Exception;
/**
* Obtain the ManagedComponents for the given name/type and matcher.
@@ -140,7 +134,7 @@
* @return the possibly empty set of ManagedComponent matches.
* @throws Exception
*/
- public Set<ManagedComponent> getMatchingComponents(String name, ComponentType type,
+ Set<ManagedComponent> getMatchingComponents(String name, ComponentType type,
NameMatcher<ManagedComponent> matcher)
throws Exception;
@@ -153,16 +147,26 @@
* @param comp the managed component
* @throws Exception
*/
- public void updateComponent(ManagedComponent comp)
+ void updateComponent(ManagedComponent comp)
throws Exception;
/**
+ * Removes a given component. This will remove a component from the
+ * associated ManagedDeployment.
+ *
+ * @param comp the managed component.
+ * @throws Exception
+ */
+ void removeComponent(ManagedComponent comp)
+ throws Exception;
+
+ /**
* Get the registered DeploymentTemplate names.
*
* TODO: probably needs a Map<String, DeploymentType> notion
* @return the template names
*/
- public Set<String> getTemplateNames();
+ Set<String> getTemplateNames();
/**
* Get a deployment template.
@@ -171,16 +175,17 @@
* @return the named DeploymentTemplate
* @throws NoSuchDeploymentException - if there is no such template
*/
- public DeploymentTemplateInfo getTemplate(String name)
+ DeploymentTemplateInfo getTemplate(String name)
throws NoSuchDeploymentException;
/**
+ * Create a deployment based on the given DeploymentTemplateInfo.
*
- * @param deploymentBaseName
- * @param info
+ * @param deploymentBaseName the base name
+ * @param info the deployment template info
* @throws Exception
*/
- public void applyTemplate(String deploymentBaseName, DeploymentTemplateInfo info)
+ void applyTemplate(String deploymentBaseName, DeploymentTemplateInfo info)
throws Exception;
/**
@@ -188,6 +193,6 @@
*
* @throws Exception
*/
- public void process() throws Exception;
+ void process() throws Exception;
}
Modified: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentID.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentID.java 2009-02-27 13:59:01 UTC (rev 84871)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentID.java 2009-02-27 15:17:21 UTC (rev 84872)
@@ -23,10 +23,13 @@
import java.net.URL;
+import org.jboss.profileservice.spi.ProfileKey;
+
/**
* A representation of a top-level deployment id.
*
* @author Scott.Stark at jboss.org
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
* @version $Revision:$
*/
public interface DeploymentID
@@ -37,7 +40,16 @@
* @return the deployment name
*/
String[] getNames();
+
/**
+ * The target profile this deployment is
+ * associated with.
+ *
+ * @return the profile key.
+ */
+ ProfileKey getProfile();
+
+ /**
* Get the unique names of the deployments in the repository. Some DeploymentManager
* operations like distribute produce an alternate unique name that differs
* from the input name. In this case this method will provide the unique
@@ -46,18 +58,19 @@
* @return the unique names of the deployments in the repository
*/
String[] getRepositoryNames();
+
/**
* Set the unique names of the deployments in the repository.
* @see #getRepositoryNames()
* @param names - the unique names of the deployments in the repository
*/
- public void setRepositoryNames(String[] names);
+ void setRepositoryNames(String[] names);
/**
* An optional content URL used for distribute/redeploy operations.
* @return
*/
- public URL getContentURL();
+ URL getContentURL();
/**
* Do we copy content or jut ref it.
Modified: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentManager.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentManager.java 2009-02-27 13:59:01 UTC (rev 84871)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentManager.java 2009-02-27 15:17:21 UTC (rev 84872)
@@ -22,7 +22,9 @@
package org.jboss.deployers.spi.management.deploy;
import java.net.URL;
+import java.util.Collection;
+import org.jboss.profileservice.spi.NoSuchProfileException;
import org.jboss.profileservice.spi.ProfileKey;
/**
@@ -34,6 +36,7 @@
*/
public interface DeploymentManager
{
+
/**
* Load and associate the given profile with the DeploymentManager
* for future operations.
@@ -54,6 +57,13 @@
* @throws Exception
*/
public void releaseProfile(ProfileKey key, boolean allowHotDeployments) throws Exception;
+
+ /**
+ * Get a set of profiles supporting deployment actions.
+ *
+ * @return a set of profiles keys
+ */
+ Collection<ProfileKey> getProfiles();
/**
* Map from the external name passed to distribute to the uploaded
@@ -63,24 +73,18 @@
* @return the mapped list of unique names in the deployment repository.
* @throws Exception for any error
*/
- public String[] getRepositoryNames(String[] names) throws Exception;
+ String[] getRepositoryNames(String[] names) throws Exception;
/**
- * Is redeploy supported.
- *
- * @return true if redeploy suported
- */
- public boolean isRedeploySupported();
-
- /**
* Add raw deployment content to the profile.
*
* @param name the deployment name
* @param contentURL - URL for obtaining the deployment archive
* @param copyContent should we copy content or just reference it
* @return a DeploymentProgress used to run and track the distribute progress.
+ * @throws Exception for any error
*/
- public DeploymentProgress distribute(String name, URL contentURL, boolean copyContent);
+ DeploymentProgress distribute(String name, URL contentURL, boolean copyContent) throws Exception;
/**
* Prepare a set of deployments through their dependency analysis phase.
@@ -89,39 +93,51 @@
* @return a DeploymentProgress used to run and track the prepare progress.
* @throws Exception for any error
*/
- public DeploymentProgress prepare(String... names)
- throws Exception;
+ DeploymentProgress prepare(String... names) throws Exception;
/**
* Start a previously distributed deployment.
*
* @param names the unique names of the deployments
* @return a DeploymentProgress used to run and track the start progress.
+ * @throws Exception for any error
*/
- public DeploymentProgress start(String... names);
+ DeploymentProgress start(String... names) throws Exception;
/**
+ * Is redeploy supported.
+ *
+ * @param key the profile key
+ * @return true if redeploy suported
+ * @throws NoSuchProfileException if there is no such profile
+ */
+ boolean isRedeploySupported(ProfileKey key) throws NoSuchProfileException;
+
+ /**
* Do redeploy.
*
* @param name the deployment to redeploy
* @return a DeploymentProgress used to run and track the redeploy progress.
+ * @throws Exception for any error
*/
- public DeploymentProgress redeploy(String name);
+ DeploymentProgress redeploy(String name) throws Exception;
/**
* Stop a previously started deployment.
*
* @param names the unique names of the deployments
* @return a DeploymentProgress used to run and track the stop progress.
+ * @throws Exception for any error
*/
- public DeploymentProgress stop(String... names);
+ DeploymentProgress stop(String... names) throws Exception;
/**
* Remove a previously distributed deployment.
*
* @param names the unique names of the deployments
* @return a DeploymentProgress used to run and track the remove progress.
+ * @throws Exception for any error
*/
- public DeploymentProgress remove(String... names);
+ DeploymentProgress remove(String... names) throws Exception;
}
Modified: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentProgress.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentProgress.java 2009-02-27 13:59:01 UTC (rev 84871)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentProgress.java 2009-02-27 15:17:21 UTC (rev 84872)
@@ -25,7 +25,7 @@
/**
* An interface for tracking the progress of a deployment upload to a
- * profile via the profile service ManagementView spi.
+ * profile via the profile service DeploymentManager spi.
*
* @author Scott.Stark at jboss.org
* @version $Revision:$
Deleted: 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-02-27 13:59:01 UTC (rev 84871)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/AttachmentStore.java 2009-02-27 15:17:21 UTC (rev 84872)
@@ -1,64 +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;
-
-import java.net.URI;
-
-import org.jboss.deployers.client.spi.Deployment;
-import org.jboss.managed.api.ManagedComponent;
-
-/**
- * The AttachmentStore.
- *
- * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision$
- */
-public interface AttachmentStore
-{
-
- /**
- * Get the uri where the attachments are stored.
- *
- * @return the attachment store root.
- */
- URI getAttachmentStoreRoot();
-
- /**
- * Persist the changes of the managed component.
- *
- * @param deployment the profile deployment.
- * @param comp the managed component.
- * @throws Exception
- */
- void updateDeployment(ProfileDeployment deployment, ManagedComponent comp) throws Exception;
-
- /**
- * Create the deployment with the persisted attachments.
- *
- * @param deployment the profile deployment.
- * @return the mc deployment.
- * @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-02-27 13:59:01 UTC (rev 84871)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentRepository.java 2009-02-27 15:17:21 UTC (rev 84872)
@@ -45,45 +45,45 @@
*
* @return URI[] the uris of this repository.
*/
- public URI[] getRepositoryURIs();
+ URI[] getRepositoryURIs();
/**
* Create the repository.
*
* @throws Exception
*/
- public void create() throws Exception;
+ void create() throws Exception;
/**
* Load the repository contents.
*
* @throws Exception
*/
- public void load() throws Exception;
+ void load() throws Exception;
/**
* Unload the repository;
*/
- public void unload();
+ void unload();
/**
* Delete the repository.
*
* @throws Exception
*/
- public void remove() throws Exception;
+ void remove() throws Exception;
/**
* Get the time any contents were last modified
* @return
*/
- public long getLastModified();
+ long getLastModified();
/**
* Get the names of all deployments in the repository
* @return
*/
- public Set<String> getDeploymentNames();
+ Set<String> getDeploymentNames();
/**
* Get repository names.
@@ -92,7 +92,7 @@
* @return full repository names
* @throws Exception for any error
*/
- public String[] getRepositoryNames(String... names) throws Exception;
+ String[] getRepositoryNames(String... names) throws Exception;
/**
* Upload raw deployment content to a profile repository. This does not make
@@ -103,7 +103,7 @@
* @throws IOException
* @return the unique name of the deployment in the repository
*/
- public String addDeploymentContent(String vfsPath, InputStream contentIS)
+ String addDeploymentContent(String vfsPath, InputStream contentIS)
throws IOException;
/**
@@ -113,7 +113,7 @@
* @return the deployment content virtual file
* @throws IOException for any error
*/
- public VirtualFile getDeploymentContent(String name)
+ VirtualFile getDeploymentContent(String name)
throws IOException, URISyntaxException;
/**
@@ -122,14 +122,14 @@
* @param vfsPath - the full vfs path of the deployment
* @return the deployment content flags, {@linkplain DeploymentContentFlags}
*/
- public int lockDeploymentContent(String vfsPath);
+ int lockDeploymentContent(String vfsPath);
/**
* Unlock a previously locked deployment content.
*
* @param vfsPath - the full vfs path of the deployment
* @return the deployment content flags, {@linkplain DeploymentContentFlags}
*/
- public int unlockDeploymentContent(String vfsPath);
+ int unlockDeploymentContent(String vfsPath);
/**
* Get the status flags for the deployment path
@@ -137,7 +137,7 @@
* @param vfsPath - the full vfs path of the deployment
* @return the deployment content flags, {@linkplain DeploymentContentFlags}
*/
- public int getDeploymentContentFlags(String vfsPath);
+ int getDeploymentContentFlags(String vfsPath);
/**
* Set one or more flags for the deployment.
* @see #clearDeploymentContentFlags(String)
@@ -145,7 +145,7 @@
* @param vfsPath - the full vfs path of the deployment
* @param flags - the deployment content flags, {@linkplain DeploymentContentFlags}
*/
- public int setDeploymentContentFlags(String vfsPath, int flags);
+ int setDeploymentContentFlags(String vfsPath, int flags);
/**
* Clear one or more flags for the deployment. This ands the compliment of
* the flags argument into the existing content flags and returns the result.
@@ -153,7 +153,7 @@
* @param vfsPath - the full vfs path of the deployment
* @param flags - the deployment content flags, {@linkplain DeploymentContentFlags}
*/
- public int clearDeploymentContentFlags(String vfsPath, int flags);
+ int clearDeploymentContentFlags(String vfsPath, int flags);
/**
* Does a deployment content have the indicated flag.
*
@@ -161,7 +161,7 @@
* @param flags - the deployment content flags, {@linkplain DeploymentContentFlags}
* @return true if the content flags contains the flag, false otherwise.
*/
- public boolean hasDeploymentContentFlags(String vfsPath, int flag);
+ boolean hasDeploymentContentFlags(String vfsPath, int flag);
/**
* Add a deployment
@@ -171,7 +171,7 @@
* deployment is loaded
* @throws Exception for any error
*/
- public void addDeployment(String vfsPath, ProfileDeployment deployment)
+ void addDeployment(String vfsPath, ProfileDeployment deployment)
throws Exception;
/**
@@ -181,7 +181,7 @@
* @return the deployment
* @throws NoSuchDeploymentException - if there is no such deployment
*/
- public ProfileDeployment getDeployment(String name)
+ ProfileDeployment getDeployment(String name)
throws NoSuchDeploymentException;
/**
@@ -191,23 +191,22 @@
* @return the removed deployment
* @throws Exception for any error
*/
- public ProfileDeployment removeDeployment(String vfsPath)
- throws Exception;
+ ProfileDeployment removeDeployment(String vfsPath) throws Exception;
/**
* Get all deployments defined in this profile
*
* @return the deployment instances in this profile.
*/
- public Collection<ProfileDeployment> getDeployments();
+ Collection<ProfileDeployment> getDeployments();
/**
* Get the modified deployments.
*
- * @return the modified deployments.
+ * @return the modified deployments, empty if there are no
+ * modifications or hot deployment is not supported.
* @throws Exception
*/
- public Collection<ModificationInfo> getModifiedDeployments()
- throws Exception;
+ Collection<ModificationInfo> getModifiedDeployments() throws Exception;
}
Added: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/MutableProfile.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/MutableProfile.java (rev 0)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/MutableProfile.java 2009-02-27 15:17:21 UTC (rev 84872)
@@ -0,0 +1,72 @@
+/*
+ * 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.spi;
+
+import java.util.Collection;
+
+/**
+ * A mutable profile.
+ *
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public interface MutableProfile extends Profile
+{
+
+ /**
+ * Add a deployment.
+ *
+ * @param deployment the deployment
+ * @throws Exception for any error
+ */
+ void addDeployment(ProfileDeployment deployment) throws Exception;
+
+ /**
+ * Remove a deployment.
+ *
+ * @param name the deployment name
+ * @return the DeploymentContext for the name if found
+ * @throws NoSuchDeploymentException if the deployment was not found
+ * @throws Exception for any error
+ */
+ ProfileDeployment removeDeployment(String name) throws NoSuchDeploymentException, Exception;
+
+ /**
+ * Get the deployments that have been modified since the last
+ * check.
+ *
+ * @return the modified deployments, empty if none exist
+ * @throws Exception - thrown on error scanning for deployments
+ */
+ Collection<ModificationInfo> getModifiedDeployments() throws Exception;
+
+ /**
+ * Enable/disable the getModifiedDeployments results. This can be
+ * used to disable the getModifiedDeployments results during
+ * periods such as bootstrap where changes should be delayed.
+ *
+ * @see #getModifiedDeployments
+ * @param flag - the enable/disable flag
+ */
+ void enableModifiedDeploymentChecks(boolean flag);
+
+}
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-02-27 13:59:01 UTC (rev 84871)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/Profile.java 2009-02-27 15:17:21 UTC (rev 84872)
@@ -47,18 +47,6 @@
long getLastModified();
/**
- * Internally create the profile.
- *
- * @throws Exception
- */
- void create() throws Exception;
-
- /**
- * Internally destroy the profile.
- */
- void destroy();
-
- /**
* Get the profile dependencies.
*
* @return the collection of profile keys.
@@ -72,24 +60,6 @@
Set<String> getDeploymentNames();
/**
- * Add a deployment
- *
- * @param d the deployment
- * deployment is loaded
- * @throws Exception for any error
- */
- void addDeployment(ProfileDeployment d) throws Exception;
-
- /**
- * Remove a deployment
- *
- * @param name the deployment name
- * @return the DeploymentContext for the name if found
- * @throws Exception for any error
- */
- ProfileDeployment removeDeployment(String name) throws Exception;
-
- /**
* Get a named deployment.
*
* @param name - the deployment name
@@ -97,37 +67,16 @@
* @throws Exception for any error
* @throws NoSuchDeploymentException - if there is no such bootstrap
*/
- ProfileDeployment getDeployment(String name) throws Exception, NoSuchDeploymentException;
+ ProfileDeployment getDeployment(String name) throws NoSuchDeploymentException;
/**
* Get all deployments defined in this profile
*
* @return the deployment instances in this profile.
- * @throws Exception for any error
*/
- Collection<ProfileDeployment> getDeployments() throws Exception;
+ Collection<ProfileDeployment> getDeployments();
/**
- * Get the deployments that have been modified since the last
- * check.
- *
- * @return the modified deployments, empty if none exist or
- * the profile does not support hot deployments.
- *
- * @throws Exception - thrown on error scanning for deployments
- */
- Collection<ModificationInfo> getModifiedDeployments() throws Exception;
-
- /**
- * Enable/disable the getModifiedDeployments results. This can be
- * used to disable the getModifiedDeployments results during
- * periods such as bootstrap where changes should be delayed.
- * @see #getModifiedDeployments
- * @param flag - the enable/disable flag
- */
- void enableModifiedDeploymentChecks(boolean flag);
-
- /**
* Checks whether a deployment context is available in the basic profile service.
*
* @param name the name of the deployment
@@ -135,4 +84,12 @@
*/
boolean hasDeployment(String name);
+ /**
+ * Flag indicating if the the profile is mutable
+ * and implements the MutableProfile interface.
+ *
+ * @return true, if the profile is mutable
+ */
+ boolean isMutable();
+
}
Modified: 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 2009-02-27 13:59:01 UTC (rev 84871)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileFactory.java 2009-02-27 15:17:21 UTC (rev 84872)
@@ -31,6 +31,13 @@
*/
public interface ProfileFactory
{
+
+ /**
+ * The profile types.
+ *
+ * @return the type.
+ */
+ String[] getTypes();
/**
* Create a profile based on the meta data.
Modified: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileRepository.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileRepository.java 2009-02-27 13:59:01 UTC (rev 84871)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileRepository.java 2009-02-27 15:17:21 UTC (rev 84872)
@@ -40,7 +40,7 @@
*
* @return keys for all known profiles.
*/
- public Collection<ProfileKey> getProfileKeys();
+ Collection<ProfileKey> getProfileKeys();
/**
* Create a new DeploymentRepository for a profile.
@@ -51,7 +51,7 @@
* @throws IOException thrown if the repository cannot be created
* @throws Exception for any error
*/
- public DeploymentRepository createProfileDeploymentRepository(ProfileKey key, ProfileMetaData metaData)
+ DeploymentRepository createProfileDeploymentRepository(ProfileKey key, ProfileMetaData metaData)
throws Exception;
/**
@@ -62,7 +62,7 @@
* @throws NoSuchProfileException thrown if there is no such profile.
* @throws Exception for any error
*/
- public DeploymentRepository getProfileDeploymentRepository(ProfileKey key)
+ DeploymentRepository getProfileDeploymentRepository(ProfileKey key)
throws Exception, NoSuchProfileException;
/**
@@ -73,6 +73,6 @@
* @throws NoSuchProfileException thrown if there is no such profile.
* @throws Exception for any error
*/
- public void removeProfileDeploymentRepository(ProfileKey key)
+ void removeProfileDeploymentRepository(ProfileKey key)
throws Exception, NoSuchProfileException;
}
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-02-27 13:59:01 UTC (rev 84871)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileService.java 2009-02-27 15:17:21 UTC (rev 84872)
@@ -25,6 +25,7 @@
import org.jboss.deployers.spi.management.ManagementView;
import org.jboss.deployers.spi.management.deploy.DeploymentManager;
+import org.jboss.profileservice.spi.metadata.ProfileMetaData;
/**
* The entry point service for accessing/administering server profiles
@@ -41,14 +42,14 @@
*
* @return array of profile domains
*/
- public String[] getDomains();
+ String[] getDomains();
/**
* Get the keys for all registered profiles.
*
* @return keys for all registered profiles.
*/
- public Collection<ProfileKey> getProfileKeys();
+ Collection<ProfileKey> getProfileKeys();
/**
* Obtain the registered profile for the key.
@@ -57,15 +58,14 @@
* @return the matching profile.
* @throws NoSuchProfileException
*/
- public Profile getProfile(ProfileKey key)
- throws NoSuchProfileException;
+ Profile getProfile(ProfileKey key) throws NoSuchProfileException;
/**
* Get the keys for all active profiles.
*
* @return keys for all active profiles.
*/
- public Collection<ProfileKey> getActiveProfileKeys();
+ Collection<ProfileKey> getActiveProfileKeys();
/**
* Obtain a activated profile for the key.
@@ -75,28 +75,38 @@
* @throws NoSuchProfileException thrown if there is no
* active profile
*/
- public Profile getActiveProfile(ProfileKey key)
- throws NoSuchProfileException;
+ Profile getActiveProfile(ProfileKey key) throws NoSuchProfileException;
/**
* Obtain the ManagementView plugin
* @return the ManagementView plugin if supported
*/
- public ManagementView getViewManager();
+ ManagementView getViewManager();
/**
* Obtain the DeploymentManager plugin
* @return the DeploymentManager plugin if supported
*/
- public DeploymentManager getDeploymentManager();
+ DeploymentManager getDeploymentManager();
/**
+ * Create and register a profile based on it's meta data.
+ *
+ * @param metaData the profile meta data
+ * @return the profile key of the profile
+ * @throws Exception
+ */
+ ProfileKey createProfile(ProfileMetaData metaData) throws Exception;
+
+ /**
* Register a Profile.
*
* @param profile the profile.
* @throws Exception
+ * @deprecated see {@link #create(ProfileMetaData metaData)}
*/
- public void registerProfile(Profile profile) throws Exception;
+ @Deprecated
+ void registerProfile(Profile profile) throws Exception;
/**
* Activate a registered profile.
@@ -105,7 +115,7 @@
* @throws NoSuchProfileException if the profile is not registered.
* @throws Exception
*/
- public void activateProfile(ProfileKey key) throws NoSuchProfileException, Exception;
+ void activateProfile(ProfileKey key) throws NoSuchProfileException, Exception;
/**
* Deactivate the profile.
@@ -113,7 +123,7 @@
* @param key the profile key.
* @throws NoSuchProfileException if the profile is not active.
*/
- public void deactivateProfile(ProfileKey key) throws NoSuchProfileException;
+ void deactivateProfile(ProfileKey key) throws NoSuchProfileException;
/**
* Unregister a profile.
@@ -121,7 +131,7 @@
* @param key the profile key.
* @throws NoSuchProfileException if the profile is not registered.
*/
- public void unregisterProfile(ProfileKey key) throws NoSuchProfileException;
+ void unregisterProfile(ProfileKey key) throws NoSuchProfileException;
/**
* Validate a registered profile.
@@ -129,5 +139,6 @@
* @param key the profile key
* @throws Exception if the profile is not installed correctly
*/
- public void validateProfile(ProfileKey key) throws Exception;
+ void validateProfile(ProfileKey key) throws Exception;
+
}
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-02-27 13:59:01 UTC (rev 84871)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileDeploymentMetaData.java 2009-02-27 15:17:21 UTC (rev 84872)
@@ -36,7 +36,7 @@
*
* @return
*/
- public String getName();
+ String getName();
}
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-02-27 13:59:01 UTC (rev 84871)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileKeyMetaData.java 2009-02-27 15:17:21 UTC (rev 84872)
@@ -35,21 +35,21 @@
*
* @return the domain
*/
- public String getDomain();
+ String getDomain();
/**
* Get the profileKey server attribute.
*
* @return the server
*/
- public String getServer();
+ String getServer();
/**
* Get the profile name.
*
* @return the name
*/
- public String getName();
+ 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-02-27 13:59:01 UTC (rev 84871)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileMetaData.java 2009-02-27 15:17:21 UTC (rev 84872)
@@ -37,20 +37,20 @@
*
* @return the profile source.
*/
- public ProfileSourceMetaData getSource();
+ ProfileSourceMetaData getSource();
/**
* Get the sub-profiles.
*
* @return the sub-profiles
*/
- public List<SubProfileMetaData> getSubprofiles();
+ List<SubProfileMetaData> getSubprofiles();
/**
* Get the associated deployments to this profile.
*
* @return the deployments
*/
- public List<ProfileDeploymentMetaData> getDeployments();
+ List<ProfileDeploymentMetaData> getDeployments();
}
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-02-27 13:59:01 UTC (rev 84871)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/metadata/ProfileSourceMetaData.java 2009-02-27 15:17:21 UTC (rev 84872)
@@ -37,14 +37,14 @@
*
* @return the type.
*/
- public String getType();
+ String getType();
/**
* Get the sources URIs for this source;
*
* @return the sources/
*/
- public List<String> getSources();
+ List<String> getSources();
}
Modified: projects/integration/trunk/pom.xml
===================================================================
--- projects/integration/trunk/pom.xml 2009-02-27 13:59:01 UTC (rev 84871)
+++ projects/integration/trunk/pom.xml 2009-02-27 15:17:21 UTC (rev 84872)
@@ -20,12 +20,17 @@
<url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/integration/trunk</url>
</scm>
- <!-- Properties -->
- <properties>
- <version.org.jboss.man>2.0.0.CR5</version.org.jboss.man>
- <version.org.jboss.deployers>2.0.0.CR5</version.org.jboss.deployers>
- <version.org.jboss.vfs>2.0.0.CR5</version.org.jboss.vfs>
- </properties>
+ <!-- Properties -->
+ <properties>
+ <version.org.jboss.logging>2.0.5.GA</version.org.jboss.logging>
+ <version.org.jboss.man>2.1.0.CR1</version.org.jboss.man>
+ <version.org.jboss.deployers>2.0.5.GA</version.org.jboss.deployers>
+ <version.org.jboss.vfs>2.1.0.GA</version.org.jboss.vfs>
+ <version.org.jboss.aop>2.0.0.SP1</version.org.jboss.aop>
+ <version.org.jboss.common.core>2.2.11.GA</version.org.jboss.common.core>
+ <version.jacorb>2.3.0jboss.patch5-brew</version.jacorb>
+ <version.org.jboss.microcontainer>2.0.4.GA</version.org.jboss.microcontainer>
+ </properties>
<modules>
<module>jboss-classloading-spi</module>
@@ -69,68 +74,72 @@
</plugin>
</plugins>
</reporting>
-
- <!-- The parent pom manages the inter-dependencies of the modules. -->
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- <version>2.0.5.GA</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.aop</groupId>
- <artifactId>jboss-aop</artifactId>
- <version>2.0.0.GA</version>
- <classifier>client</classifier>
- </dependency>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-common-core</artifactId>
- <version>2.2.8.GA</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-jca-api</artifactId>
- <version>1.5.0.GA</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-transaction-api</artifactId>
- <version>1.0.1.GA</version>
- </dependency>
- <dependency>
- <groupId>jacorb</groupId>
- <artifactId>jacorb</artifactId>
- <version>2.3.0jboss.patch5-brew</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.deployers</groupId>
- <artifactId>jboss-deployers-vfs-spi</artifactId>
- <version>${version.org.jboss.deployers}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-vfs</artifactId>
- <version>${version.org.jboss.vfs}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.deployers</groupId>
- <artifactId>jboss-deployers-core-spi</artifactId>
- <version>${version.org.jboss.deployers}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-managed</artifactId>
- <version>${version.org.jboss.man}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-metatype</artifactId>
- <version>${version.org.jboss.man}</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
+ <!-- The parent pom manages the inter-dependencies of the modules. -->
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ <version>${version.org.jboss.logging}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.aop</groupId>
+ <artifactId>jboss-aop</artifactId>
+ <version>${version.org.jboss.aop}</version>
+ <classifier>client</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ <version>${version.org.jboss.common.core}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jca-api</artifactId>
+ <version>1.5.0.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-transaction-api</artifactId>
+ <version>1.0.1.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>jacorb</groupId>
+ <artifactId>jacorb</artifactId>
+ <version>${version.jacorb}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs-spi</artifactId>
+ <version>${version.org.jboss.deployers}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-vfs</artifactId>
+ <version>${version.org.jboss.vfs}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-core-spi</artifactId>
+ <version>${version.org.jboss.deployers}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-dependency</artifactId>
+ <version>${version.org.jboss.microcontainer}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.man</groupId>
+ <artifactId>jboss-managed</artifactId>
+ <version>${version.org.jboss.man}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.man</groupId>
+ <artifactId>jboss-metatype</artifactId>
+ <version>${version.org.jboss.man}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
</project>
More information about the jboss-cvs-commits
mailing list