Class DescribeDelegator

java.lang.Object
com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
com.perforce.p4java.impl.mapbased.server.cmd.DescribeDelegator
All Implemented Interfaces:
IDescribeDelegator

public class DescribeDelegator extends BaseDelegator implements IDescribeDelegator
Since:
22/09/2016
  • Constructor Details

  • Method Details

    • getChangelistDiffs

      public InputStream getChangelistDiffs(int changelistId, GetChangelistDiffsOptions opts) throws P4JavaException
      Description copied from interface: IDescribeDelegator
      Get an InputStream onto the file diffs associated with a specific submitted changelist. This method (like the similar "p4 describe" command) will not return diffs for pending changelists.

      This is one of the guaranteed "live" method on this interface, and will return the diff output as it exists when called (rather than when the underlying implementation object was created). This can be an expensive method to evaluate, and can generate reams and reams (and reams) of output, so don't use it willy-nilly.

      Note that unlike the corresponding command-line command, which keeps going in the face of errors by moving on to the next file (or whatever), any errors encountered in this method will cause an exception from this method at the first error, so plan accordingly....

      Specified by:
      getChangelistDiffs in interface IDescribeDelegator
      Parameters:
      changelistId - the ID of the target changelist.
      opts - GetChangelistDiffsOptions object describing optional parameters; if null, no options are set.
      Returns:
      InputStream onto the diff stream. Note that while this stream will not be null, it may be empty.
      Throws:
      P4JavaException - if any error occurs in the processing of this method.
    • getChangelistDiffsStream

      public InputStream getChangelistDiffsStream(int id, DescribeOptions options) throws ConnectionException, RequestException, AccessException
      Description copied from interface: IDescribeDelegator
      Get an InputStream onto the file diffs associated with a specific submitted changelist. This method (like the similar "p4 describe" command) will not return diffs for pending changelists.

      This is one of the guaranteed "live" method on this interface, and will return the diff output as it exists when called (rather than when the underlying implementation object was created). This can be an expensive method to evaluate, and can generate reams and reams (and reams) of output, so don't use it willy-nilly.

      Note that unlike the corresponding command-line command, which keeps going in the face of errors by moving on to the next file (or whatever), any errors encountered in this method will cause an exception from this method at the first error, so plan accordingly....

      Specified by:
      getChangelistDiffsStream in interface IDescribeDelegator
      Parameters:
      id - the ID of the target changelist
      options - DescribeOptions behavioural options for method.
      Returns:
      InputStream onto the diff stream. Note that while this stream will not be null, it may be empty
      Throws:
      ConnectionException - if the Perforce server is unreachable or is not connected.
      RequestException - if the Perforce server encounters an error during its processing of the request
      AccessException - if the Perforce server denies access to the caller
    • getShelvedFiles

      public List<IFileSpec> getShelvedFiles(int changelistId) throws P4JavaException
      Description copied from interface: IDescribeDelegator
      Get a list of shelved files associated with a Perforce pending changelist.

      Specified by:
      getShelvedFiles in interface IDescribeDelegator
      Parameters:
      changelistId - numeric pending changelist identifier
      Returns:
      non-null (but possibly empty) list of shelved files associated with the pending changelist.
      Throws:
      P4JavaException - if an error occurs processing this method and its parameters.
    • getShelvedFiles

      public List<IFileSpec> getShelvedFiles(int changelistId, int max) throws P4JavaException
      Description copied from interface: IDescribeDelegator
      Get a list of shelved files associated with a Perforce pending changelist.

      Specified by:
      getShelvedFiles in interface IDescribeDelegator
      Parameters:
      changelistId - numeric pending changelist identifier
      max - limit the number of files returned
      Returns:
      non-null (but possibly empty) list of shelved files associated with the pending changelist.
      Throws:
      P4JavaException - if an error occurs processing this method and its parameters.
    • getChangelistDiffs

      public InputStream getChangelistDiffs(int id, DiffType diffType) throws ConnectionException, RequestException, AccessException
      Throws:
      ConnectionException
      RequestException
      AccessException
    • getChangelistFiles

      public List<IFileSpec> getChangelistFiles(int id) throws ConnectionException, RequestException, AccessException
      Description copied from interface: IDescribeDelegator
      Get a list of the Perforce depot files associated with a Perforce changelist.

      The IFileSpec objects returned are not guaranteed to have any fields except depot path, version, and action valid.

      Changelists that are pending will not have files visible through this method; you should use the client openedFiles method for retrieving files in that situation.

      Specified by:
      getChangelistFiles in interface IDescribeDelegator
      Parameters:
      id - numeric changelist identifier
      Returns:
      non-null (but possibly empty) list of files associated with the changelist.
      Throws:
      ConnectionException - if the Perforce server is unreachable or is not connected.
      RequestException - if the Perforce server encounters an error during its processing of the request
      AccessException - if the Perforce server denies access to the caller
    • getChangelistFiles

      public List<IFileSpec> getChangelistFiles(int id, int max) throws ConnectionException, RequestException, AccessException
      Description copied from interface: IDescribeDelegator
      Get a list of the Perforce depot files associated with a Perforce changelist.

      The IFileSpec objects returned are not guaranteed to have any fields except depot path, version, and action valid.

      Changelists that are pending will not have files visible through this method; you should use the client openedFiles method for retrieving files in that situation.

      Specified by:
      getChangelistFiles in interface IDescribeDelegator
      Parameters:
      id - numeric changelist identifier
      max - limit the number of files returned
      Returns:
      non-null (but possibly empty) list of files associated with the changelist.
      Throws:
      ConnectionException - if the Perforce server is unreachable or is not connected.
      RequestException - if the Perforce server encounters an error during its processing of the request
      AccessException - if the Perforce server denies access to the caller
    • getChangelistExtendedFiles

      public List<IExtendedFileSpec> getChangelistExtendedFiles(int id) throws ConnectionException, RequestException, AccessException
      Description copied from interface: IDescribeDelegator
      Get an extended list of the Perforce depot files associated with a Perforce changelist.

      The IExtendedFileSpec objects returned are not guaranteed to have any fields except depot path, version, and action valid.

      Changelists that are pending will not have files visible through this method; you should use the client openedFiles method for retrieving files in that situation.

      Specified by:
      getChangelistExtendedFiles in interface IDescribeDelegator
      Parameters:
      id - numeric changelist identifier
      Returns:
      non-null (but possibly empty) list of extended files associated with the changelist.
      Throws:
      ConnectionException - if the Perforce server is unreachable or is not connected.
      RequestException - if the Perforce server encounters an error during its processing of the request
      AccessException - if the Perforce server denies access to the caller
    • getChangelistExtendedFiles

      public List<IExtendedFileSpec> getChangelistExtendedFiles(int id, int max) throws ConnectionException, RequestException, AccessException
      Description copied from interface: IDescribeDelegator
      Get an extended list of the Perforce depot files associated with a Perforce changelist.

      The IExtendedFileSpec objects returned are not guaranteed to have any fields except depot path, version, and action valid.

      Changelists that are pending will not have files visible through this method; you should use the client openedFiles method for retrieving files in that situation.

      Specified by:
      getChangelistExtendedFiles in interface IDescribeDelegator
      Parameters:
      id - numeric changelist identifier
      max - limit the number of files returned
      Returns:
      non-null (but possibly empty) list of extended files associated with the changelist.
      Throws:
      ConnectionException - if the Perforce server is unreachable or is not connected.
      RequestException - if the Perforce server encounters an error during its processing of the request
      AccessException - if the Perforce server denies access to the caller
    • getCommitFiles

      public List<IFileSpec> getCommitFiles(String repo, String commit) throws ConnectionException, RequestException, AccessException
      Throws:
      ConnectionException
      RequestException
      AccessException