Class GraphCommitLogOptions
- java.lang.Object
-
- com.perforce.p4java.option.Options
-
- com.perforce.p4java.option.server.GraphCommitLogOptions
-
public class GraphCommitLogOptions extends Options
This class is used tp encapsulate all the information that forms the options part of the 'p4 graph log' commandUsage: log -n repo [ -u user -A date-B date -m N -N N -X N ] [ commit... ]
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
GRAPH_COMMITLOG_COMMAND_PART
static java.lang.String
OPTIONS_SPECS
-
Fields inherited from class com.perforce.p4java.option.Options
immutable, optionList
-
-
Constructor Summary
Constructors Constructor Description GraphCommitLogOptions()
Default constructorGraphCommitLogOptions(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
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]
getCommitValue()
Returns the commit SHA valuesjava.lang.String
getEndDate()
int
getMaxParents()
int
getMaxResults()
int
getMinParents()
java.lang.String
getRepo()
Returns the repo used as part of option -njava.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 valuesvoid
setEndDate(java.lang.String endDate)
The value expected by -B option The upper date limit of logs retrievedvoid
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 -mvoid
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 isvoid
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-
Methods inherited from class com.perforce.p4java.option.Options
getOptions, isImmutable, processFields, setImmutable, setOptions
-
-
-
-
Field Detail
-
GRAPH_COMMITLOG_COMMAND_PART
public static final java.lang.String GRAPH_COMMITLOG_COMMAND_PART
- See Also:
- Constant Field Values
-
OPTIONS_SPECS
public static final java.lang.String OPTIONS_SPECS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GraphCommitLogOptions
public GraphCommitLogOptions()
Default constructor
-
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)
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 Detail
-
processOptions
public java.util.List<java.lang.String> processOptions(IServer server) throws OptionsException
Description copied from class:Options
Turn 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:
processOptions
in 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
public void setRepo(java.lang.String repo)
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
public java.lang.String 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
public void setCommitValue(java.lang.String... commitValue)
Sets the optional argument of commit SHA values- Parameters:
commitValue
- - Additional commit SHA values that can be used to filter the search
-
getCommitValue
public java.lang.String[] getCommitValue()
Returns the commit SHA values- Returns:
- Additional commit SHA values that can be used to filter the search
-
setStartDate
public void setStartDate(java.lang.String startDate)
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
public java.lang.String getStartDate()
- Returns:
- The lower date limit of the logs retrieved.
-
setEndDate
public void setEndDate(java.lang.String endDate)
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
public java.lang.String 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
public void setUser(java.lang.String user)
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
public java.lang.String getUser()
- Returns:
- the user of the commit
-
-