1 25 26 package org.objectweb.jonas.webapp.jonasadmin.security; 27 28 import javax.management.ObjectName ; 29 30 import org.objectweb.jonas.jmx.J2eeObjectName; 31 import org.objectweb.jonas.webapp.jonasadmin.JonasTreeBuilder; 32 import org.objectweb.jonas.webapp.jonasadmin.WhereAreYou; 33 import org.objectweb.jonas.webapp.jonasadmin.deploy.BaseDeployAction; 34 import org.objectweb.jonas.webapp.taglib.TreeControl; 35 import org.objectweb.jonas.webapp.taglib.TreeControlNode; 36 37 40 41 abstract public class BaseSecurityAction extends BaseDeployAction { 42 43 45 50 protected void refreshTree() 51 throws Exception { 52 refreshSecurityTree(); 54 refreshMBeansTree(); 56 m_WhereAreYou.setTreeToRefresh(true); 58 } 59 60 65 protected void refreshSecurityTree() 66 throws Exception { 67 String sCurrentNodeNameItem = 69 m_WhereAreYou.getCurrentDomainName() + WhereAreYou.NODE_SEPARATOR + 70 m_WhereAreYou.getCurrentJonasServerName() + WhereAreYou.NODE_SEPARATOR + 71 "security"; 72 TreeControl oControl = m_WhereAreYou.getTreeControl(); 74 TreeControlNode oBranchRootNode = oControl.findNode(sCurrentNodeNameItem); 76 oControl.enableAutoRefresh(); 78 TreeControlNode[] aoNodes = oBranchRootNode.findChildren(); 80 for (int i = 0; i < aoNodes.length; i++) { 81 aoNodes[i].remove(); 82 } 83 JonasTreeBuilder oBuilder = new JonasTreeBuilder(); 85 oBuilder.getSecurityFactories(oBranchRootNode, m_Resources); 86 oControl.disableAutoRefresh(); 88 } 89 } 90 | Popular Tags |