01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */package org.apache.openejb.config;
17:
18: import java.io.File;
19: import java.net.URI;
20: import java.util.Collections;
21: import java.util.Properties;
22: import java.util.Set;
23:
24: /**
25: * @version $Rev: 602718 $ $Date: 2007-12-09 11:06:11 -0800 $
26: */
27: public class DeploymentImpl implements Deployment {
28: private final URI uri;
29: private final String user;
30: private final String password;
31: private final Properties properties = new Properties();
32:
33: public DeploymentImpl(URI uri, String user, String password) {
34: this .uri = uri;
35: this .user = user;
36: this .password = password;
37: }
38:
39: public URI getUri() {
40: return uri;
41: }
42:
43: public String getUser() {
44: return user;
45: }
46:
47: public String getPassword() {
48: return password;
49: }
50:
51: public void release() {
52: }
53:
54: public Properties getProperties() {
55: return properties;
56: }
57:
58: public Set<String> list(String type, String state,
59: Set<String> targets) throws DeploymentException {
60: return Collections.emptySet();
61: }
62:
63: public Set<String> deploy(Set<String> targets, File file)
64: throws DeploymentException {
65: return Collections.emptySet();
66: }
67:
68: public Set<String> start(Set<String> modules)
69: throws DeploymentException {
70: return modules;
71: }
72:
73: public Set<String> stop(Set<String> modules)
74: throws DeploymentException {
75: return modules;
76: }
77:
78: public Set<String> restart(Set<String> modules)
79: throws DeploymentException {
80: return modules;
81: }
82:
83: public Set<String> undeploy(Set<String> modules)
84: throws DeploymentException {
85: return modules;
86: }
87:
88: public static class DeploymentFactoryImpl implements
89: DeploymentFactory {
90: public Deployment createDeployment(URI uri, String user,
91: String password) {
92: return new DeploymentImpl(uri, user, password);
93: }
94: }
95: }
|