public interface IOptionsServer extends IServer
Note that unless otherwise noted, individual method options objects can be null; if they're null, the individual method Javadoc will spell out what default options apply (if any) in that case.
Note that in individual method Javadoc comments below, all method "throws" clauses are assumed to throw the normal complement of RequestException, ConnectionException, and AccessException with their usual semantics unless otherwise noted. The three standard P4JavaException classes and the broad causes for their being thrown are:
ConnectionException if the Perforce server is unreachable or is not connected. RequestException if the Perforce server encounters an error during its processing of the request. AccessException if the Perforce server denies access to the caller.
ATTRIBUTE_STREAM_MAP_KEY, IN_MAP_USE_TAGS_KEY
Modifier and Type | Method and Description |
---|---|
java.lang.String |
addTrust(java.lang.String fingerprintValue)
Approve and add the specified fingerprint for the Perforce SSL
connection.
|
java.lang.String |
addTrust(java.lang.String fingerprintValue,
TrustOptions opts)
Approve and add the specified fingerprint or replacement for the Perforce
SSL connection.
|
java.lang.String |
addTrust(TrustOptions opts)
Approve and add the fingerprint for the Perforce SSL connection.
|
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
execInputStringMapCmdList(java.lang.String cmdName,
java.lang.String[] cmdArgs,
java.lang.String inString)
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>> |
execInputStringMapCmdList(java.lang.String cmdName,
java.lang.String[] cmdArgs,
java.lang.String inString,
IFilterCallback filterCallback)
Issue an arbitrary P4Java command to the Perforce server and return the
results as a list of maps.
|
java.io.InputStream |
execInputStringStreamCmd(java.lang.String cmdName,
java.lang.String[] cmdArgs,
java.lang.String inString)
Issue an arbitrary P4Java command to the Perforce server and return the
results as a stream.
|
void |
execInputStringStreamingMapCmd(java.lang.String cmdName,
java.lang.String[] cmdArgs,
java.lang.String inString,
IStreamingCallback callback,
int key)
Issue a streaming map command to the Perforce server, using an optional
string for any input expected by the server (such as label or job specs,
etc.).
|
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
execMapCmdList(java.lang.String cmdName,
java.lang.String[] cmdArgs,
IFilterCallback filterCallback,
IParallelCallback parallelCallback)
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>> |
execQuietMapCmdList(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 without invoking any command callbacks.
|
java.io.InputStream |
execStreamCmd(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 get the
results as a stream.
|
java.lang.String |
getAuthId()
Return the Perforce Server's authId.
|
java.lang.String |
getTicketsFilePath()
Return the Perforce authentication tickets file path.
|
java.lang.String |
getTrust()
Return the fingerprint for the Perforce SSL connection.
|
java.lang.String |
getTrustFilePath()
Return the Perforce trust file path.
|
java.util.List<Fingerprint> |
getTrusts()
List all fingerprints in the trust file.
|
java.util.List<Fingerprint> |
getTrusts(TrustOptions opts)
List all fingerprints or replacements in the trust file.
|
UsageOptions |
getUsageOptions()
Get the UsageOptions object associated with this server.
|
java.lang.String |
removeTrust()
Remove the fingerprint for the Perforce SSL connection.
|
java.lang.String |
removeTrust(TrustOptions opts)
Remove the fingerprint or replacement for the Perforce SSL connection.
|
void |
setAuthTicket(java.lang.String userName,
java.lang.String authTicket)
Set the server's Perforce authentication ticket for the specified user to
the passed-in string.
|
void |
setAuthTicket(java.lang.String userName,
java.lang.String serverId,
java.lang.String authTicket)
Set the server's Perforce authentication ticket for the specified user to
the passed-in string.
|
void |
setTicketsFilePath(java.lang.String ticketsFilePath)
Set the Perforce authentication tickets file path.
|
void |
setTrustFilePath(java.lang.String trustFilePath)
Set the Perforce trust file path.
|
IOptionsServer |
setUsageOptions(UsageOptions opts)
Set the UsageOptions object associated with this server.
|
connect, createUserGroup, deleteUserGroup, disconnect, execInputStringMapCmd, execInputStringStreamingMapComd, execMapCmd, execQuietMapCmd, execQuietStreamCmd, execStreamingMapCommand, execStreamingMapCommand, getAuthTicket, getAuthTicket, getAuthTicket, getChangelistDiffs, getCharsetName, getCommitFiles, getCurrentClient, getCurrentServerInfo, getGenericCode, getInterchanges, getInterchanges, getKnownCharsets, getProperties, getServerVersion, getServerVersionNumber, getSeverityCode, getStatus, getUserGroups, getUserName, getWorkingDirectory, isCaseSensitive, isConnected, isLoginNotRequired, registerBrowserCallback, registerCallback, registerProgressCallback, registerSSOCallback, setAuthTicket, setCharsetName, setClientPath, setCurrentClient, setCurrentServerInfo, setUserName, setWorkingDirectory, supportsSmartMove, supportsUnicode, updateUserGroup
execMapCmdList, execMapCmdList, execMapCmdList, execStreamCmd, execStreamCmdForBuffer, getErrorOrInfoStr, getErrorStr, getInfoStr, handleErrorStr, handleFileErrorStr, isAuthFail, isInfoMessage
setFileAttributes, setFileAttributes, unsetFileAttribute, unsetFileAttributes
createBranchSpec, deleteBranchSpec, deleteBranchSpec, getBranchSpec, getBranchSpec, updateBranchSpec
getBranchSpecs, getBranchSpecs
deletePendingChangelist, deletePendingChangelist, getChangelist, getChangelist
getChangelists, getChangelists, getChangelists
createClient, createTempClient, deleteClient, deleteClient, getClient, getClient, getClientTemplate, getClientTemplate, getClientTemplate, switchClientView, switchStreamView, updateClient, updateClient, updateClient
getClients, getClients
setOrUnsetServerConfigurationValue, showServerConfiguration
deleteCounter, getCounter, getCounter, setCounter, setCounter
getCounters, getCounters, getCounters
getDbSchema
createDepot, deleteDepot, getDepot
getDepots, getDepots
getRepos, getRepos, getRepos
getChangelistDiffs, getChangelistDiffsStream, getChangelistExtendedFiles, getChangelistExtendedFiles, getChangelistFiles, getChangelistFiles, getShelvedFiles, getShelvedFiles
getFileDiffs, getFileDiffs, getFileDiffsStream, getServerFileDiffs
getDirectories, getDirectories
getDiskSpace
duplicateRevisions
getExportRecords, getExportRecords, getStreamingExportRecords
getFileAnnotations, getFileAnnotations
getRevisionHistory, getRevisionHistory
getDepotFiles, getDepotFiles
fixJobs, fixJobs
getFixes, getFixList
getExtendedFiles, getExtendedFiles
getMatchingLines, getMatchingLines
createUserGroup, deleteUserGroup, getUserGroup, updateUserGroup
getUserGroups
getServerInfo
getSubmittedIntegrations, getSubmittedIntegrations
getInterchanges, getInterchanges
getStreamIntegrationStatus
createJob, deleteJob, getJob, updateJob
getJobs, getJobs
getJobSpec
journalWait
deleteKey, getKey, setKey
getKeys
createLabel, deleteLabel, deleteLabel, getLabel, updateLabel
getLabels, getLabels
getLoginStatus, isDontWriteTicket, login, login, login, login, login
logout, logout
getLogTail
getServerProcesses, getServerProcesses
moveFile, moveFile
obliterateFiles
getOpenedFiles, getOpenedFiles
changePassword
getFileContents, getFileContents, getFileContents
deleteProperty, getProperty, setProperty
createProtectionEntries, getProtectionsTable, updateProtectionEntries
getProtectionEntries, getProtectionEntries
reload
renameUser
getReviewChangelists
getReviews, getReviews
searchJobs
getFileSizes
createStream, deleteStream, getStream, getStream, updateStream
getStreams
tagFiles, tagFiles
createTriggerEntries, getTriggerEntries, getTriggersTable, updateTriggerEntries
unload
createUser, createUser, deleteUser, deleteUser, getUser, updateUser, updateUser
getUsers, getUsers
verifyFiles
getGraphListTree
getBlobObject, getCommitObject, getCommitObject, getGraphCommitLogList, getGraphObject
getGraphRevList
getGraphCommitLogList
doGraphReceivePack
getListData, getListData
getGraphShowRefs
getLogin2Status, getLogin2Status, login2, login2, login2CheckAuth, login2InitAuth, login2ListMethods
getSpec, updateSpec, updateSpecString
getLicense, getLimits, getValidServerIPMACAddress, updateLicense
createExtensionConfig, deleteExtension, getExtensionConfig, installExtension, listExtensions, packageExtension, sampleExtension, updateExtensionConfig
getStreamlog
renameClient
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> execInputStringMapCmdList(java.lang.String cmdName, java.lang.String[] cmdArgs, java.lang.String inString) 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.inString
- an optional string to be sent to the server as standard input
unchanged (this must be in the format expected by the server,
typically as required when using the "-i" flag to the p4
command line app for the same command). You must remember to
issue the relevant command-specific option to enable this if
needed.P4JavaException
- if an error occurs processing this method and its parametersjava.util.List<java.util.Map<java.lang.String,java.lang.Object>> execInputStringMapCmdList(java.lang.String cmdName, java.lang.String[] cmdArgs, java.lang.String inString, 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.inString
- an optional string to be sent to the server as standard input
unchanged (this must be in the format expected by the server,
typically as required when using the "-i" flag to the p4
command line app for the same command). 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 parametersjava.util.List<java.util.Map<java.lang.String,java.lang.Object>> execMapCmdList(java.lang.String cmdName, java.lang.String[] cmdArgs, IFilterCallback filterCallback, IParallelCallback parallelCallback) 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.filterCallback
- an optional filter callback to decide on skipping or keeping
individual key/value pairs as part of the results map.parallelCallback
- an optional parallel sync/submit callback to provide a
multi-threaded file transfer implementation.P4JavaException
- if an error occurs processing this method and its parametersjava.util.List<java.util.Map<java.lang.String,java.lang.Object>> execQuietMapCmdList(java.lang.String cmdName, java.lang.String[] cmdArgs, java.util.Map<java.lang.String,java.lang.Object> inMap) throws P4JavaException
Basically equivalent to execMapCmd with temporary disabling of any ICommandCallback calls and / or listeners; this turns out to be useful for various reasons we won't go into here...
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.P4JavaException
- if an error occurs processing this method and its parametersvoid execInputStringStreamingMapCmd(java.lang.String cmdName, java.lang.String[] cmdArgs, java.lang.String inString, IStreamingCallback callback, int key) throws P4JavaException
Streaming commands allow users to get each result from a suitably-issued command as it comes in from the server, rather than waiting for the entire command method to complete (and getting the results back as a completed List or Map or whatever).
The results are sent to the user using the IStreamingCallback handleResult method; see the IStreamingCallback Javadoc for details. The payload passed to handleResult is usually the raw map gathered together deep in the RPC protocol layer, and the user is assumed to have the knowledge and technology to be able to parse it and use it suitably in much the same way as a user unpacks or processes the results from the other low-level exec methods like execMapCommand.
NOTE: 'streaming' here has nothing at all to do with Perforce 'streams', which are (or will be) implemented elsewhere.
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.inString
- an optional string to be sent to the server as standard input
unchanged (this must be in the format expected by the server,
typically as required when using the "-i" flag to the p4
command line app for the same command). You must remember to
issue the relevant command-specific option to enable this if
needed.callback
- a non-null IStreamingCallback to be used to process the
incoming results.key
- an opaque integer key that is passed to the IStreamingCallback
callback methods to identify the action as being associated
with this specific call.P4JavaException
- if an error occurs processing this method and its parameters.UsageOptions getUsageOptions()
IOptionsServer setUsageOptions(UsageOptions opts)
opts
- non-null UsageOptions object to associate with this server.void setAuthTicket(java.lang.String userName, java.lang.String authTicket)
userName
- non-null Perforce user nameauthTicket
- possibly-null Perforce authentication ticketvoid setAuthTicket(java.lang.String userName, java.lang.String serverId, java.lang.String authTicket)
userName
- non-null Perforce user nameserverId
- possibly-null Perforce server's auth.id/IP:portauthTicket
- possibly-null Perforce authentication ticketjava.lang.String getAuthId()
void setTicketsFilePath(java.lang.String ticketsFilePath)
ticketsFilePath
- non-null Perforce auth tickets file pathjava.lang.String getTicketsFilePath()
void setTrustFilePath(java.lang.String trustFilePath)
trustFilePath
- non-null Perforce trust file pathjava.lang.String getTrustFilePath()
java.io.InputStream execStreamCmd(java.lang.String cmdName, java.lang.String[] cmdArgs, java.util.Map<java.lang.String,java.lang.Object> inMap) 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.
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.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 callerP4JavaException
java.io.InputStream execInputStringStreamCmd(java.lang.String cmdName, java.lang.String[] cmdArgs, java.lang.String inString) 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.
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 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.inString
- an optional string to be sent to the server as standard input
unchanged (this must be in the format expected by the server,
typically as required when using the "-i" flag to the p4
command line app for the same command). You must remember to
issue the relevant command-specific option to enable this if
needed.P4JavaException
- if an error occurs processing this method and its parametersjava.lang.String getTrust() throws P4JavaException
Note that this fingerprint is generated from the connection, it may not be the same as the one (if any) stored in the trust file.
P4JavaException
- if an error occurs processing this method and its parameters.java.lang.String addTrust(TrustOptions opts) throws P4JavaException
Note that an exception would be thrown if there is an identity change detected. If you want to trust the new key use the 'force' option.
opts
- TrustOptions object describing optional parameters; if null,
no options are set.P4JavaException
- if an error occurs processing this method and its parameters.java.lang.String addTrust(java.lang.String fingerprintValue) throws P4JavaException
fingerprintValue
- non-null fingerprint value to be added.P4JavaException
- if an error occurs processing this method and its parameters.java.lang.String addTrust(java.lang.String fingerprintValue, TrustOptions opts) throws P4JavaException
fingerprintValue
- non-null fingerprint value to be added.opts
- TrustOptions object describing optional parameters; if null,
no options are set.P4JavaException
- if an error occurs processing this method and its parameters.java.lang.String removeTrust() throws P4JavaException
P4JavaException
- if an error occurs processing this method and its parameters.java.lang.String removeTrust(TrustOptions opts) throws P4JavaException
opts
- TrustOptions object describing optional parameters; if null,
no options are set.P4JavaException
- if an error occurs processing this method and its parameters.java.util.List<Fingerprint> getTrusts() throws P4JavaException
P4JavaException
- if an error occurs processing this method and its parameters.java.util.List<Fingerprint> getTrusts(TrustOptions opts) throws P4JavaException
opts
- TrustOptions object describing optional parameters; if null,
no options are set.P4JavaException
- if an error occurs processing this method and its parameters.