Package com.dassault_systemes.vpmdesktop.vdk0interfaces.interfaces

   
Interface ENOVICSCommand

 
Class Hierarchy
com.dassault_systemes.vpmdesktop.vdk0interfaces.interfaces.ENOVICSCommand
Class Location

Framework : VPMDesktop

Module : VDK0Interfaces

Class Description

public interface ENOVICSCommand

This interface encapsulates access to client-server commands.

It is returned by an ENOVCSCommandFactory.createCommand call and then used to set command parameters, invoke server and retrieve results as described in the example below. This interface is subject to change in future releases. CLIENT-SERVER COMMANDS SHOULD ALWAYS BE ACCESSED VIA THIS INTERFACE AND NEVER DIRECTLY TO MINIMIZE IMPACTS OF ENOVIA CODE CHANGES.

Example:

We will create a client-server command MYCUSTOCOMMAND using the late type ENOVIA_CustomCmd, set a parameter into it, execute it and retrieve a result :

   public class ExampleCommand
   {
      // create a command to access server using late type ENOVIA_CustomCmd
      ENOVICSCommand serverCommand = ENOVCSCommandFactory.createCSCommand("ENOVIA_CustomCmd");

      // set the command name 
      serverCommand.setParameter("CommandString", "MYCUSTOCOMMAND");

      // set input parameter with name "my_input_attribute_name" to a value "my_input_attribute_value"
      // there are symmetrical methods on the server to retrieve these parameters
      serverCommand.setParameter(my_input_attribute_name, my_input_attribute_value);

      //Execute server implementation of the command
      try{
         serverCommand.executeCommand();
      }
      catch(ENOVCSCommunicationException)
      {
        //Error Handling
      }
      // Retrieve Results by name (similar to parameters, retrieve with the same name that was set on the server)
      String my_result = serverCommand.getStringResult(my_output_name);

      // check messages from the server
      ENOVICSMessage [] messages = serverCommand.getMessages();
   }
 

Field Summary

Constructor Summary

Method Summary
void setParameter(String inName, int inValue)
void setParameter(String inName, double inValue)
void setParameter(String inName, String inValue)
void setParameter(String inName, byte inValue)
void setParameter(String inName, byte[] inValue)
void setParameter(String inName, boolean inValue)
void setParameter(String inName, ENOVIObject[] inValue)
void setParameter(String inName, ENOVIObject inValue)
Integer getIntResult(String outName)
Double getDoubleResult(String outName)
Boolean getBooleanResult(String outName)
String getStringResult(String outName)
Byte getByteResult(String outName)
byte[] getByteListResult(String outName)
ENOVIObject getObjectResult(String outName)
ENOVIObject[] getObjectSeqResult(String outName)
boolean executeCommand()
ENOVICSMessage[] getMessages()


Field Detail

Constructor Detail

Method Detail

setParameter

    void setParameter(String inName, int inValue)

This method below sets an integer parameter with a name "in Name" to value "inVlaue" on a client-server command. The values of these parameters can later be retrieved by name on the server side.

Parameters:
inName
attribute name.
inValue
attribute value.

setParameter

    void setParameter(String inName, double inValue)

This method below sets a double parameter with a name "in Name" to value "inVlaue" on a client-server command. The values of these parameters can later be retrieved by name on the server side.

Parameters:
inName
attribute name.
inValue
attribute value.

setParameter

    void setParameter(String inName, String inValue)

This method below sets a string parameter with a name "in Name" to value "inVlaue" on a client-server command. The values of these parameters can later be retrieved by name on the server side.

Parameters:
inName
attribute name.
inValue
attribute value.

setParameter

    void setParameter(String inName, byte inValue)

This method below sets a byte parameter with a name "in Name" to value "inVlaue" on a client-server command. The values of these parameters can later be retrieved by name on the server side.

Parameters:
inName
attribute name.
inValue
attribute value.

setParameter

    void setParameter(String inName, byte[] inValue)

This method below sets a byte [] parameter with a name "in Name" to value "inVlaue" on a client-server command. The values of these parameters can later be retrieved by name on the server side.

Parameters:
inName
attribute name.
inValue
attribute value.

setParameter

    void setParameter(String inName, boolean inValue)

This method below sets a boolean parameter with a name "in Name" to value "inVlaue" on a client-server command. The values of these parameters can later be retrieved by name on the server side.

Parameters:
inName
attribute name.
inValue
attribute value.

setParameter

    void setParameter(String inName, ENOVIObject[] inValue)

This method below sets an ENOVIObject [] parameter with a name "in Name" to value "inVlaue" on a client-server command. The values of these parameters can later be retrieved by name on the server side.

Parameters:
inName
attribute name.
inValue
attribute value.

setParameter

    void setParameter(String inName, ENOVIObject inValue)

This method below sets an ENOVIObject parameter with a name "in Name" to value "inVlaue" on a client-server command. The values of these parameters can later be retrieved by name on the server side.

Parameters:
inName
attribute name.
inValue
attribute value.

getIntResult

    Integer getIntResult(String outName)

Method below retrieve a client-server's command result by name. Client-server commands can have more then one result, but only one result with a specified name. If result with the name specified is not found, null will be returned.

Parameters:
outName
attribute name.
Returns:
attribute value.

getDoubleResult

    Double getDoubleResult(String outName)

Method below retrieve a client-server's command result by name. Client-server commands can have more then one result, but only one result with a specified name. If result with the name specified is not found, null will be returned.

Parameters:
outName
attribute name.
Returns:
attribute value.

getBooleanResult

    Boolean getBooleanResult(String outName)

Method below retrieve a client-server's command result by name. Client-server commands can have more then one result, but only one result with a specified name. If result with the name specified is not found, null will be returned.

Parameters:
outName
attribute name.
Returns:
attribute value.

getStringResult

    String getStringResult(String outName)

Method below retrieve a client-server's command result by name. Client-server commands can have more then one result, but only one result with a specified name. If result with the name specified is not found, null will be returned.

Parameters:
outName
attribute name.
Returns:
attribute value.

getByteResult

    Byte getByteResult(String outName)

Method below retrieve a client-server's command result by name. Client-server commands can have more then one result, but only one result with a specified name. If result with the name specified is not found, null will be returned.

Parameters:
outName
attribute name.
Returns:
attribute value.

getByteListResult

    byte[] getByteListResult(String outName)

Method below retrieve a client-server's command result by name. Client-server commands can have more then one result, but only one result with a specified name. If result with the name specified is not found, null will be returned.

Parameters:
outName
attribute name.
Returns:
attribute value.

getObjectResult

    ENOVIObject getObjectResult(String outName)

Method below retrieve a client-server's command result by name. Client-server commands can have more then one result, but only one result with a specified name. If result with the name specified is not found, null will be returned.

Parameters:
outName
attribute name.
Returns:
attribute value.

getObjectSeqResult

    ENOVIObject[] getObjectSeqResult(String outName)

Method below retrieve a client-server's command result by name. Client-server commands can have more then one result, but only one result with a specified name. If result with the name specified is not found, null will be returned.

Parameters:
outName
attribute name.
Returns:
attribute value.

executeCommand

    boolean executeCommand()

This command invokes a server command with a late type specified on creation and returns resutls to the client.

Returns:
success status of command execution

getMessages

    ENOVICSMessage[] getMessages()

This method returns error messages that were revieved from the server.

Returns:
messages transmitted from the server


Copyright © 2000, Dassault Systèmes. All rights reserved