FileDocCategorySizeDatePackage
JBIShowCommands.javaAPI DocGlassfish v2 API5088Fri May 04 22:25:12 BST 2007com.sun.enterprise.cli.commands

JBIShowCommands

public class JBIShowCommands extends JBICommand
Will show information about a component, shared library or service assembly.
version
$Revision: 1.3 $

Fields Summary
private static final String
SHOW_BINDING_COMPONENT
private static final String
SHOW_SERVICE_ENGINE
private static final String
SHOW_SHARED_LIBRARY
private static final String
SHOW_SERVICE_ASSEMBLY
Constructors Summary
Methods Summary
public voidrunCommand()
A method that Executes the command

throws
CommandException


                   
         
    
        String result = "";
        try {

            // Perform the pre run initialization
            if (preRunInit())
            {
                // Retrieve the options used for this command
                String  targetName     = getOption(TARGET_OPTION);

                // Retrieve the operand "name"
                String  componentName = (String) getOperands().get(0);
                
                // Using the command name, we'll determine how to process the command
                if (name.equals(SHOW_BINDING_COMPONENT)) {
                    result = ((JBIAdminCommands) mJbiAdminCommands).showBindingComponent(
                        componentName,
                        "",
                        "",
                        "",
                        targetName);
                    processJBIAdminShowComponentResult(result,componentName);
                }

                else if (name.equals(SHOW_SERVICE_ENGINE)) {
                    result = ((JBIAdminCommands) mJbiAdminCommands).showServiceEngine(
                        componentName,
                        "",
                        "",
                        "",
                        targetName);
                    processJBIAdminShowComponentResult(result,componentName);
                }

                else if (name.equals(SHOW_SHARED_LIBRARY)) {
                    result = ((JBIAdminCommands) mJbiAdminCommands).showSharedLibrary(
                        componentName,
                        "",
                        targetName);
                    processJBIAdminShowLibraryResult(result,componentName);
                }

                else if (name.equals(SHOW_SERVICE_ASSEMBLY)) {
                    result = ((JBIAdminCommands) mJbiAdminCommands).showServiceAssembly(
                        componentName,
                        "",
                        "",
                        targetName);
                    processJBIAdminShowAssemblyResult(result,componentName);
                }
            }
        }

        catch (Exception e) {
            processTaskException(e);
        }