View Javadoc

1   package org.telscenter.pas.otrunk.skeleton.controllers;
2   
3   import org.telscenter.pas.otrunk.skeleton.steps.OTHelloWorld;
4   import org.telscenter.pas.steps.HelloWorld;
5   
6   
7   public class OTHelloWorldController extends OTPasStepController {
8   
9   	public static Class[] realObjectClasses = { HelloWorld.class };
10  	public static Class otObjectClass = OTHelloWorld.class;
11  
12  	
13  	//TODO: do not define these
14  	public void loadRealObject(Object realObject) {
15  		super.loadRealObject(realObject);
16  
17  		HelloWorld helloWorld = (HelloWorld) realObject;
18  		OTHelloWorld otHelloWorld = (OTHelloWorld) otObject;
19  
20  		// FIXME use beanutils property mapper for all this
21  
22  		// property:message
23  		helloWorld.setMessage(otHelloWorld.getMessage());
24  		
25  		OTrunkRim<String> rim = 
26  			new OTrunkRim<String>("rim1", String.class, otHelloWorld);
27  		
28  		//property:workrim
29  		helloWorld.setWorkRim(rim);
30  	}
31  
32  	public void registerRealObject(Object arg0) {
33  		// TODO Auto-generated method stub
34  
35  	}
36  
37  	public void saveRealObject(Object realObject) {
38  		HelloWorld helloWorld = (HelloWorld) realObject;
39  		OTHelloWorld otHelloWorld = (OTHelloWorld) otObject;
40  		
41  		otHelloWorld.setMessage(helloWorld.getMessage());
42  	}
43  
44  }