Package org.apache.webapp.admin

Examples of org.apache.webapp.admin.TreeControlNode


        throws Exception {
                             
        String domain = oname.getDomain();
        TreeControl control = (TreeControl) session.getAttribute("treeControlTest");
        if (control != null) {
            TreeControlNode parentNode = control.findNode(parentName);
            if (parentNode != null) {
                String type = "Context";
                String path = "";
                String host = "";
                String name = oname.getKeyProperty("name");
                if ((name != null) && (name.length() > 0)) {
                    name = name.substring(2);
                    int i = name.indexOf("/");
                    host = name.substring(0,i);
                    path = name.substring(i);
                }
                String nodeLabel =
                    resources.getMessage(locale, "server.service.treeBuilder.context") +
                    " (" + path + ")";
                String encodedName = URLEncoder.encode(oname.toString(),TomcatTreeBuilder.URL_ENCODING);
                TreeControlNode childNode =
                    new TreeControlNode(oname.toString(),
                                        "Context.gif",
                                        nodeLabel,
                                        "EditContext.do?select=" +
                                        encodedName,
                                        "content",
                                        true, domain);
                parentNode.addChild(childNode);
       
                // FIXME - force a redisplay
                TreeControlNode subtree = new TreeControlNode
                    ("Context Resource Administration " + containerName,
                    "folder_16_pad.gif",
                    resources.getMessage(locale, "resources.treeBuilder.subtreeNode"),
                    null,
                    "content",
                    true, domain);       
                childNode.addChild(subtree);
                TreeControlNode datasources = new TreeControlNode
                    ("Context Data Sources " + containerName,
                    "Datasource.gif",
                    resources.getMessage(locale, "resources.treeBuilder.datasources"),
                    "resources/listDataSources.do?resourcetype=" +
                    URLEncoder.encode(type,TomcatTreeBuilder.URL_ENCODING) + "&path=" +
                    URLEncoder.encode(path,TomcatTreeBuilder.URL_ENCODING) + "&host=" +
                    URLEncoder.encode(host,TomcatTreeBuilder.URL_ENCODING) + "&forward=" +
                    URLEncoder.encode("DataSources List Setup",TomcatTreeBuilder.URL_ENCODING),
                    "content",
                    false, domain);
                TreeControlNode mailsessions = new TreeControlNode
                    ("Context Mail Sessions " + containerName,
                    "Mailsession.gif",
                    resources.getMessage(locale, "resources.treeBuilder.mailsessions"),
                    "resources/listMailSessions.do?resourcetype=" +
                    URLEncoder.encode(type,TomcatTreeBuilder.URL_ENCODING) + "&path=" +
                    URLEncoder.encode(path,TomcatTreeBuilder.URL_ENCODING) + "&host=" +
                    URLEncoder.encode(host,TomcatTreeBuilder.URL_ENCODING) + "&forward=" +
                    URLEncoder.encode("MailSessions List Setup",TomcatTreeBuilder.URL_ENCODING),
                    "content",
                    false, domain);
                TreeControlNode resourcelinks = new TreeControlNode
                    ("Resource Links " + containerName,
                    "ResourceLink.gif",
                    resources.getMessage(locale, "resources.treeBuilder.resourcelinks"),
                    "resources/listResourceLinks.do?resourcetype=" +
                    URLEncoder.encode(type,TomcatTreeBuilder.URL_ENCODING) + "&path=" +
                    URLEncoder.encode(path,TomcatTreeBuilder.URL_ENCODING) + "&host=" +
                    URLEncoder.encode(host,TomcatTreeBuilder.URL_ENCODING) + "&forward=" +
                    URLEncoder.encode("ResourceLinks List Setup",TomcatTreeBuilder.URL_ENCODING),
                    "content",
                    false, domain);
                TreeControlNode envs = new TreeControlNode
                    ("Context Environment Entries "+ containerName,
                    "EnvironmentEntries.gif",
                    resources.getMessage(locale ,"resources.env.entries"),
                    "resources/listEnvEntries.do?resourcetype=" +
                    URLEncoder.encode(type,TomcatTreeBuilder.URL_ENCODING) + "&path=" +
View Full Code Here


                session.getAttribute("treeControlTest");
               
            // Look up our MBeanFactory MBean
            ObjectName fname = null;
            String domain = null;
            TreeControlNode node = null;

            // Remove the specified connectors
            for (int i = 0; i < connectors.length; i++) {
                values[0] = connectors[i];
                if (control != null) {
                    control.selectNode(null);
                    node = control.findNode(connectors[i]);
                    domain = node.getDomain();
                    // Look up our MBeanFactory MBean
                    fname = TomcatTreeBuilder.getMBeanFactory();
                    mBServer.invoke(fname, operation,
                                values, removeConnectorTypes);
                    if (node != null) {
                        node.remove();
                    } else {
                        getServlet().log("Missing TreeControlNode for " +
                                         connectors[i]);
                    }
                } else {
View Full Code Here

                TreeControl control = (TreeControl)
                    session.getAttribute("treeControlTest");
                if (control != null) {
                    String parentName = TomcatTreeBuilder.DEFAULT_DOMAIN +
                                            TomcatTreeBuilder.SERVER_TYPE;
                    TreeControlNode parentNode = control.findNode(parentName);
                    if (parentNode != null) {
                        String nodeLabel = resources.getMessage(locale,
                            "server.service.treeBuilder.subtreeNode") +" (" +
                            soname.getKeyProperty("serviceName") + ")";
                        String encodedName =
                            URLEncoder.encode(sObjectName,TomcatTreeBuilder.URL_ENCODING);
                        TreeControlNode childNode =
                            new TreeControlNode(sObjectName,
                                                "Service.gif",
                                                nodeLabel,
                                                "EditService.do?select=" +
                                                encodedName,
                                                "content",
View Full Code Here

                // Add the new Connector to our tree control node
                TreeControl control = (TreeControl)
                    session.getAttribute("treeControlTest");
                if (control != null) {
                    String parentName = serviceName;
                    TreeControlNode parentNode = control.findNode(parentName);
                    if (parentNode != null) {
                        String nodeLabel = resources.getMessage(locale,
                            "server.service.treeBuilder.connector") + " (" +
                            cform.getPortText() + ")";
                        String encodedName =
                            URLEncoder.encode(cObjectName,TomcatTreeBuilder.URL_ENCODING);
                        TreeControlNode childNode =
                            new TreeControlNode(cObjectName,
                                                "Connector.gif",
                                                nodeLabel,
                                                "EditConnector.do?select=" +
                                                encodedName,
                                                "content",
View Full Code Here

                        TomcatTreeBuilder.getMBeanFactory();
                mBServer.invoke(fname, operation,
                                values, removeServiceTypes);
                if (control != null) {
                    control.selectNode(null);
                    TreeControlNode node = control.findNode(services[i]);
                    if (node != null) {
                        node.remove();
                    } else {
                        getServlet().log("Missing TreeControlNode for " +
                                         services[i]);
                    }
                } else {
View Full Code Here

        try {
            String databaseName = URLEncoder.encode
                ("Users:type=UserDatabase,database=UserDatabase",TomcatTreeBuilder.URL_ENCODING);

            TreeControlNode subtree = new TreeControlNode
                ("Global User and Group Administration",
                 "folder_16_pad.gif",
                 resources.getMessage(locale, "users.treeBuilder.subtreeNode"),
                 null,
                 "content",
                 true, "Users");
            TreeControlNode groups = new TreeControlNode
                ("Global Administer Groups",
                 "Groups.gif",
                 resources.getMessage(locale, "users.treeBuilder.groupsNode"),
                 "users/listGroups.do?databaseName=" +
                 URLEncoder.encode(databaseName,TomcatTreeBuilder.URL_ENCODING) +
                 "&forward=" +
                 URLEncoder.encode("Groups List Setup",TomcatTreeBuilder.URL_ENCODING),
                 "content",
                 false, "Users");
            TreeControlNode roles = new TreeControlNode
                ("Global Administer Roles",
                 "Roles.gif",
                 resources.getMessage(locale, "users.treeBuilder.rolesNode"),
                 "users/listRoles.do?databaseName=" +
                 URLEncoder.encode(databaseName,TomcatTreeBuilder.URL_ENCODING) +
                 "&forward=" +
                 URLEncoder.encode("Roles List Setup",TomcatTreeBuilder.URL_ENCODING),
                 "content",
                 false, "Users");
            TreeControlNode users = new TreeControlNode
                ("Global Administer Users",
                 "Users.gif",
                 resources.getMessage(locale, "users.treeBuilder.usersNode"),
                 "users/listUsers.do?databaseName=" +
                 URLEncoder.encode(databaseName,TomcatTreeBuilder.URL_ENCODING) +
View Full Code Here

                ObjectName fname = TomcatTreeBuilder.getMBeanFactory();
                mBServer.invoke(fname, operation,
                                values, removeValveTypes);
                if (control != null) {
                    control.selectNode(null);
                    TreeControlNode node = control.findNode(valves[i]);
                    if (node != null) {
                        node.remove();
                    } else {
                        getServlet().log("Missing TreeControlNode for " +
                                         valves[i]);
                    }
                } else {
View Full Code Here

           
            // Add the new Valve to our tree control node
            TreeControl control = (TreeControl)
            session.getAttribute("treeControlTest");
            if (control != null) {
                TreeControlNode parentNode = control.findNode(parentNodeName);
                if (parentNode != null) {
                    String nodeLabel =
                    "Valve for " + parentNode.getLabel();
                    String encodedName =
                    URLEncoder.encode(vObjectName,TomcatTreeBuilder.URL_ENCODING);
                    TreeControlNode childNode =
                    new TreeControlNode(vObjectName,
                    "Valve.gif",
                    nodeLabel,
                    "EditValve.do?select=" + encodedName +
                    "&nodeLabel=" + URLEncoder.encode(nodeLabel,TomcatTreeBuilder.URL_ENCODING) +
                    "&parent=" + URLEncoder.encode(parentNodeName,TomcatTreeBuilder.URL_ENCODING),
View Full Code Here

            for (int i = 0; i < hosts.length; i++) {
                values[0] = hosts[i];
                getServlet().log("remove host " + hosts[i]);
                if (control != null) {
                    control.selectNode(null);
                    TreeControlNode node = control.findNode(hosts[i]);
                    String domain = node.getDomain();
                    ObjectName fname = TomcatTreeBuilder.getMBeanFactory();
                    mBServer.invoke(fname, operation,
                                values, removeHostTypes);
                    if (node != null) {
                        node.remove();
                    } else {
                        getServlet().log("Missing TreeControlNode for " +
                                         hosts[i]);
                    }
                } else {
View Full Code Here

                // Add the new Host to our tree control node
                TreeControl control = (TreeControl)
                    session.getAttribute("treeControlTest");
                if (control != null) {
                    String parentName = serviceName;
                    TreeControlNode parentNode = control.findNode(parentName);
                    if (parentNode != null) {
                        String nodeLabel =
                            resources.getMessage(locale, "server.service.treeBuilder.host") +
                            " (" + hform.getHostName() + ")";
                        String encodedName =
                            URLEncoder.encode(hObjectName,TomcatTreeBuilder.URL_ENCODING);
                        TreeControlNode childNode =
                            new TreeControlNode(hObjectName,
                                                "Host.gif",
                                                nodeLabel,
                                                "EditHost.do?select=" +
                                                encodedName,
                                                "content",
View Full Code Here

TOP

Related Classes of org.apache.webapp.admin.TreeControlNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.