View Javadoc

1   package org.telscenter.pas.otrunk.skeleton.controllers;
2   
3   import org.telscenter.pas.otrunk.skeleton.steps.OTAbstractUrlStep;
4   import org.telscenter.pas.otrunk.skeleton.steps.OTBrowseWeb;
5   import org.telscenter.pas.steps.AbstractUrlStep;
6   import org.telscenter.pas.steps.BrowseWeb;
7   
8   public class OTBrowseWebController extends OTAbstractUrlController {
9   
10  	public static Class[] realObjectClasses = { BrowseWeb.class };
11  	public static Class otObjectClass = OTBrowseWeb.class;
12  
13  	
14  	//TODO: do not define these
15  	public void loadRealObject(Object realObject) {
16  		super.loadRealObject(realObject);
17  
18  		BrowseWeb browseWeb = (BrowseWeb) realObject;
19  		OTBrowseWeb otBrowseWeb = (OTBrowseWeb) otObject;
20  
21  		// FIXME use beanutils property mapper for all this
22  
23  		// property:content
24  		browseWeb.setContent(otBrowseWeb.getContent());
25  		// property:navigation policy
26  		if( otBrowseWeb.getNavigationPolicy() != null ) 
27  			browseWeb.setNavigationPolicy(otBrowseWeb.getNavigationPolicy());
28  	}
29  
30  	public void registerRealObject(Object arg0) {
31  	}
32  
33  	public void saveRealObject(Object realObject) {
34  		super.saveRealObject(realObject);
35  		BrowseWeb browseWeb = (BrowseWeb) realObject;
36  		OTBrowseWeb otBrowseWeb = (OTBrowseWeb) otObject;
37  		
38  		otBrowseWeb.setContent(browseWeb.getContent());
39  		
40  		if( browseWeb.getNavigationPolicy() != null)
41  			otBrowseWeb.setNavigationPolicy(browseWeb.getNavigationPolicy());
42  
43  	}
44  
45  }