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' command

Usage: log -n repo [ -u user -A date-B date -m N -N N -X N ] [ commit... ]

  • Field Details

  • 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 issued
      maxResults - - maximum number of items to be returned by the graph log command
      startDate - - Date starting from when the commit logs will be fetched
      endDate - - Date used as the end date up to when the commit logs will be fetched
      minNumberOfParents - - lower bound for the number of parents a commit is expected to have as part of the fetch
      maxNumberOfParents - - upper bound for the number of parents a commit is expected to have as part of the fetch
      commitValue - - Additional commit SHA values that can be used to filter the search
  • Method Details

    • processOptions

      public List<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 class Options
      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(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 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(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 String[] getCommitValue()
      Returns the commit SHA values
      Returns:
      Additional commit SHA values that can be used to filter the search
    • setStartDate

      public void setStartDate(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 String getStartDate()
      Returns:
      The lower date limit of the logs retrieved.
    • setEndDate

      public void setEndDate(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 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(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 String getUser()
      Returns:
      the user of the commit