alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

/*
 *                 Sun Public License Notice
 * 
 * The contents of this file are subject to the Sun Public License
 * Version 1.0 (the "License"). You may not use this file except in
 * compliance with the License. A copy of the License is available at
 * http://www.sun.com/
 * 
 * The Original Code is NetBeans. The Initial Developer of the Original
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun
 * Microsystems, Inc. All Rights Reserved.
 */


package org.netbeans.web.test.nodes;

import org.netbeans.jellytools.nodes.*;
import org.netbeans.web.test.actions.*;

import javax.swing.tree.TreePath;
import org.netbeans.jellytools.*;
import org.netbeans.jellytools.nodes.Node;
import org.netbeans.jellytools.actions.*;
import org.netbeans.jemmy.operators.JTreeOperator;

/** Node representing Java source */
public class TomcatNode extends Node {
    
    /* This method should be used  for the internal installation of Tomcat Server */

    public static TomcatNode getInternal() {
        String msg1 = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.ui.Bundle","SERVER_REGISTRY_NODE_NAME"); //Server
        String msg2 = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.ui.Bundle","INSTALLED_SERVERS_NODE_NAME"); //Installed
        String msg3 = Bundle.getStringTrimmed("org.netbeans.modules.tomcat.tomcat40.Bundle","LBL_Tomcat40");//Tomcat 4.0
        String msg4 = Bundle.getStringTrimmed("org.netbeans.modules.tomcat.tomcat40.Bundle","LBL_InternalInstallation");//Internal
        String fullString = msg1 + "|" + msg2 + "|" + msg3 + "|" + msg4;
        return new TomcatNode(fullString);
    }

    public TomcatNode(String treePath) {
       super(new RuntimeTabOperator().tree(), treePath);
    }

    public TomcatNode(JTreeOperator treeOperator, String treePath) {
       super(treeOperator, treePath);
    }

    public TomcatNode(Node parent, String treeSubPath) {
       super(parent, treeSubPath);
    }

    public TomcatNode(JTreeOperator treeOperator, TreePath path) {
       super(treeOperator, path);
    }

    static final ConfigureServerAction configureServerAction = new ConfigureServerAction();
    static final AddNewHostAction addNewHostAction = new AddNewHostAction();
    static final ViewLogFileAction viewLogFileAction = new ViewLogFileAction();
    static final StartServerAction startServerAction = new StartServerAction();
    static final RestartServerAction restartServerAction = new RestartServerAction();
    static final StopServerAction stopServerAction = new StopServerAction();
    static final RemoveInstallationAction removeInstallationAction = new RemoveInstallationAction();
    static final PropertiesAction propertiesAction = new PropertiesAction();
    
    /** performs ConfigureServerAction with this node */    
    public void configure() {
        configureServerAction.perform(this);
    }

    /** performs AddNewHostAction with this node */    
    public void addNewHost() {
        addNewHostAction.perform(this);
    }

    /** performs ViewLogFileAction with this node */    
    public void viewLog() {
        viewLogFileAction.perform(this);
    }

    /** performs StartServerAction with this node */    
    public void start() {
        startServerAction.perform(this);
    }

    /** performs RestartServerAction with this node */    
    public void restart() {
        restartServerAction.perform(this);
    }

    /** performs StopServerAction with this node */    
    public void stop() {
        stopServerAction.perform(this);
    }

    /** performs RemoveInstallationAction with this node */    
    public void remove() {
        removeInstallationAction.perform(this);
    }

    /** performs PropertiesAction with this node */    
    public void properties() {
        propertiesAction.perform(this);
    }

}
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.