[jboss-cvs] JBossAS SVN: r89005 - in projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss: profileservice/spi and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon May 18 08:07:17 EDT 2009
Author: emuckenhuber
Date: 2009-05-18 08:07:17 -0400 (Mon, 18 May 2009)
New Revision: 89005
Added:
projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentOptions.java
projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentOption.java
Modified:
projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentID.java
projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentManager.java
projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentRepository.java
Log:
[JBAS-6693] add deployment options
Modified: projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentID.java
===================================================================
--- projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentID.java 2009-05-18 12:04:50 UTC (rev 89004)
+++ projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentID.java 2009-05-18 12:07:17 UTC (rev 89005)
@@ -32,7 +32,7 @@
* @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
* @version $Revision:$
*/
-public interface DeploymentID
+public interface DeploymentID extends DeploymentOptions
{
/**
* Get the names of the deployments.
@@ -85,4 +85,5 @@
* @return the identifier
*/
String getDescription();
+
}
Modified: projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentManager.java
===================================================================
--- projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentManager.java 2009-05-18 12:04:50 UTC (rev 89004)
+++ projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentManager.java 2009-05-18 12:07:17 UTC (rev 89005)
@@ -24,6 +24,7 @@
import java.net.URL;
import java.util.Collection;
+import org.jboss.profileservice.spi.DeploymentOption;
import org.jboss.profileservice.spi.ProfileKey;
/**
@@ -79,6 +80,18 @@
* @throws Exception for any error
*/
DeploymentProgress distribute(String name, URL contentURL, boolean copyContent) throws Exception;
+
+ /**
+ * Add raw deployment to the profile without starting the deployment.
+ * The deployments options can be used to specify certain behavior.
+ *
+ * @param name the deployment name
+ * @param contentURL - URL for obtaining the deployment archive
+ * @param options - the deployment options
+ * @return a DeploymentProgress used to run and track the distribute progress.
+ * @throws Exception for any error
+ */
+ DeploymentProgress distribute(String name, URL contentURL, DeploymentOption... options) throws Exception;
/**
* Prepare a set of deployments through their dependency analysis phase.
Copied: projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentOptions.java (from rev 89004, projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentOptions.java)
===================================================================
--- projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentOptions.java (rev 0)
+++ projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentOptions.java 2009-05-18 12:07:17 UTC (rev 89005)
@@ -0,0 +1,66 @@
+/*
+ * 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.deployers.spi.management.deploy;
+
+import org.jboss.profileservice.spi.DeploymentOption;
+
+/**
+ * The deployment options.
+ *
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public interface DeploymentOptions
+{
+
+ /**
+ * Add a deployment option.
+ *
+ * @param option the option
+ */
+ void addDeploymentOption(DeploymentOption option);
+
+ /**
+ * Remove a deployment option.
+ *
+ * @param option the option
+ * @return true, if the option was present
+ */
+ boolean removeDeploymentOption(DeploymentOption option);
+
+ /**
+ * Has a given deployment option.
+ *
+ * @param option the deployment option
+ * @return true, if the option is set
+ */
+ boolean hasDeploymentOption(DeploymentOption option);
+
+ /**
+ * Get all deployment options.
+ *
+ * @return the set deployment option
+ */
+ DeploymentOption[] getDeploymentOptions();
+
+}
+
Copied: projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentOption.java (from rev 89004, projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentOption.java)
===================================================================
--- projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentOption.java (rev 0)
+++ projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentOption.java 2009-05-18 12:07:17 UTC (rev 89005)
@@ -0,0 +1,45 @@
+/*
+ * 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;
+
+/**
+ * The deployment options.
+ *
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public enum DeploymentOption
+{
+
+ /**
+ * Fail if the deployment already exists on the
+ * server.
+ */
+ FailIfExists,
+
+ /**
+ * Unpack the deployment on the server.
+ */
+ Explode
+
+}
+
Modified: projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentRepository.java
===================================================================
--- projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentRepository.java 2009-05-18 12:04:50 UTC (rev 89004)
+++ projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentRepository.java 2009-05-18 12:07:17 UTC (rev 89005)
@@ -107,6 +107,19 @@
*/
String addDeploymentContent(String name, InputStream contentIS)
throws IOException;
+
+ /**
+ * Upload raw deployment content to a profile repository. This does not make
+ * the deployment available to getDeployments or getModifiedDeployments
+ *
+ * @param name - the full vfs path of the deployment
+ * @param contentIS - the input stream for the deployment contents
+ * @param options - optional deployment options
+ * @return the unique name of the deployment in the repository
+ * @throws IOException
+ */
+ String addDeploymentContent(String name, InputStream contentIS, DeploymentOption... options)
+ throws IOException;
/**
* Get the repository virtual file for the given deployment name.
More information about the jboss-cvs-commits
mailing list