View Javadoc
1   /*
2    * Copyright (C) 2007-2012 Argeo GmbH
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *         http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.argeo.slc.lib.vbox;
17  
18  import org.argeo.slc.UnsupportedException;
19  import org.argeo.slc.build.Distribution;
20  import org.argeo.slc.deploy.DeployedSystem;
21  import org.argeo.slc.deploy.DeploymentData;
22  import org.argeo.slc.deploy.TargetData;
23  import org.springframework.beans.factory.BeanNameAware;
24  import org.springframework.beans.factory.InitializingBean;
25  
26  public class VBoxMachine implements DeployedSystem, BeanNameAware,
27  		InitializingBean {
28  	private String deployedSystemId = null;
29  	private String name;
30  	private String beanName;
31  
32  	public String getDeployedSystemId() {
33  		return deployedSystemId;
34  	}
35  
36  	public DeploymentData getDeploymentData() {
37  		throw new UnsupportedException();
38  	}
39  
40  	public Distribution getDistribution() {
41  		throw new UnsupportedException();
42  	}
43  
44  	public TargetData getTargetData() {
45  		throw new UnsupportedException();
46  	}
47  
48  	public String getName() {
49  		return name;
50  	}
51  
52  	public void setName(String name) {
53  		this.name = name;
54  	}
55  
56  	public void setDeployedSystemId(String deployedSystemId) {
57  		this.deployedSystemId = deployedSystemId;
58  	}
59  
60  	public void setBeanName(String beanName) {
61  		this.beanName = name;
62  	}
63  
64  	public void afterPropertiesSet() throws Exception {
65  		if (name == null)
66  			name = beanName;
67  	}
68  
69  }