1 23 24 package org.infoglue.cms.applications.structuretool.actions; 25 26 import org.infoglue.cms.applications.common.actions.TreeViewAbstractAction; 27 import org.infoglue.cms.exception.SystemException; 28 import org.infoglue.cms.treeservice.ss.SiteNodeNodeSupplier; 29 import org.infoglue.cms.util.CmsPropertyHandler; 30 31 import com.frovi.ss.Tree.BaseNode; 32 import com.frovi.ss.Tree.INodeSupplier; 33 34 public class ViewStructureToolMenuHtmlAction extends TreeViewAbstractAction 35 { 36 private static final long serialVersionUID = 1L; 37 38 private Integer repositoryId; 39 private Integer select; 40 private String treeMode = "classic"; 41 private BaseNode rootNode = null; 42 43 public String doBindingView() throws Exception 44 { 45 super.doExecute(); 46 47 return "bindingView"; 48 } 49 50 53 protected INodeSupplier getNodeSupplier() throws Exception , SystemException 54 { 55 String treeMode = CmsPropertyHandler.getTreeMode(); 56 if(treeMode != null) setTreeMode(treeMode); 57 SiteNodeNodeSupplier sup = new SiteNodeNodeSupplier(getRepositoryId(), this.getInfoGluePrincipal()); 58 rootNode = sup.getRootNode(); 59 60 if(this.repositoryId != null && this.repositoryId.intValue() > -1) 61 return sup; 62 else 63 return null; 64 } 65 66 70 public Integer getRepositoryId() 71 { 72 return repositoryId; 73 } 74 75 79 public void setRepositoryId(Integer repositoryId) 80 { 81 this.repositoryId = repositoryId; 82 } 83 84 88 public Integer getSelect() 89 { 90 return select; 91 } 92 93 97 public void setSelect(Integer select) 98 { 99 this.select = select; 100 } 101 102 public String getTreeMode() { 103 return treeMode; 104 } 105 public void setTreeMode(String treeMode) { 106 this.treeMode = treeMode; 107 } 108 public BaseNode getRootNode() { 109 return rootNode; 110 } 111 public void setRootNode(BaseNode rootNode) { 112 this.rootNode = rootNode; 113 } 114 } 115 | Popular Tags |