public interface IHelixCommandExecutor
Modifier and Type | Method and Description |
---|---|
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
execMapCmdList(CmdSpec cmdSpec,
java.lang.String[] cmdArgs,
java.util.Map<java.lang.String,java.lang.Object> inMap) |
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
execMapCmdList(java.lang.String cmdName,
java.lang.String[] cmdArgs,
java.util.Map<java.lang.String,java.lang.Object> inMap)
Issue an arbitrary P4Java command to the Perforce server and return the
results as a list of maps.
|
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
execMapCmdList(java.lang.String cmdName,
java.lang.String[] cmdArgs,
java.util.Map<java.lang.String,java.lang.Object> inMap,
IFilterCallback filterCallback)
Issue an arbitrary P4Java command to the Perforce server and return the
results as a list of maps.
|
java.io.InputStream |
execStreamCmd(java.lang.String cmdName,
java.lang.String[] cmdArgs)
Issue an arbitrary P4Java command to the Perforce server and get the
results as a stream.
|
java.nio.ByteBuffer |
execStreamCmdForBuffer(java.lang.String cmdName,
java.lang.String[] cmdArgs)
Issue an arbitrary P4Java command to the Perforce server and get the
results as a byte buffer.
|
java.lang.String |
getErrorOrInfoStr(java.util.Map<java.lang.String,java.lang.Object> map)
Deprecated.
|
java.lang.String |
getErrorStr(java.util.Map<java.lang.String,java.lang.Object> map)
Deprecated.
|
java.lang.String |
getInfoStr(java.util.Map<java.lang.String,java.lang.Object> map)
Deprecated.
|
boolean |
handleErrorStr(java.util.Map<java.lang.String,java.lang.Object> map)
Deprecated.
|
java.lang.String |
handleFileErrorStr(java.util.Map<java.lang.String,java.lang.Object> map)
Deprecated.
|
boolean |
isAuthFail(java.lang.String errStr)
Deprecated.
|
boolean |
isInfoMessage(java.util.Map<java.lang.String,java.lang.Object> map)
Deprecated.
|
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> execMapCmdList(@Nonnull CmdSpec cmdSpec, java.lang.String[] cmdArgs, java.util.Map<java.lang.String,java.lang.Object> inMap) throws ConnectionException, AccessException
ConnectionException
AccessException
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> execMapCmdList(java.lang.String cmdName, java.lang.String[] cmdArgs, java.util.Map<java.lang.String,java.lang.Object> inMap) throws ConnectionException, AccessException, RequestException
This method is intended for low-level commands in the spirit and format of the p4 command line interpreter, and offers a simple way to issue commands to the associated Perforce server without the overhead of the more abstract Java interfaces and methods.
No guidance is given here on the format of the returned map; however, it produces the same output as the p4 command line interpreter in -G (Python map) mode.
Note that this method does not allow you to set "usage" options for the command; these may be added later. Note also that although option arguments passed to this method must be in a form recognized by the p4 command line interpreter, that does not mean the method is being implemented by the interpreter -- the actual implementation depends on the options used to get the server object in the first place from the server factory.
cmdName
- the command to be issued; must be non-null, and correspond to
a Perforce command recognized by P4Java and defined in
CmdSpec.cmdArgs
- the array of command arguments (options and file arguments,
etc.) to be sent to the Perforce server. These must be in the
form used by the corresponding p4 command line interpreter.
Ignored if null.inMap
- an optional map to be sent to the server as standard input,
using the Python map format (-G) form. You must remember to
issue the relevant command-specific option to enable this if
needed.ConnectionException
- if the Perforce server is unreachable or is not connected.RequestException
- if the Perforce server encounters an error during its
processing of the requestAccessException
- if the Perforce server denies access to the callerjava.util.List<java.util.Map<java.lang.String,java.lang.Object>> execMapCmdList(java.lang.String cmdName, java.lang.String[] cmdArgs, java.util.Map<java.lang.String,java.lang.Object> inMap, IFilterCallback filterCallback) throws P4JavaException
This method is intended for low-level commands in the spirit and format of the p4 command line interpreter, and offers a simple way to issue commands to the associated Perforce server without the overhead of the more abstract Java interfaces and methods.
No guidance is given here on the format of the returned map; however, it produces the same output as the p4 command line interpreter in -G (Python map) mode.
Note that this method does not allow you to set "usage" options for the command; these may be added later. Note also that although option arguments passed to this method must be in a form recognized by the p4 command line interpreter, that does not mean the method is being implemented by the interpreter -- the actual implementation depends on the options used to get the server object in the first place from the server factory.
cmdName
- the command to be issued; must be non-null, and correspond to
a Perforce command recognized by P4Java and defined in
CmdSpec.cmdArgs
- the array of command arguments (options and file arguments,
etc.) to be sent to the Perforce server. These must be in the
form used by the corresponding p4 command line interpreter.
Ignored if null.inMap
- an optional map to be sent to the server as standard input,
using the Python map format (-G) form. You must remember to
issue the relevant command-specific option to enable this if
needed.filterCallback
- an optional filter callback to decide on skipping or keeping
individual key/value pairs as part of the results map.P4JavaException
- if an error occurs processing this method and its parameters.java.io.InputStream execStreamCmd(java.lang.String cmdName, java.lang.String[] cmdArgs) throws ConnectionException, RequestException, AccessException
This method is intended for low-level commands in the spirit and format of the p4 command line interpreter, and offers a simple way to issue commands to the associated Perforce server without the overhead of the more abstract Java interfaces and methods.
Note that this method is intended for things like getting file contents, and may have unpredictable results on commands not originally expected to return i/o streams.
Note that this method does not allow you to set "usage" options for the command; these may be added later. Note also that although option arguments passed to this method must be in a form recognized by P4Java (as defined by the CmdSpec enum), that does not mean the method is being implemented by the interpreter -- the actual implementation depends on the options used to get the server object in the first place from the server factory.
cmdName
- the command to be issued; must be non-null, and correspond to
a Perforce command recognized by P4Java and defined in
CmdSpec.cmdArgs
- the array of command arguments (options and file arguments,
etc.) to be sent to the Perforce server. These must be in the
form used by the corresponding p4 command line interpreter.
Ignored if null.ConnectionException
- if the Perforce server is unreachable or is not connected.RequestException
- if the Perforce server encounters an error during its
processing of the requestAccessException
- if the Perforce server denies access to the callerjava.nio.ByteBuffer execStreamCmdForBuffer(java.lang.String cmdName, java.lang.String[] cmdArgs) throws ConnectionException, RequestException, AccessException
cmdName
- the command to be issued; must be non-null, and correspond to
a Perforce command recognized by P4Java and defined in
CmdSpec.cmdArgs
- the array of command arguments (options and file arguments,
etc.) to be sent to the Perforce server. These must be in the
form used by the corresponding p4 command line interpreter.
Ignored if null.ConnectionException
- if the Perforce server is unreachable or is not connected.RequestException
- if the Perforce server encounters an error during its
processing of the requestAccessException
- if the Perforce server denies access to the caller@Deprecated java.lang.String handleFileErrorStr(java.util.Map<java.lang.String,java.lang.Object> map) throws ConnectionException, AccessException
ResultMapParser.handleFileErrorStr(Map)
map
- Perforce command results mapConnectionException
- on errorAccessException
- on error@Deprecated java.lang.String getErrorOrInfoStr(java.util.Map<java.lang.String,java.lang.Object> map)
ResultMapParser.getErrorOrInfoStr(Map)
Note that the minimum severity code is MessageSeverityCode.E_INFO. Therefore, only message with severity code >= MessageSeverityCode.E_INFO will be returned.
RPC impl errors come across the wire as a map in the form usually like this:
fmt0=Access for user '%user%' has not been enabled by 'p4 protect'., func=client-Message, user=nouser, code0=822483067Note that the code0 entry will be used to get the severity level; the fmt0 entry contains the message.
map
- Perforce command results map@Deprecated boolean handleErrorStr(java.util.Map<java.lang.String,java.lang.Object> map) throws RequestException, AccessException
ResultMapParser.handleErrorStr(Map)
map
- Perforce command results mapRequestException
- on errorAccessException
- on error@Deprecated java.lang.String getErrorStr(java.util.Map<java.lang.String,java.lang.Object> map)
ResultMapParser.getErrorStr(Map)
Note that the minimum severity code is MessageSeverityCode.E_FAILED. Therefore, only message with severity code >= MessageSeverityCode.E_FAILED will be returned.
RPC impl errors come across the wire as a map in the form usually like this:
fmt0=Access for user '%user%' has not been enabled by 'p4 protect'., func=client-Message, user=nouser, code0=822483067Note that the code0 entry will be used to get the severity level; the fmt0 entry contains the message.
map
- Perforce command results map@Deprecated boolean isAuthFail(java.lang.String errStr)
ResultMapParser.isAuthFail(String)
errStr
- error string@Deprecated java.lang.String getInfoStr(java.util.Map<java.lang.String,java.lang.Object> map)
ResultMapParser.getInfoStr(Map)
Note that the severity code is MessageSeverityCode.E_INFO. Therefore, only message with severity code = MessageSeverityCode.E_INFO will be returned.
RPC impl errors come across the wire as a map in the form usually like this:
fmt0=Access for user '%user%' has not been enabled by 'p4 protect'., func=client-Message, user=nouser, code0=822483067Note that the code0 entry will be used to get the severity level; the fmt0 entry contains the message.
map
- Perforce command results map@Deprecated boolean isInfoMessage(java.util.Map<java.lang.String,java.lang.Object> map)
ResultMapParser.isInfoMessage(Map)
map
- the map