public class GraphReceivePackOptions extends Options
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
GRAPH_RECEIVE_PACK_COMMAND_PART |
static java.lang.String |
OPTIONS_SPECS |
immutable, optionList
Constructor and Description |
---|
GraphReceivePackOptions()
Default constructor
|
GraphReceivePackOptions(java.lang.String repo,
java.lang.String user,
java.lang.String file,
java.lang.String ref,
java.lang.String forceRef,
java.lang.String packedRef,
java.lang.String forcePackedRef,
boolean verbose)
Constructs receive pack option with the given arguments
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFile()
The path to the pack file itself
|
java.lang.String |
getForcePackedRef()
Returns the value set for -p option
|
java.lang.String |
getForceRef()
Returns the SHA set for the -F option
|
java.lang.String |
getPackedRef()
Returns the SHA reference to the commit to receive
|
java.lang.String |
getRef()
The SHA reference to the master commit
|
java.lang.String |
getRepo()
Returns the repo containing the extracted pack content
|
java.lang.String |
getUser()
Returns the user who owns the pack file
|
boolean |
isVerbose()
Returns of verbosity is set to true or false
|
java.util.List<java.lang.String> |
processOptions(IServer server)
Turn this (specific) options object into a list of strings to be sent to
the Perforce server as options for a specific command.
|
void |
setFile(java.lang.String file)
Sets the path to the pack file
|
void |
setForcePackedRef(java.lang.String forcePackedRef)
Sets the SHA for -p option
|
void |
setForceRef(java.lang.String forceRef)
Sets the SHA for -F option
|
void |
setPackedRef(java.lang.String packedRef)
Sets the SHA representing the master pack
|
void |
setRef(java.lang.String ref)
Sets the -r option value
|
void |
setRepo(java.lang.String repo)
Sets the repository that must exist or will be created by the receive-pack command
|
void |
setUser(java.lang.String user)
The user who owns the pack file
|
void |
setVerbose(boolean verbose)
Sets the verbosity, option -v, of the command
|
getOptions, isImmutable, processFields, setImmutable, setOptions
public static final java.lang.String GRAPH_RECEIVE_PACK_COMMAND_PART
public static final java.lang.String OPTIONS_SPECS
public GraphReceivePackOptions(java.lang.String repo, java.lang.String user, java.lang.String file, java.lang.String ref, java.lang.String forceRef, java.lang.String packedRef, java.lang.String forcePackedRef, boolean verbose)
repo
- Graph repo (-n repo)user
- Owner (-u user)file
- Pack file (-i file)ref
- SHA reference (-r refs...)forceRef
- Import at reference (-F refs...)packedRef
- Packed Reference (-p packed-refs)forcePackedRef
- Force option (-P)verbose
- Verbose output (-v)public GraphReceivePackOptions()
public java.util.List<java.lang.String> processOptions(IServer server) throws OptionsException
Options
The method is used by the server object to generate the string-based arguments expected by the Perforce server corresponding to the state of this method-specific options object. Will return an empty list if there are no "interesting" options set or available. May simply return the superclass options string list if is non-null, but that behaviour is neither guaranteed nor required.
Note that this method is not intended to be called directly by users but by the underlying P4Java plumbing; odd results may occur if this method is called in other contexts.
processOptions
in class Options
server
- possibly-null IServer representing the Perforce server the
options are to be used against. If this parameter is null, it
is acceptable to throw an OptionsException, but it is also
possible to ignore it and do the best you can with what you've
got...OptionsException
- if an error occurs in options processing that is not some
species of ConnectionException, RequestException,
AccessException, etc.public void setRepo(java.lang.String repo)
repo
- public java.lang.String getRepo()
public void setUser(java.lang.String user)
user
- public java.lang.String getUser()
public void setFile(java.lang.String file)
file
- public java.lang.String getFile()
public java.lang.String getRef()
public void setRef(java.lang.String ref)
ref
- public void setVerbose(boolean verbose)
verbose
- public boolean isVerbose()
public java.lang.String getPackedRef()
public void setPackedRef(java.lang.String packedRef)
packedRef
- public java.lang.String getForceRef()
public void setForceRef(java.lang.String forceRef)
forceRef
- public java.lang.String getForcePackedRef()
public void setForcePackedRef(java.lang.String forcePackedRef)
forcePackedRef
- Copyright © 2018 Perforce Software. All Rights Reserved.