Interface AvailableCommands


  • public interface AvailableCommands
    TODO: Missing documentation

    Module: command-executor-api

    To use this in your app, include the following dependency in your POM:

    <dependency>
        <groupId>org.cytoscape</groupId>
        <artifactId>command-executor-api</artifactId>
    </dependency>

    Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
    • Method Detail

      • getNamespaces

        List<String> getNamespaces()
        Returns a list of available command namespaces in alphabetical order.
        Returns:
        A list of available command namespaces in alphabetical order.
      • getCommands

        List<String> getCommands​(String namespace)
        Returns a list of available commands in alphabetical order for the specified namespace.
        Parameters:
        namespace - The namespace whose available commands we want to know about.
        Returns:
        a list of available commands in alphabetical order for the specified namespace.
      • getDescription

        String getDescription​(String namespace,
                              String command)
        Returns the description of the specified command in the specified namespace.
        Parameters:
        namespace - The namespace for the command whose description we want to know about.
        command - The command within the specified namespace whose description we want to know about.
        Returns:
        The description of the specified namespace and command.
      • getLongDescription

        String getLongDescription​(String namespace,
                                  String command)
        Returns the longDescription of the specified command in the specified namespace.
        Parameters:
        namespace - The namespace for the command whose longDescription we want to know about.
        command - The command within the specified namespace whose longDescription we want to know about.
        Returns:
        The longDescription of the specified namespace and command.
      • getArguments

        List<String> getArguments​(String namespace,
                                  String command)
        Returns a list of arguments for the specified namespace and command in alphabetical order.
        Parameters:
        namespace - The namespace for the command whose arguments we want to know about.
        command - The command within the specified namespace whose arguments we want to know about.
        Returns:
        a list of arguments for the specified namespace and command in alphabetical order.
      • getArgRequired

        boolean getArgRequired​(String namespace,
                               String command,
                               String argument)
        Returns the value of the required field for this argument.
        Parameters:
        namespace - The namespace for the command whose argument we want to know about.
        command - The command within the specified namespace whose argument we want to know about.
        argument - The argument we want to know about
        Returns:
        true if this argument is required, false otherwise
      • getArgTooltip

        String getArgTooltip​(String namespace,
                             String command,
                             String argument)
        Returns the value of the tooltip field for this argument.
        Parameters:
        namespace - The namespace for the command whose argument we want to know about.
        command - The command within the specified namespace whose argument we want to know about.
        argument - The argument we want to know about
        Returns:
        the tooltip if one is provided, null otherwise
      • getArgDescription

        String getArgDescription​(String namespace,
                                 String command,
                                 String argument)
        Returns the value of the description field for this argument.
        Parameters:
        namespace - The namespace for the command whose argument we want to know about.
        command - The command within the specified namespace whose argument we want to know about.
        argument - The argument we want to know about
        Returns:
        the description if one is provided, null otherwise
      • getArgLongDescription

        String getArgLongDescription​(String namespace,
                                     String command,
                                     String argument)
        Returns the value of the longDescription field for this argument.
        Parameters:
        namespace - The namespace for the command whose argument we want to know about.
        command - The command within the specified namespace whose argument we want to know about.
        argument - The argument we want to know about
        Returns:
        the longDescription if one is provided, null otherwise
      • getArgExampleStringValue

        String getArgExampleStringValue​(String namespace,
                                        String command,
                                        String argument)
        Returns the value of the defaultStringValue field for this argument.
        Parameters:
        namespace - The namespace for the command whose argument we want to know about.
        command - The command within the specified namespace whose argument we want to know about.
        argument - The argument we want to know about
        Returns:
        the defaultStringValue if one is provided, null otherwise
      • getArgType

        Class<?> getArgType​(String namespace,
                            String command,
                            String argument)
        Returns the type of the argument.
        Parameters:
        namespace - The namespace for the command whose argument we want to know about.
        command - The command within the specified namespace whose argument we want to know about.
        argument - The argument we want to know about
        Returns:
        the type of the argument or null if the argument doesn't exist
      • getArgValue

        @Deprecated
        Object getArgValue​(String namespace,
                           String command,
                           String argument)
        Deprecated.
        Returns the value of the argument. NOTE: This method has been deprecated since it rarely, if ever, returns the current value of an argument due to cacheing in both the AvailableCommands and TunableInterceptor implementations.
        Parameters:
        namespace - The namespace for the command whose argument we want to know about.
        command - The command within the specified namespace whose argument we want to know about.
        argument - The argument we want to know about
        Returns:
        the current value of the argument or null if the argument doesn't exist
      • getArgTypeString

        String getArgTypeString​(String namespace,
                                String command,
                                String argument)
        Returns a human-readable string for this argument of the form: argument=<type>
        Parameters:
        namespace - The namespace for the command whose argument we want to know about.
        command - The command within the specified namespace whose argument we want to know about.
        argument - The argument we want to know about
        Returns:
        the formatted string
      • getSupportsJSON

        boolean getSupportsJSON​(String namespace,
                                String command)
        Returns true if the command is expected to provide JSON output.
        Parameters:
        namespace - The namespace of the command
        command - The command within the specified namespace
        Returns:
        true if the command supports JSON output.
      • getExampleJSON

        String getExampleJSON​(String namespace,
                              String command)
        Returns a valid JSON string representative of the expected JSON output of the command.
        Parameters:
        namespace - The namespace of the command
        command - The command within the specified namespace
        Returns:
        a valid JSON string.