geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject svn commit: rev 47318 - in geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin: . factories
Date Mon, 27 Sep 2004 17:36:30 GMT
Author: jboynes
Date: Mon Sep 27 10:36:27 2004
New Revision: 47318

Added:
   geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/DisconnectedDeploymentManager.java
Removed:
   geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/DeploymentManagerImpl.java
   geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/DeploymentServer.java
   geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/DisconnectedServer.java
Modified:
   geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/factories/DeploymentFactoryImpl.java
Log:
provide dummy DeploymentManager for disconnected use; tidy up some old cruft

Added: geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/DisconnectedDeploymentManager.java
==============================================================================
--- (empty file)
+++ geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/DisconnectedDeploymentManager.java
Mon Sep 27 10:36:27 2004
@@ -0,0 +1,133 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.deployment.plugin;
+
+import javax.enterprise.deploy.spi.DeploymentManager;
+import javax.enterprise.deploy.spi.DeploymentConfiguration;
+import javax.enterprise.deploy.spi.Target;
+import javax.enterprise.deploy.spi.TargetModuleID;
+import javax.enterprise.deploy.spi.status.ProgressObject;
+import javax.enterprise.deploy.spi.exceptions.InvalidModuleException;
+import javax.enterprise.deploy.spi.exceptions.DConfigBeanVersionUnsupportedException;
+import javax.enterprise.deploy.spi.exceptions.TargetException;
+import javax.enterprise.deploy.model.DeployableObject;
+import javax.enterprise.deploy.shared.DConfigBeanVersionType;
+import javax.enterprise.deploy.shared.ModuleType;
+import java.util.Locale;
+import java.io.File;
+import java.io.InputStream;
+
+/**
+ * Implementation of a disconnected JSR88 DeploymentManager.
+ *
+ *
+ * @version $Rev: 46019 $ $Date: 2004-09-14 02:56:06 -0700 (Tue, 14 Sep 2004) $
+ */
+public class DisconnectedDeploymentManager implements DeploymentManager {
+
+    public DeploymentConfiguration createConfiguration(DeployableObject dObj) throws InvalidModuleException
{
+        throw new InvalidModuleException("Not supported");
+    }
+
+    public Locale[] getSupportedLocales() {
+        return new Locale[]{getDefaultLocale()};
+    }
+
+    public Locale getCurrentLocale() {
+        return getDefaultLocale();
+    }
+
+    public Locale getDefaultLocale() {
+        return Locale.getDefault();
+    }
+
+    public boolean isLocaleSupported(Locale locale) {
+        return getDefaultLocale().equals(locale);
+    }
+
+    public void setLocale(Locale locale) {
+        if (isLocaleSupported(locale)) {
+            throw new UnsupportedOperationException("Unsupported Locale");
+        }
+    }
+
+    public DConfigBeanVersionType getDConfigBeanVersion() {
+        return DConfigBeanVersionType.V1_4;
+    }
+
+    public boolean isDConfigBeanVersionSupported(DConfigBeanVersionType version) {
+        return DConfigBeanVersionType.V1_4.equals(version);
+    }
+
+    public void setDConfigBeanVersion(DConfigBeanVersionType version) throws DConfigBeanVersionUnsupportedException
{
+        if (!isDConfigBeanVersionSupported(version)) {
+            throw new DConfigBeanVersionUnsupportedException("Version not supported " + version);
+        }
+    }
+
+    public Target[] getTargets() throws IllegalStateException {
+        throw new IllegalStateException("Disconnected");
+    }
+
+    public TargetModuleID[] getRunningModules(ModuleType moduleType, Target[] targets) throws
TargetException, IllegalStateException {
+        throw new IllegalStateException("Disconnected");
+    }
+
+    public TargetModuleID[] getNonRunningModules(ModuleType moduleType, Target[] targets)
throws TargetException, IllegalStateException {
+        throw new IllegalStateException("Disconnected");
+    }
+
+    public TargetModuleID[] getAvailableModules(ModuleType moduleType, Target[] targets)
throws TargetException, IllegalStateException {
+        throw new IllegalStateException("Disconnected");
+    }
+
+    public ProgressObject distribute(Target[] targets, File file, File file1) throws IllegalStateException
{
+        throw new IllegalStateException("Disconnected");
+    }
+
+    public ProgressObject distribute(Target[] targets, InputStream inputStream, InputStream
inputStream1) throws IllegalStateException {
+        throw new IllegalStateException("Disconnected");
+    }
+
+    public ProgressObject start(TargetModuleID[] targetModuleIDs) throws IllegalStateException
{
+        throw new IllegalStateException("Disconnected");
+    }
+
+    public ProgressObject stop(TargetModuleID[] targetModuleIDs) throws IllegalStateException
{
+        throw new IllegalStateException("Disconnected");
+    }
+
+    public ProgressObject undeploy(TargetModuleID[] targetModuleIDs) throws IllegalStateException
{
+        throw new IllegalStateException("Disconnected");
+    }
+
+    public boolean isRedeploySupported() {
+        return false;
+    }
+
+    public ProgressObject redeploy(TargetModuleID[] targetModuleIDs, File file, File file1)
throws UnsupportedOperationException, IllegalStateException {
+        throw new IllegalStateException("Disconnected");
+    }
+
+    public ProgressObject redeploy(TargetModuleID[] targetModuleIDs, InputStream inputStream,
InputStream inputStream1) throws UnsupportedOperationException, IllegalStateException {
+        throw new IllegalStateException("Disconnected");
+    }
+
+    public void release() {
+        throw new IllegalStateException("Disconnected");
+    }
+}

Modified: geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/factories/DeploymentFactoryImpl.java
==============================================================================
--- geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/factories/DeploymentFactoryImpl.java
(original)
+++ geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/factories/DeploymentFactoryImpl.java
Mon Sep 27 10:36:27 2004
@@ -29,6 +29,7 @@
 import javax.management.remote.JMXServiceURL;
 
 import org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager;
+import org.apache.geronimo.deployment.plugin.DisconnectedDeploymentManager;
 
 /**
  * Implementation of JSR88 DeploymentFactory.
@@ -59,7 +60,7 @@
             return null;
         }
 
-        throw new DeploymentManagerCreationException("Not supported");
+        return new DisconnectedDeploymentManager();
     }
 
     public DeploymentManager getDeploymentManager(String uri, String username, String password)
throws DeploymentManagerCreationException {

Mime
View raw message