public class GraphCommitLogOptions extends Options
Usage: log -n repo [ -u user -A date-B date -m N -N N -X N ] [ commit... ]
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
GRAPH_COMMITLOG_COMMAND_PART |
static java.lang.String |
OPTIONS_SPECS |
immutable, optionList
Constructor and Description |
---|
GraphCommitLogOptions()
Default constructor
|
GraphCommitLogOptions(java.lang.String repo,
int maxResults,
java.lang.String startDate,
java.lang.String endDate,
int minNumberOfParents,
int maxNumberOfParents,
java.lang.String... commitValue)
Constructs a GraphCommitLogOptions with the given arguments
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getCommitValue()
Returns the commit SHA values
|
java.lang.String |
getEndDate() |
int |
getMaxParents() |
int |
getMaxResults() |
int |
getMinParents() |
java.lang.String |
getRepo()
Returns the repo used as part of option -n
|
java.lang.String |
getStartDate() |
java.lang.String |
getUser() |
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 |
setCommitValue(java.lang.String... commitValue)
Sets the optional argument of commit SHA values
|
void |
setEndDate(java.lang.String endDate)
The value expected by -B option
The upper date limit of logs retrieved
|
void |
setMaxParents(int maximumNumberOfParents)
The value expected by -X option
The maximum number of parents the fetched log commit is expected to have.
|
void |
setMaxResults(int maxResults)
Sets the optional option value for option -m
|
void |
setMinParents(int minimumNumberOfParents)
The value expected by the -N option.
|
void |
setRepo(java.lang.String repo)
Sets the mandatory option value for option -n
which defines the repository against which the
command is
|
void |
setStartDate(java.lang.String startDate)
The value expected by the -A option
The lower date limit of the logs retrieved.
|
void |
setUser(java.lang.String user)
The value expected by -u option
The user who is responsible for the commits retrieved by p4 log
|
getOptions, isImmutable, processFields, setImmutable, setOptions
public static final java.lang.String GRAPH_COMMITLOG_COMMAND_PART
public static final java.lang.String OPTIONS_SPECS
public GraphCommitLogOptions()
public GraphCommitLogOptions(java.lang.String repo, int maxResults, java.lang.String startDate, java.lang.String endDate, int minNumberOfParents, int maxNumberOfParents, java.lang.String... commitValue)
repo
- - repo against which the 'p4 graph log' command is issuedmaxResults
- - maximum number of items to be returned by the graph log commandstartDate
- - Date starting from when the commit logs will be fetchedendDate
- - Date used as the end date up to when the commit logs will be fetchedminNumberOfParents
- - lower bound for the number of parents a commit is expected to have as part of the fetchmaxNumberOfParents
- - upper bound for the number of parents a commit is expected to have as part of the fetchcommitValue
- - Additional commit SHA values that can be used to filter the searchpublic 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
- on errorpublic void setRepo(java.lang.String repo)
repo
- - repo against which the 'p4 graph log' command is issuedpublic java.lang.String getRepo()
public void setMaxResults(int maxResults)
maxResults
- - maximum number of items to be returned by the graph log commandpublic int getMaxResults()
public void setCommitValue(java.lang.String... commitValue)
commitValue
- - Additional commit SHA values that can be used to filter the searchpublic java.lang.String[] getCommitValue()
public void setStartDate(java.lang.String startDate)
startDate
- - Date starting from when the commit logs will be fetchedpublic java.lang.String getStartDate()
public void setEndDate(java.lang.String endDate)
endDate
- - Date used as the end date up to when the commit logs will be fetchedpublic java.lang.String getEndDate()
public void setMinParents(int minimumNumberOfParents)
minimumNumberOfParents
- - lower bound for the number of parents a commit is expected to have as part of the fetchpublic int getMinParents()
public void setMaxParents(int maximumNumberOfParents)
maximumNumberOfParents
- - upper bound for the number of parents a commit is expected to have as part of the fetchpublic int getMaxParents()
public void setUser(java.lang.String user)
user
- - User who has made the commitspublic java.lang.String getUser()