|
|
|||||
| Package com.dassault_systemes.vpmdesktop.vdk0interfaces.interfaces |
Interface ENOVICSCommand
|
| Class Hierarchy |
com.dassault_systemes.vpmdesktop.vdk0interfaces.interfaces.ENOVICSCommand
| Class Location |
| 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 |
| public boolean | executeCommand()
This command invokes a server command with a late type specified on creation and returns resutls to the client. |
| public Boolean | getBooleanResult(String outName)
Method below retrieve a client-server's command result by name. |
| public byte[] | getByteListResult(String outName)
Method below retrieve a client-server's command result by name. |
| public Byte | getByteResult(String outName)
Method below retrieve a client-server's command result by name. |
| public Double | getDoubleResult(String outName)
Method below retrieve a client-server's command result by name. |
| public Integer | getIntResult(String outName)
Method below retrieve a client-server's command result by name. |
| public ENOVICSMessage[] | getMessages()
This method returns error messages that were revieved from the server. |
| public ENOVIObject | getObjectResult(String outName)
Method below retrieve a client-server's command result by name. |
| public ENOVIObject[] | getObjectSeqResult(String outName)
Method below retrieve a client-server's command result by name. |
| public String | getStringResult(String outName)
Method below retrieve a client-server's command result by name. |
| public 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. |
| public 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. |
| public 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. |
| public 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. |
| public 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. |
| public 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. |
| public 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. |
| public 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. |
| Field Detail |
| Constructor Detail |
| Method Detail |
public boolean executeCommand()
This command invokes a server command with a late type specified on creation
and returns resutls to the client.
public 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.
outName
public 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.
outName
public 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.
outName
public 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.
outName
public 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.
outName
public ENOVICSMessage[] getMessages()
This method returns error messages that were revieved from the server.
public 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.
outName
public 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.
outName
public 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.
outName
public 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.
inNameinValue
public 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.
inNameinValue
public 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.
inNameinValue
public 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.
inNameinValue
public 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.
inNameinValue
public 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.
inNameinValue
public 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.
inNameinValue
public 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.
inNameinValue