Package org.cytoscape.command
Interface AvailableCommands
-
public interface AvailableCommands
TODO: Missing documentationModule:
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 Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description String
getArgDescription(String namespace, String command, String argument)
Returns the value of the description field for this argument.String
getArgExampleStringValue(String namespace, String command, String argument)
Returns the value of the defaultStringValue field for this argument.String
getArgLongDescription(String namespace, String command, String argument)
Returns the value of the longDescription field for this argument.boolean
getArgRequired(String namespace, String command, String argument)
Returns the value of the required field for this argument.String
getArgTooltip(String namespace, String command, String argument)
Returns the value of the tooltip field for this argument.Class<?>
getArgType(String namespace, String command, String argument)
Returns the type of the argument.String
getArgTypeString(String namespace, String command, String argument)
Returns a human-readable string for this argument of the form: argument=<type>List<String>
getArguments(String namespace, String command)
Returns a list of arguments for the specified namespace and command in alphabetical order.Object
getArgValue(String namespace, String command, String argument)
Deprecated.List<String>
getCommands(String namespace)
Returns a list of available commands in alphabetical order for the specified namespace.String
getDescription(String namespace, String command)
Returns the description of the specified command in the specified namespace.String
getExampleJSON(String namespace, String command)
Returns a valid JSON string representative of the expected JSON output of the command.String
getLongDescription(String namespace, String command)
Returns the longDescription of the specified command in the specified namespace.List<String>
getNamespaces()
Returns a list of available command namespaces in alphabetical order.boolean
getSupportsJSON(String namespace, String command)
Returns true if the command is expected to provide JSON output.
-
-
-
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 commandcommand
- The command within the specified namespace- Returns:
- true if the command supports JSON output.
-
-