Class GraphCommitLogOptions
java.lang.Object
com.perforce.p4java.option.Options
com.perforce.p4java.option.server.GraphCommitLogOptions
This class is used tp encapsulate all the information
that forms the options part of the 'p4 graph log' command
Usage: log -n repo [ -u user -A date-B date -m N -N N -X N ] [ commit... ]
-
Field Summary
FieldsFields inherited from class com.perforce.p4java.option.Options
immutable, optionList -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorGraphCommitLogOptions(String repo, int maxResults, String startDate, String endDate, int minNumberOfParents, int maxNumberOfParents, String... commitValue) Constructs a GraphCommitLogOptions with the given arguments -
Method Summary
Modifier and TypeMethodDescriptionString[]Returns the commit SHA valuesintintintgetRepo()Returns the repo used as part of option -ngetUser()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.voidsetCommitValue(String... commitValue) Sets the optional argument of commit SHA valuesvoidsetEndDate(String endDate) The value expected by -B option The upper date limit of logs retrievedvoidsetMaxParents(int maximumNumberOfParents) The value expected by -X option The maximum number of parents the fetched log commit is expected to have.voidsetMaxResults(int maxResults) Sets the optional option value for option -mvoidsetMinParents(int minimumNumberOfParents) The value expected by the -N option.voidSets the mandatory option value for option -n which defines the repository against which the command isvoidsetStartDate(String startDate) The value expected by the -A option The lower date limit of the logs retrieved.voidThe value expected by -u option The user who is responsible for the commits retrieved by p4 logMethods inherited from class com.perforce.p4java.option.Options
getOptions, isImmutable, processFields, setImmutable, setOptions
-
Field Details
-
GRAPH_COMMITLOG_COMMAND_PART
- See Also:
-
OPTIONS_SPECS
- See Also:
-
-
Constructor Details
-
GraphCommitLogOptions
public GraphCommitLogOptions()Default constructor -
GraphCommitLogOptions
public GraphCommitLogOptions(String repo, int maxResults, String startDate, String endDate, int minNumberOfParents, int maxNumberOfParents, String... commitValue) Constructs a GraphCommitLogOptions with the given arguments- Parameters:
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 search
-
-
Method Details
-
processOptions
Description copied from class:OptionsTurn this (specific) options object into a list of strings to be sent to the Perforce server as options for a specific command. As a side effect, set the option list associated with this Option to the result.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.
- Specified by:
processOptionsin classOptions- Parameters:
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...- Returns:
- list of options strings associated with this Option
- Throws:
OptionsException- on error
-
setRepo
Sets the mandatory option value for option -n which defines the repository against which the command is- Parameters:
repo- - repo against which the 'p4 graph log' command is issued
-
getRepo
Returns the repo used as part of option -n- Returns:
- repo against which the 'p4 graph log' command is issued
-
setMaxResults
public void setMaxResults(int maxResults) Sets the optional option value for option -m- Parameters:
maxResults- - maximum number of items to be returned by the graph log command
-
getMaxResults
public int getMaxResults()- Returns:
- maximum number of items to be returned by the graph log command
-
setCommitValue
Sets the optional argument of commit SHA values- Parameters:
commitValue- - Additional commit SHA values that can be used to filter the search
-
getCommitValue
Returns the commit SHA values- Returns:
- Additional commit SHA values that can be used to filter the search
-
setStartDate
The value expected by the -A option The lower date limit of the logs retrieved.- Parameters:
startDate- - Date starting from when the commit logs will be fetched
-
getStartDate
- Returns:
- The lower date limit of the logs retrieved.
-
setEndDate
The value expected by -B option The upper date limit of logs retrieved- Parameters:
endDate- - Date used as the end date up to when the commit logs will be fetched
-
getEndDate
- Returns:
- the he upper date limit of logs retrieved
-
setMinParents
public void setMinParents(int minimumNumberOfParents) The value expected by the -N option. The minimum number of parents the fetched log commit is expected to have- Parameters:
minimumNumberOfParents- - lower bound for the number of parents a commit is expected to have as part of the fetch
-
getMinParents
public int getMinParents()- Returns:
- the minimum number of parents the fetched log commit is expected to have
-
setMaxParents
public void setMaxParents(int maximumNumberOfParents) The value expected by -X option The maximum number of parents the fetched log commit is expected to have.- Parameters:
maximumNumberOfParents- - upper bound for the number of parents a commit is expected to have as part of the fetch
-
getMaxParents
public int getMaxParents()- Returns:
- the maximum number of parents the fetched log commit is expected to have.
-
setUser
The value expected by -u option The user who is responsible for the commits retrieved by p4 log- Parameters:
user- - User who has made the commits
-
getUser
- Returns:
- the user of the commit
-