GetAvailableCommands method (LLMReq - Java)

Returns an Vector<String> of commands that are available for use with Domino IQ.

Defined in

LLMReq

Data type

java.util.Vector<String>; list of commands

Syntax

public java.util.Vector<String> getAvailableCommands(String server)

throws NotesException

Parameters

String Server

The Domino Server IQ name that is needed to send the request. If empty, the request will be routed to the Domino IQ server configured to service the command. For more information on Domino IQ server configuration, see Enabling Domino IQ servers.

boolean suppressErrors

It is an optional parameter, if true, the query will suppress (not throw exception) if an internal notes error happen, only return null Vector.

Usage

This method throws a Notes exception if the availability of a request can not be determined due to lower-level failures you can suppress the exception by passing true value to suppressErrors parameter.

Each element of vector is represented by a command in configure database.

If your agent uses this method on Notes Client, make sure that Notes Client will cache the command list until it is restarted. To ensure the method return up-to-date command list, you need to restart Notes Client after making any updates.

Example

import lotus.domino.*;
public class JavaAgent extends AgentBase {
    public void NotesMain() {
      try {
          Session session = getSession();
          AgentContext agentContext = session.getAgentContext();
          LLMReq llmreq = session.createLLMRequest();
          java.util.Vector<String> commands = new java.util.Vector<String>(); 
          // Get all command configure for DominoIQ server name Test
           commands = llmreq.getAvailableCommands("Test");
          for (String element : commands) {
        	  System.out.println(element);
          } 
         
      } catch(Exception e) {
          e.printStackTrace();
       }
   }
}

In case of suppress error:

import lotus.domino.*;
public class JavaAgent extends AgentBase {
    public void NotesMain() {
      try {
          Session session = getSession();
          AgentContext agentContext = session.getAgentContext();
          LLMReq llmreq = session.createLLMRequest();
          java.util.Vector<String> commands = new java.util.Vector<String>(); 
          // Get all command configure for DominoIQ server name Test and suppress any error if happend
           commands = llmreq.getAvailableCommands("Test", true);
         if (commands != null)  {         
for (String element : commands) {
        		  System.out.println(element);
          	}
    } 
         
      } catch(Exception e) {
          e.printStackTrace();
       }
   }
}