Interface ICommandManager

All Superinterfaces:
IComponent, IComponentProvider, IInitializable, IRemoteCommandTransport, IURIResolver

public interface ICommandManager extends IComponentProvider, IRemoteCommandTransport
Enables a lookup of a Command
  • Method Details

    • getCommand

      ICommand getCommand(IContext context, String verb) throws BizException
      Gets the mechanics for a particular verb
      Parameters:
      context - the current user's context requesting the command
      verb - an arbitrary verb
      Returns:
      The appropriate ICommand or NULL if not found
      Throws:
      BizException
    • getCommand

      ICommand getCommand(IContext context, String verb, String type) throws BizException
      Gets the mechanics for a particular verb and type.
      Parameters:
      context - the current user's context requesting the command
      verb - an arbitrary verb
      type - describes the type of resource. May be Null
      Returns:
      The appropriate ICommand or NULL if not found
      Throws:
      BizException
    • getCommand

      ICommand getCommand(IContext context, String verb, IURI id) throws BizException
      Gets the command for a particular verb and resource id.
      Parameters:
      context - the current user's context requesting the command
      verb - an arbitrary verb
      id - uniquely describes this resource. Cannot be null
      Returns:
      The appropriate ICommand or NULL if not found
      Throws:
      BizException
    • invokeClusterCommand

      List<ICommandResponseEntry> invokeClusterCommand(IContext context, ICommand command, ICommandBean commandBean)
      Invoke a command on all live cluster nodes(except current one) Note, this will currently use the default IRemoteCommandTransport
      Parameters:
      context - the context to invoke the command
      command - which command to invoke
      commandBean - the args for the command
      Returns:
      - a list containing CommandResponseEntry objects. The list might be empty if no cluster nodes are live or there is no cluster.
    • checkAccess

      void checkAccess(IContext context, ICommand command) throws BizException
      Parameters:
      context -
      command -
      Throws:
      BizException
    • getRemoteCommandTransport

      IRemoteCommandTransport getRemoteCommandTransport(String name) throws BizException
      Gets the remote command transport that is registered under the specified name
      Parameters:
      name - the name of the component to lookup
      Returns:
      the found IRemoteCommandTransport or null if it can not be found.
      Throws:
      BizException