1 23 24 package org.infoglue.cms.treeservice.ss; 25 26 import java.util.ArrayList ; 27 import java.util.Collection ; 28 29 import org.infoglue.cms.exception.SystemException; 30 31 import com.frovi.ss.Tree.BaseNodeSupplier; 32 33 41 public class ManagementToolNodeSupplier extends BaseNodeSupplier 42 { 43 44 private boolean showLeafs = true; 45 46 public ManagementToolNodeSupplier(Integer repositoryId) throws SystemException 47 { 48 if (repositoryId.intValue() == 0) 49 setRootNode(new ManagementNodeImpl(repositoryId,"root", "ViewManagementToolStartPage.action")); 50 else 51 setRootNode(new ManagementNodeImpl(repositoryId,"root", "ViewRepository.action?repositoryId=" + repositoryId)); 52 } 53 54 57 public boolean hasChildren() 58 { 59 if (showLeafs) 60 return false; 61 else 62 return true; 63 } 64 65 68 public Collection getChildContainerNodes(Integer parentNode) 69 { 70 int cnt = 1; 71 ArrayList r = new ArrayList (); 72 ManagementNodeImpl node; 73 74 if (parentNode.intValue() == 0) 75 { 76 r.add(new ManagementNodeImpl(cnt++, "Repositories", "ViewListRepository.action?title=Repositories")); 77 r.add(new ManagementNodeImpl(cnt++, "SystemUsers", "ViewListSystemUser.action?title=SystemUsers")); 78 r.add(new ManagementNodeImpl(cnt++, "Roles", "ViewListRole.action?title=Roles")); 79 r.add(new ManagementNodeImpl(cnt++, "Groups", "ViewListGroup.action?title=Groups")); 80 87 r.add(new ManagementNodeImpl(cnt++, "Languages", "ViewListLanguage.action?title=Languages")); 88 r.add(new ManagementNodeImpl(cnt++, "InterceptionPoints", "ViewListInterceptionPoint.action?title=InterceptionPoints")); 90 r.add(new ManagementNodeImpl(cnt++, "Interceptors", "ViewListInterceptor.action?title=Interceptors")); 91 r.add(new ManagementNodeImpl(cnt++, "ServiceDefinitions", "ViewListServiceDefinition.action?title=ServiceDefinitions")); 92 r.add(new ManagementNodeImpl(cnt++, "AvailableServiceBindings", "ViewListAvailableServiceBinding.action?title=AvailableServiceBindings")); 93 r.add(new ManagementNodeImpl(cnt++, "SiteNodeTypeDefinitions", "ViewListSiteNodeTypeDefinition.action?title=SiteNodeTypeDefinitions")); 94 r.add(new ManagementNodeImpl(cnt++, "Categories", "CategoryManagement!list.action?title=ContentCategories")); 95 r.add(new ManagementNodeImpl(cnt++, "ContentTypeDefinitions", "ViewListContentTypeDefinition.action?title=ContentTypeDefinitions")); 96 r.add(new ManagementNodeImpl(cnt++, "Up2Date", "ViewListUp2Date.action?title=InfoGlue Up2Date")); 99 r.add(new ManagementNodeImpl(cnt++, "Validation", "InstallationValidator!input.action?title=Validation")); 100 r.add(new ManagementNodeImpl(cnt++, "Workflows", "ViewListWorkflowDefinition.action")); 101 r.add(new ManagementNodeImpl(cnt++, "Portlets", "ViewListPortlet.action")); 102 r.add(new ManagementNodeImpl(cnt++, "Redirects", "ViewListRedirect.action")); 103 r.add(new ManagementNodeImpl(cnt++, "Application settings", "ViewListServerNode.action")); 104 r.add(new ManagementNodeImpl(cnt++, "Message center", "ViewMessageCenter.action")); 105 r.add(new ManagementNodeImpl(cnt++, "Diagnostics and status", "ViewDiagnosticCenter.action")); 106 } 107 114 else 115 { 116 r.add(new ManagementNodeImpl(cnt++, "Permissions", "ViewAccessRights.action?interceptionPointCategory=Repository&extraParameters=" + parentNode +"&colorScheme=ManagementTool&returnAddress=ViewRepositoryOverview.action?repositoryId=" + parentNode)); 118 r.add(new ManagementNodeImpl(cnt++, "Languages", "ViewListRepositoryLanguage.action?repositoryId=" + parentNode + "&title=Languages")); 119 } 120 121 return r; 122 } 123 124 127 public Collection getChildLeafNodes(Integer parentNode) 128 { 129 ArrayList ret = new ArrayList (); 130 return ret; 131 } 132 133 137 189 } 190 | Popular Tags |